Skip to content

chore: sync Rokt kit with upstream v1.30.2 - #1313

Merged
rmi22186 merged 1 commit into
mainfrom
feat/rokt-kit-upstream-sync-main
Aug 6, 2026
Merged

rmi22186 merged 1 commit into
mainfrom
feat/rokt-kit-upstream-sync-main

Conversation

@rmi22186

@rmi22186 rmi22186 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Syncs kits/rokt from upstream mParticle-integrations/mparticle-javascript-integration-rokt main through v1.30.2 (dec20cd4).
  • Ports upstream Rokt kit changes since v1.28.3, including active_time_on_site_ms persistence filtering and page-view capture surfaced as page_events on selectPlacements.
  • Preserves monorepo adaptations: monorepo package repository URL, @mparticle/web-sdk peer/dev dependency layout, no standalone semantic-release/provenance config, Vite externalization/aliases/version define, and Node webstorage mitigation.

Upstream commits included

Files changed

  • kits/rokt/src/Rokt-Kit.ts
  • kits/rokt/src/selectPlacementsAttributePersistence.ts
  • kits/rokt/test/src/tests.spec.ts
  • kits/rokt/CHANGELOG.md
  • kits/rokt/package.json
  • kits/rokt/package-lock.json
  • kits/rokt/vite.config.ts

Test plan

  • npm ci in kits/rokt on Node v24.19.0
  • npm run build in kits/rokt on Node v24.19.0
  • npm test in kits/rokt on Node v24.19.0: 228 passed
  • npm ci in kits/rokt on Node v26.5.0
  • npm run build in kits/rokt on Node v26.5.0
  • npm test in kits/rokt on Node v26.5.0: 228 passed

Notes: npm run build emits existing declaration-generation type diagnostics from monorepo ../../src/vault.ts, but Vite completes successfully. Vitest also warns that the root GTS base tsconfig is not installed from the kit package context.

Notes

@rmi22186
rmi22186 requested a review from a team as a code owner August 6, 2026 18:46
@cursor

cursor Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Introduces client-side behavioral page-view storage and new data sent to Rokt on placements, with PII mitigations and a noTargeting opt-out; scope is limited to the Rokt integration kit with extensive new tests.

Overview
Brings kits/rokt up to v1.30.2 (changelog and package metadata) while keeping monorepo-specific package.json repository URL and Vitest --no-experimental-webstorage for Node compatibility.

The kit now records PageView events in localStorage (mpPageViews, capped at 25, query strings stripped via sanitizeUrl), clears that buffer on session end and when noTargeting is set, and attaches a JSON page_events payload on selectPlacements (including derived activeTimeOnPage from consecutive activeTimeOnSite values). Page-view work runs even when the launcher is not ready; placement mapping still requires a ready kit. PAGE_VIEW_CAPTURE_FAILED is reported at INFO severity.

active_time_on_site_ms is added to the selectPlacements persistence deny list so it is forwarded on the current call but not cached for later placements. returnLocalSessionAttributes always returns session attributes when available (no longer skipped when mapping tables are empty).

Tests add broad coverage for page-view capture, targeting opt-out, URL sanitization, and active_time_on_site_ms caching behavior.

Reviewed by Cursor Bugbot for commit 41cb8dc. Bugbot is set up for automated code reviews on this repo. Configure here.

@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 41cb8dc. Configure here.

Comment thread kits/rokt/src/Rokt-Kit.ts
let pageUrl: string | undefined;

