feat: Measure ad-block rate via control domain init signal#61
Merged
mattbodle merged 1 commit intodevelopmentfrom Mar 12, 2026
Merged
feat: Measure ad-block rate via control domain init signal#61mattbodle merged 1 commit intodevelopmentfrom
mattbodle merged 1 commit intodevelopmentfrom
Conversation
e82073c to
653332d
Compare
Fire two hidden iframes from the mParticle kit during launcher initialization to compare signal counts between the existing (potentially blocked) domain and a control domain (apps.roktecommerce.com). - Add createAutoRemovedIframe helper and sendAdBlockMeasurementSignals - Call from initRoktLauncher after GUID is reliably available - 10% sampling rate, strips query/hash from pageUrl - 9 new tests covering iframe creation, sampling, GUID gating, and integration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
653332d to
4d6c493
Compare
rmi22186
approved these changes
Mar 11, 2026
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
apps.rokt.com) — may be blocked by ad blockersapps.roktecommerce.com(control domain) — not on any block listsinitRoktLauncher(after launcher is attached), ensuringwindow.__rokt_li_guid__is reliably availablepageUrlis stripped of both query params and hash fragments to avoid leaking sensitive stateChanges
src/Rokt-Kit.js: AddcreateAutoRemovedIframehelper,sendAdBlockMeasurementSignalswith host hash gating,djb2hash function, call frominitRoktLauncher, expose viatestHelperstest/src/tests.js: 10 new tests covering iframe creation, auto-removal, sampling, GUID gating, hostname gating, fragment stripping, and integration-level init behaviorCompanion PR
ecommerce-api changes (new
wsdkInitControlStartmetric,isControlquery param): https://github.com/ROKT/ecommerce-api/pull/2377Test plan