feat: sync Rokt session ID to mParticle via setIntegrationAttribute#67
Merged
alexs-mparticle merged 5 commits intomparticle-integrations:developmentfrom Mar 24, 2026
Conversation
mattbodle
reviewed
Mar 19, 2026
rmi22186
reviewed
Mar 19, 2026
rmi22186
reviewed
Mar 19, 2026
alexs-mparticle
requested changes
Mar 20, 2026
Collaborator
alexs-mparticle
left a comment
There was a problem hiding this comment.
@crisryantan please remove the dist files from your pr
60cc70a to
17c775b
Compare
mattbodle
approved these changes
Mar 20, 2026
alexs-mparticle
approved these changes
Mar 23, 2026
rmi22186
reviewed
Mar 23, 2026
| sel.context.sessionId | ||
| .then(function (sessionId) { | ||
| _setRoktSessionId(sessionId); | ||
| logSelectPlacementsEvent( |
Collaborator
There was a problem hiding this comment.
@crisryantan Should we also logSelectPlacementsEvent in a catch, and in an else statement? I assume this may happen if a selection fails, in which case we should still send the original selectPlacements event.
After selectPlacements resolves, read the session ID from the Selection
context and subscribe to SESSION_ID_UPDATED events. The session ID is
forwarded to mParticle via setIntegrationAttribute(181, { roktSessionId })
so server-side integrations can link events back to Rokt sessions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove redundant SESSION_ID_UPDATED subscription (context.sessionId already captures on each selection) - Move logSelectPlacementsEvent after session ID is set to guarantee server receives sessionId - Remove dist files from tracking (release process builds these) - Remove "still" from test name Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
17c775b to
b5a58c5
Compare
Address PR review feedback to ensure logSelectPlacementsEvent fires in all code paths (catch, else), not just the happy path where sessionId resolves successfully. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The dist/ folder should not include changes from this PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
021b2a5
into
mparticle-integrations:development
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))
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Syncs the Rokt session ID back to mParticle so server-side integrations can link mParticle events to Rokt sessions via the Transactions v2 API.
selectPlacements()resolves, reads the session ID fromselection.context.sessionIdSESSION_ID_UPDATEDevents for subsequent session changesmParticle.getInstance().setIntegrationAttribute(181, { roktSessionId })to attach the ID to all future event batchesselectPlacementsare unaffectedTesting Plan
selectPlacements(), then checkmParticle.getInstance().getIntegrationAttributes(181)returns{ roktSessionId: '<session-id>' }integration_attributes.181.roktSessionId🤖 Generated with Claude Code