Add mParticle consent sync configuration and API URL#28691
Open
andresilva-guardian wants to merge 1 commit intomainfrom
Open
Add mParticle consent sync configuration and API URL#28691andresilva-guardian wants to merge 1 commit intomainfrom
andresilva-guardian wants to merge 1 commit intomainfrom
Conversation
Contributor
MaelGNM
reviewed
Mar 31, 2026
| SwitchGroup.Privacy, | ||
| "mparticle-consent-sync", | ||
| "Enables syncing of browser consent state to mParticle for paid media targeting", | ||
| owners = group(Commercial), |
Contributor
There was a problem hiding this comment.
I don't know how ownership is defined, but Commercial doesn't seem like the right value here.
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.
What is the value of this and can you measure success?
This prepares the frontend to support a new mParticle consent sync feature in dotcom-rendering. Without these changes, DCR has no way to know whether the feature is enabled or which API endpoint to call. Success is measured by dotcom-rendering being able to read
window.guardian.config.switches.mparticle-consent-syncandwindow.guardian.config.page.mparticleApiUrlcorrectly once the switch is turned on.What does this change?
Two small additions, both inert until the switch is explicitly enabled:
New feature switch
mparticle-consent-sync(PrivacySwitches.scala)Added to the
Privacyswitch group withsafeState = OffandexposeClientSide = true. This serialises intowindow.guardian.config.switchesin the page HTML. The switch defaults to OFF and is not enabled in any environment by this PR.New page config value
mparticleApiUrl(configuration.scala, JavaScriptPage.scala)Added an
object mparticletoConfigurationthat readsmparticle.api.urlfrom the parameter store as anOption[String]. The value is conditionally emitted intowindow.guardian.config.pageonly when configured:https://mparticle-api.support.guardianapis.comhttps://mparticle-api-code.support.guardianapis.comNo existing behaviour is changed.
Screenshots
N/A — no UI changes.
Checklist
data/databasefiles generated by tests are committed with this PR (the tests will fail in CI if you've forgotten to do this)