Skip to content

Conversation

@alex-magana
Copy link
Contributor

@alex-magana alex-magana commented Jan 6, 2026

Resolves JIRA: WS-1816

Summary

Update the Reverb source used to point to the centrally provided Reverb library.

Code changes

  • Change SIMORGH_REVERB_SOURCE to point to https://mybbc-analytics.files.bbci.co.uk/reverb-client-js/reverb-3.10.2.js across all environments.
  • Refactor resource hints header configuration and include Reverb origin in the Link header.
Screenshot 2026-01-14 at 20 57 26

Developer Checklist

  • UX
    • UX Criteria met (visual UX & screenreader UX)
  • Accessibility
    • Accessibility Acceptance Criteria met
    • Accessibility swarm completed
    • Component Health updated
    • P1 accessibility bugs resolved
    • P2/P3 accessibility bugs planned (if not resolved)
  • Security
    • Security issues addressed
    • Threat Model updated
  • Documentation
    • Docs updated (runbook, READMEs)
  • Testing
    • Feature tested on relevant environments
  • Comms
    • Relevant parties notified of changes

Testing

  • Manual Testing required?
    • Local (Ready-For-Test, Local)
    • Test (Ready-For-Test, Test)
    • Preview (Ready-For-Test, Preview)
    • Live (Ready-For-Test, Live)
  • Manual Testing complete?
    • Local
    • Test
    • Preview
    • Live

Additional Testing Steps

  1. Visit the sample assets below.
  2. From the Network tab of the Developer Tools, examine the Reverb source.
  3. Reverb should be fetched from the URL below.
    https://mybbc-analytics.files.bbci.co.uk/reverb-client-js/reverb-3.10.2.js
  4. Examine the page view ATI/Piano beacon; the query parameter s2 should read
    134 for MAGYARUL and 136 for ROMANIAN.
MAGYARUL
https://simorgh1.belfrage-preview.test.api.bbc.com/magyarul?renderer_env=test
https://simorgh1.belfrage-preview.test.api.bbc.com/magyarul.lite?renderer_env=test
https://simorgh1.belfrage-preview.test.api.bbc.com/magyarul/topics/cj69n7rdzrjt?renderer_env=live
https://simorgh1.belfrage-preview.test.api.bbc.com/magyarul/topics/cj69n7rdzrjt.lite?renderer_env=live
https://simorgh1.belfrage-preview.test.api.bbc.com/magyarul/articles/c8xr72zw50xo?renderer_env=live
https://simorgh1.belfrage-preview.test.api.bbc.com/magyarul/articles/c8xr72zw50xo.lite?renderer_env=live
ROMANIAN
https://simorgh1.belfrage-preview.test.api.bbc.com/romania?renderer_env=test
https://simorgh1.belfrage-preview.test.api.bbc.com/romania.lite?renderer_env=test
https://simorgh1.belfrage-preview.test.api.bbc.com/romania/articles/c993yged1xno?renderer_env=live
https://simorgh1.belfrage-preview.test.api.bbc.com/romania/articles/c993yged1xno.lite?renderer_env=live

Useful Links

Base automatically changed from WS-222-clean-up-CanonicalATIAnalytics to latest January 8, 2026 15:42
@alex-magana
Copy link
Contributor Author

alex-magana commented Jan 9, 2026

The failing idclient e2e under
Cypress E2E - Application & NextJS / cypress-run (22.x) (pull_request)
is resolved by #13603.

}}
/>
<>
<link href="https://mybbc-analytics.files.bbci.co.uk" rel="preconnect" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the Link header setting here: https://github.com/bbc/simorgh/blob/b45d6729d7dd7625a32e08bd356e1daa7cc54f06/ws-nextjs-app/utilities/addLinkHeader/index.ts

is it worth adding the domain to the list of origins to add to the Link header?

Copy link
Contributor Author

@alex-magana alex-magana Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for giving this a consideration Aaron.

I've made this change here to ensure analytics resources are
co-located. Additionally, having this clause here means the
pre-connection only happens on Canonical where Reverb is used.

Is the change you've recommended covered by the fact that ReverbTemplate
is used in _document.page.tsx?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addLinkHeader function will add the headers to all pages and app platforms, so canonical, AMP and Lite. If its best not to have it on those platforms then it may be best keeping it in ReverbTemplate.

The Link header will hint to the browser earlier though, so it may be more performant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the context Aaron.

Let me see if I can add https://mybbc-analytics.files.bbci.co.uk to the Link
header for Canonical and app. This way, Lite and AMP won't need to establish the
connection to a domain that's not in use on the page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @amoore108
The resource hints changes are now in place. I've updated the header
to use dns-prefetch for

<https://a1.api.bbc.co.uk>; rel="dns-prefetch",
<https://ping.chartbeat.net>; rel="dns-prefetch",
<https://mybbc-analytics.files.bbci.co.uk>; rel="dns-prefetch",

and preconnect for

<https://ichef.bbci.co.uk>; rel="preconnect"; crossorigin,
<https://static.files.bbci.co.uk>; rel="preconnect"; crossorigin,

Below are references to the changes I've made.

Resource Hints Array
https://github.com/bbc/simorgh/pull/13587/files#diff-15710eab1fc3b7ad35a96c08c970f92696d92b8eaecb60e437b6447ba67cb26f

Express
https://github.com/bbc/simorgh/pull/13587/files#diff-a648adb2a6aedfedf4cf1547a772c6ca609b390fc3a94293df7a6b38fe76d5ca

Next.js
https://github.com/bbc/simorgh/pull/13587/files#diff-a648adb2a6aedfedf4cf1547a772c6ca609b390fc3a94293df7a6b38fe76d5ca

I've cc'ed you on the Slack thread with the rationale behind the
resource hints changes I've made.

Thanks. 😄

Copy link
Contributor

@amoore108 amoore108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! LGTM.

@alex-magana alex-magana merged commit 0853e52 into latest Jan 19, 2026
13 checks passed
@alex-magana alex-magana deleted the WS-1816-ensure-correct-L2-tracking-for-Magyarul-Romania branch January 19, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants