You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrates @mparticle/web-rokt-pay-plus-kit (module ID 184) from its standalone repo into kits/roktpayplus/, matching the TypeScript/Vite/Vitest toolchain established by the Rokt kit migration.
What is Rokt Pay Plus
Rokt Pay+ is a Rokt product that runs inside an iframe on an advertiser's checkout / post-purchase page. This kit is a postMessage bridge: it receives the events the advertiser already logs to mParticle and re-emits them as Pay+ signals (initiated, stepComplete, approved, pending, purchaseCompleted, etc.) to the embedding window. The kit is silent on non-iframed pages — all signals are no-ops when window.parent === window.
Funnel progression is driven by page views; conversions and outcomes are driven by custom events. Everything is configurable via dashboard settings — no Pay+-specific code required in the advertiser's application.
Files
Path
Origin
src/RoktPayPlus-Kit.ts
Faithful copy from upstream main (v1.1.0)
test/src/RoktPayPlus-Kit.spec.ts
Faithful copy from upstream
eslint.config.mjs
Faithful copy from upstream
CHANGELOG.md, README.md
Faithful copy from upstream
package-lock.json
Faithful copy from upstream
package.json
Adapted (see below)
vite.config.ts
Adapted (see below)
tsconfig.json
Adapted (see below)
Monorepo adaptations
package.json
@mparticle/web-sdk moved from dependencies → peerDependencies: "^3.0.0" + devDependencies: "^2.73.1" (same pattern as the Rokt kit)
Semantic-release devDependencies removed (release is managed at the monorepo level)
repository URL updated to point at the monorepo
vite.config.ts
rollupOptions.external set to exclude @mparticle/web-sdk from the build output
define added for process.env.PACKAGE_VERSION (lockstep version injection)
Low Risk
Additive, self-contained kit migration with no changes to core SDK runtime; main risk is misconfigured event mapping affecting Pay+ signals on checkout pages.
Overview
Adds Rokt Pay Plus (kits/roktpayplus/, module ID 184) to the web SDK monorepo and registers it in kits/matrix.json so it can ship with the kit bundle.
The migrated package is the existing postMessage bridge that maps mParticle page views and custom events to Pay+ signals (initiated, stepComplete, approved, gwpApproved, etc.) for an embedded placement. Upstream v1.1.0 behavior is preserved, including dashboard-driven event/screen mapping and the gwpApprovedEventName gift-with-purchase path.
Monorepo wiring follows other TS kits: @mparticle/web-sdk as a peer (external in Vite), path aliases to monorepo SDK types/build for tests and tsc, plus the usual Vite/Vitest/ESLint tooling, README, and CHANGELOG from the standalone repo.
Reviewed by Cursor Bugbot for commit 1d3e3b3. Bugbot is set up for automated code reviews on this repo. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates
@mparticle/web-rokt-pay-plus-kit(module ID 184) from its standalone repo intokits/roktpayplus/, matching the TypeScript/Vite/Vitest toolchain established by the Rokt kit migration.What is Rokt Pay Plus
Rokt Pay+ is a Rokt product that runs inside an iframe on an advertiser's checkout / post-purchase page. This kit is a postMessage bridge: it receives the events the advertiser already logs to mParticle and re-emits them as Pay+ signals (
initiated,stepComplete,approved,pending,purchaseCompleted, etc.) to the embedding window. The kit is silent on non-iframed pages — all signals are no-ops whenwindow.parent === window.Funnel progression is driven by page views; conversions and outcomes are driven by custom events. Everything is configurable via dashboard settings — no Pay+-specific code required in the advertiser's application.
Files
src/RoktPayPlus-Kit.tsmain(v1.1.0)test/src/RoktPayPlus-Kit.spec.tseslint.config.mjsCHANGELOG.md,README.mdpackage-lock.jsonpackage.jsonvite.config.tstsconfig.jsonMonorepo adaptations
package.json@mparticle/web-sdkmoved fromdependencies→peerDependencies: "^3.0.0"+devDependencies: "^2.73.1"(same pattern as the Rokt kit)repositoryURL updated to point at the monorepovite.config.tsrollupOptions.externalset to exclude@mparticle/web-sdkfrom the build outputdefineadded forprocess.env.PACKAGE_VERSION(lockstep version injection)aliasadded:@mparticle/web-sdk/internal→../../src/internal-types.ts@mparticle/web-sdk→../../dist/mparticle.common.jstsconfig.jsonpathsadded to resolve@mparticle/web-sdk/internal→../../src/internal-types.tsfor type checkingTest plan
npm install && npm run build— buildsdist/RoktPayPlus-Kit.{iife,esm,common}.jscleanlynpm test— 13/13 Vitest tests passrun-kit-testsjob passes forkits/roktpayplus