Skip to content

feat: pass mParticle session ID to Rokt SDK on launcher creation#74

Merged
alexs-mparticle merged 1 commit intomparticle-integrations:developmentfrom
crisryantan:feature/pass-mp-session-id-to-rokt-sdk
Mar 24, 2026
Merged

feat: pass mParticle session ID to Rokt SDK on launcher creation#74
alexs-mparticle merged 1 commit intomparticle-integrations:developmentfrom
crisryantan:feature/pass-mp-session-id-to-rokt-sdk

Conversation

@crisryantan
Copy link
Contributor

Summary

  • Reads the current mParticle session ID from window.mParticle.sessionManager.getSession() in attachLauncher() and passes it as options.mpSessionId to Rokt.createLauncher
  • This enables the Rokt Web SDK to associate dual-send events with the originating mParticle session, allowing cross-system correlation in the transactions data lake

Changes

  • src/Rokt-Kit.js: In attachLauncher(), safely read the mParticle session ID (with null checks for sessionManager availability) and include it in the options object passed to both createLauncher and createLocalLauncher
  • test/src/tests.js: Added sessionManager mock to mParticle stubs, updated MockRoktForwarder to capture mpSessionId, and added test cases verifying the session ID is passed when available and omitted when sessionManager is unavailable

Companion PR

  • This works alongside a companion PR on ROKT/sdk-web that receives mpSessionId through the launcher options, stores it in PartnerConfigurationService, auto-refreshes it via __event_stream__ events, and includes it in the v2/sessions/events request body

Test Plan

  • Unit tests pass for mpSessionId presence when sessionManager is available
  • Unit tests pass for mpSessionId absence when sessionManager is unavailable
  • Integration testing with Rokt Web SDK consuming the new option

Made with Cursor

Read the current mParticle session ID from sessionManager.getSession()
in attachLauncher() and include it as mpSessionId in the options object
passed to Rokt.createLauncher. This enables the Rokt SDK to associate
dual-send events with the originating mParticle session.

Made-with: Cursor
@crisryantan crisryantan marked this pull request as ready for review March 24, 2026 04:54
@alexs-mparticle alexs-mparticle changed the base branch from main to development March 24, 2026 14:14
@alexs-mparticle alexs-mparticle merged commit 1a5b591 into mparticle-integrations:development Mar 24, 2026
3 of 5 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 24, 2026
# [1.18.0](v1.17.0...v1.18.0) (2026-03-24)

### Bug Fixes

* **ci:** add contents read permission for pr-notify workflow ([#73](#73)) ([7c84013](7c84013))
* **ci:** add id-token permission for pr-notify workflow ([#72](#72)) ([fa278ff](fa278ff))

### Features

* pass mParticle session ID to Rokt SDK on launcher creation ([#74](#74)) ([1a5b591](1a5b591))
* sync Rokt session ID to mParticle via setIntegrationAttribute ([#67](#67)) ([021b2a5](021b2a5))
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.

3 participants