fix: Add MPID to selectPlacements call#15
Merged
alexs-mparticle merged 3 commits intodevelopmentfrom Apr 1, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for including the mpid value in the selectPlacements call.
- Updates the Rokt-Kit module to merge mpid from filteredUser into the attributes passed to launcher.selectPlacements.
- Adjusts and extends tests in test/src/tests.js to verify that the mpid is correctly added.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/src/tests.js | Updates and new test cases to confirm mpid is included in placement options. |
| src/Rokt-Kit.js | Adds retrieval of mpid from filteredUser and includes it in selectPlacements attributes. |
Comments suppressed due to low confidence (2)
src/Rokt-Kit.js:33
- Ensure that 'window.mParticle.Rokt.filters.filteredUser' is reliably defined before its use to retrieve the mpid, preventing potential runtime errors if its structure changes.
self.filteredUser = window.mParticle.Rokt.filters.filteredUser;
test/src/tests.js:219
- [nitpick] Consider extracting the hardcoded mpid value '123' into a shared constant to improve clarity and ease updates across multiple tests.
mpid: '123',
rmi22186
approved these changes
Mar 31, 2025
d204ab7 to
9d78006
Compare
rmi22186
reviewed
Apr 1, 2025
test/src/tests.js
Outdated
| }); | ||
|
|
||
| it('should filter user attributes through filterUserAttributes function before sending to selectPlacements', async () => { | ||
| it.skip('should filter user attributes through filterUserAttributes function before sending to selectPlacements', async () => { |
Collaborator
There was a problem hiding this comment.
unskip?
Suggested change
| it.skip('should filter user attributes through filterUserAttributes function before sending to selectPlacements', async () => { | |
| it('should filter user attributes through filterUserAttributes function before sending to selectPlacements', async () => { |
rmi22186
approved these changes
Apr 1, 2025
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
mpidtoselectPlacements()callTesting Plan
Rokt.selectPlacements()call