Skip to content

Conversation

@crisryantan
Copy link
Contributor

@crisryantan crisryantan commented Mar 5, 2025

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

  • This PR implements an MVP integration for the Rokt Launcher script via mParticle’s initForwarder function. The changes ensure that the Rokt SDK is loaded the resulting launcher is exposed globally for partner usage.

Testing Plan

  • Was this tested locally? If not, explain why.
  • This integration was validated locally using the npm run testEndToEnd command. During testing, I confirmed that the Rokt launcher script loads correctly and that the window.Rokt object is present. Additionally, the initForwarder function correctly assigns the launcher to the global scope, ensuring accessibility as expected.

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@crisryantan crisryantan removed the request for review from rmi22186 March 5, 2025 21:35
@crisryantan crisryantan requested a review from rmi22186 March 6, 2025 04:47
Copy link
Collaborator

@rmi22186 rmi22186 left a comment

Choose a reason for hiding this comment

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

great work getting this going! i have some minor comments. nothing blocking release though.

Comment on lines +57 to +66
if (window['Rokt'] && eventQueue.length > 0) {
for (
var i = 0;
i < eventQueue.length;
i++
) {
processEvent(eventQueue[i]);
}
eventQueue = [];
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a use case for an mparticle event to be passed to the Rokt SDK for processing? I don't think so. It doesn't hurt to have this, but if Rokt never processes mParticle events, then this can be removed.

Suggested change
if (window['Rokt'] && eventQueue.length > 0) {
for (
var i = 0;
i < eventQueue.length;
i++
) {
processEvent(eventQueue[i]);
}
eventQueue = [];
}

Co-authored-by: Robert Ing <ring@mparticle.com>
@alexs-mparticle alexs-mparticle merged commit 0a6194a into development Mar 7, 2025
3 of 4 checks passed
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.

5 participants