try {
pageUrl = sanitizeUrl(window.location.href);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Page URL captured after delay

Medium Severity

capturePageView records window.location.href at process time, while other fields come from the event snapshot. When the core SDK queues events (no MPID, integration delay, or config load), navigation before flush stores the wrong pageUrl in page_events sent to Rokt. SDKEvent already carries PageUrl from event creation.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 41cb8dc. Configure here.

@rmi22186 rmi22186 changed the title Sync Rokt kit with upstream v1.30.2 chore: sync Rokt kit with upstream v1.30.2 Aug 6, 2026
@rmi22186
rmi22186 merged commit 4a7e90f into main Aug 6, 2026
2 checks passed
@jaissica12 jaissica12 mentioned this pull request Aug 27, 2026
2 of 4 tasks
github-actions Bot pushed a commit that referenced this pull request Aug 31, 2026
# [2.82.0](v2.81.0...v2.82.0) (2026-08-31)

### Bug Fixes

* align kit package names with published npm package names ([#1343](#1343)) ([ea5a477](ea5a477))
* **ci:** stabilize BrowserStack Test workflow ([#1321](#1321)) ([1871b10](1871b10))
* correct kit package files metadata ([#1312](#1312)) ([c3c4045](c3c4045))
* finish [#1314](#1314) conflict leftovers after rebase onto 2.80.1 ([560dd17](560dd17))
* sync Braze kits with upstream — braze-6 version fix + test repairs ([#1301](#1301)) ([8bf13e2](8bf13e2))
* type leftover eCommerce tests after [#1314](#1314) rebase ([#1377](#1377)) ([04a96ce](04a96ce))

### Features

* add google consent setting updates to GTM and GA4 kits ([#1220](#1220)) ([fcc7de2](fcc7de2))
* migrate adobe kit to monorepo ([#1207](#1207)) ([e91f9ea](e91f9ea))
* migrate Adobe Target kit to monorepo ([#1190](#1190)) ([e103f42](e103f42))
* migrate Adwords kit to monorepo ([#1175](#1175)) ([c8cd16a](c8cd16a))
* migrate amplitude ([#1173](#1173)) ([fb92300](fb92300))
* migrate Bing Ads kit to monorepo ([#1183](#1183)) ([ed54636](ed54636))
* migrate braze-3 kit to monorepo ([#1202](#1202)) ([3d5e037](3d5e037))
* migrate braze-4 kit to monorepo ([#1200](#1200)) ([869539e](869539e))
* migrate braze-5 kit to monorepo ([#1201](#1201)) ([116751c](116751c))
* migrate braze-6 kit to monorepo ([#1194](#1194)) ([50949ca](50949ca))
* migrate Criteo kit to monorepo ([#1180](#1180)) ([06262a8](06262a8))
* migrate Device Match kit to monorepo ([#1186](#1186)) ([3a82615](3a82615))
* migrate DoubleClick kit to monorepo ([#1188](#1188)) ([2948bd9](2948bd9))
* migrate Dynamic Yield kit to monorepo ([#1176](#1176)) ([9b37e68](9b37e68))
* migrate Facebook kit to monorepo ([#1177](#1177)) ([5750382](5750382))
* migrate Google Tag Manager kit to monorepo ([#1192](#1192)) ([57a5a75](57a5a75))
* migrate google-analytics-4 kit to monorepo ([#1206](#1206)) ([3f2bf7e](3f2bf7e))
* migrate Heap kit to monorepo ([#1181](#1181)) ([7123718](7123718))
* migrate id5-1 kit to monorepo ([#1195](#1195)) ([545a8b6](545a8b6))
* migrate Inspectlet kit to monorepo ([#1178](#1178)) ([15547b5](15547b5))
* migrate Intercom kit to monorepo ([#1182](#1182)) ([67cc1ca](67cc1ca))
* migrate KissMetrics kit to monorepo ([#1179](#1179)) ([4692f57](4692f57))
* migrate leanplum-1 kit to monorepo ([#1196](#1196)) ([ad77a01](ad77a01))
* migrate localytics-4 kit to monorepo ([#1198](#1198)) ([5598af8](5598af8))
* migrate mixpanel-2 kit to monorepo ([#1197](#1197)) ([5013dcb](5013dcb))
* migrate OneTrust kit to monorepo ([#1174](#1174)) ([424e243](424e243))
* migrate Optimizely kit to monorepo ([#1191](#1191)) ([e7ef432](e7ef432))
* migrate Rokt kit to monorepo ([#1189](#1189)) ([617c63d](617c63d))
* migrate Rokt Pay Plus kit to monorepo (v1.1.0, TypeScript/Vite/Vitest) ([#1302](#1302)) ([6fe7d45](6fe7d45))
* migrate SimpleReach kit to monorepo ([#1184](#1184)) ([37403a7](37403a7))
* migrate Taplytics kit to monorepo ([#1187](#1187)) ([5cbd014](5cbd014))
* migrate Twitter kit to monorepo ([#1185](#1185)) ([e6734a4](e6734a4))
* re-migrate Rokt kit to upstream 1.28.3 (TypeScript/Vite/Vitest) ([#1300](#1300)) ([6511bd3](6511bd3))
* remove deprecated removeCCPAState method ([#1315](#1315)) ([7f552bb](7f552bb))
* remove unused deprecated cart/commerce APIs (keep logPurchase) ([#1314](#1314)) ([d7f6055](d7f6055))
* sync rokt kit with upstream v1.30.2 ([#1313](#1313)) ([38e8a74](38e8a74))
* sync Rokt kit with upstream v1.36.1 ([#1379](#1379)) ([0a8805b](0a8805b))
* update kit matrix with all migrated kits ([#1208](#1208)) ([09aaf46](09aaf46)), closes [#1194](#1194)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants