fix: exclude passbackconversiontrackingid from selectPlacements attribute persistence - #108
Open
rmi22186 wants to merge 1 commit into
Open
fix: exclude passbackconversiontrackingid from selectPlacements attribute persistence#108rmi22186 wants to merge 1 commit into
rmi22186 wants to merge 1 commit into
Conversation
…bute persistence The passbackconversiontrackingid is a per-conversion click identifier injected into selectPlacements attributes. It should not be cached and reused across subsequent selectPlacements calls, so add it to the attribute persistence deny list.
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
passbackconversiontrackingidtoSELECT_PLACEMENTS_ATTRIBUTE_PERSISTENCE_DENY_LISTso it is stripped beforeselectPlacementsattributes are retained on the kit side.isSelectPlacementsAttributePersistenceDeniedunit test to cover the new key (case-insensitive).Why
passbackconversiontrackingidis a per-conversion click identifier injected intoselectPlacementsattributes by the core Web SDK (mParticle/mparticle-web-sdk#1295), sourced fromIntegrationCapture(the captured Rokt click ID). It is unique per conversion and must not be reused across subsequentselectPlacementscalls.What this specifically guards against (intra-session replay, not persistence)
This is not about surviving a page refresh.
passbackconversiontrackingidis never written to the mParticle user attribute store, and the kit'sthis.userAttributesis an in-memory property (nolocalStorage), so a refresh clears it regardless — and the core SDK only re-injects it when the value is still capturable (query param, or a cookie/localStorageRoktTransactionIdwritten by the Rokt tag).The real risk is within a single page load:
this.userAttributesaccumulates acrossselectPlacementscalls. Without this deny-list entry:?rtid=...; the core SDK injectspassbackconversiontrackingid. The kit sends it to the launcher and retains it inthis.userAttributes.passbackconversiontrackingidback in and send it to Rokt — attaching a per-conversion ID to placement calls it doesn't belong to.Adding it to the deny list ensures it is stripped before retention, so passback only ever rides a
selectPlacementscall when the core SDK freshly injects it from a live capture. This also keeps it consistent with the other one-shot per-conversion/commerce fields already on the list (conversiontype,totalprice,couponcode, etc.).Test plan
vitest run -t "SelectPlacementsAttributePersistence"passes (4/4).kitv_undefinedintegrationNamefailures remain (unrelated to this change; caused by the kit-version define not being injected under a rawvitest run).