Skip to content

Conversation

akinsola-guardian
Copy link
Contributor

@akinsola-guardian akinsola-guardian commented Aug 11, 2025

What are you changing?

This PR is the first step for temporarily switching to Sourcepoint's geolocation. This change sits behind an ab-test which will be pointing to the Sourcepoint test environment by updating the config for user's opted in to the test. This ab-test allows the commercial team and stakeholders in Australia and United States to test potential impacts to advertising. To implement the ab-test, the cmp.init takes the boolean isInSourcepointGeolocationTest.

To effectively switch to Sourcepoint's geolocation, we must:

  • Update the SP config in @guardian/libs
  • Change the Sourcepoint scenario to rely on the SP's geolocation instead of targetting params we pass using the config.
  • Update the USNAT and GDPR vendor list to restrict access only to countries defined. i.e. USNAT for US, TCF2.2/GDPR for UK and ROW.

For all users, the behaviour should continue to use our geolocation to determine the banner and vendor list interacted with.

For users opted in, this PR will:

  • Temporarily load all stubs (tcfv2, usnat, ccpa) regardless of location.
  • Load all jurisdiction config objects to allow Sourcepoint to choose depending on their own geolocation services.
  • Sending jurisdiction mismatch to Ophan using CONSENT_GEOLOCATION_MISMATCH

To complete the switch to Sourcepoints geolocation we would:

  • Update the Sourcepoint scenario to use their geolocation instead of our target params.
  • Update the vendor list to restrict/allow by country.

Why?

  • Temporarily switching to Sourcepoint's geolocation to log geolocation/jurisdiction mismatches for a time period of week.
  • There are mismatches between the data sent to Ophan and the data streamed to us by Sourcepoint.

Rollout plan

This is a redo of a previously rolled back commit: #2109

Copy link

changeset-bot bot commented Aug 11, 2025

🦋 Changeset detected

Latest commit: 146d4c9

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Tip

Once this PR is ready to go, add the run_chromatic label to run the Chromatic tests.

This saves us a lot of money by not running the tests before we need them.

@github-actions github-actions bot added 📦 npm Affects a @guardian package on NPM @guardian/libs labels Aug 11, 2025
@akinsola-guardian akinsola-guardian changed the title Al sp geolocation test Use Sourcepoint geolocation test Aug 11, 2025
@akinsola-guardian akinsola-guardian added the 🐥 Canaries Triggers canary releases of any packages with changesets waiting. label Aug 11, 2025
Copy link
Contributor

Copy link
Contributor

Copy link
Contributor

Copy link
Contributor

@akinsola-guardian akinsola-guardian marked this pull request as ready for review August 21, 2025 11:29
@akinsola-guardian akinsola-guardian requested review from a team as code owners August 21, 2025 11:29
Copy link
Contributor

Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐥 Canaries Triggers canary releases of any packages with changesets waiting. @guardian/libs 📦 npm Affects a @guardian package on NPM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant