Skip to content

WS-2831: Spike Reverb to Resonance - #14169

Draft
Isabella-Mitchell wants to merge 7 commits into
latestfrom
WS-2831-spike-reverb-resonance
Draft

WS-2831: Spike Reverb to Resonance#14169
Isabella-Mitchell wants to merge 7 commits into
latestfrom
WS-2831-spike-reverb-resonance

Conversation

@Isabella-Mitchell

@Isabella-Mitchell Isabella-Mitchell commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Resolves JIRA: N/A (Outcome of https://bbc.atlassian.net/browse/WS-2831 spike)

Summary

Pseudo code to outline the Simorgh implementation of Resonance once the lib is available via S3. This can be used as technical implementation guide for https://bbc.atlassian.net/browse/WS-2946 (Alongside the Resonance Confluence docs)

Code changes

  • Adds S3 distributed version of Resonance as a dependency (suitable for out open source repo)
  • Imports this into src/app/lib/analyticsUtils/sendBeacon/index.ts. Initialise Resonance here
  • sendBeacon is called in src/app/components/ATIAnalytics/canonical/index.tsx, so can pass in the page data here as a prop.
  • CanonicalATIAnalytics is called in src/app/components/ATIAnalytics/index.tsx
  • ATIAnalytics calls buildParams (NOTE - we recently changed this to use a ReverbContextProvider which calls buildParams. We probably want to follow this pattern for Resonance. This change was not acknowledged in the POC. If it's complex and possible to avoid for now - we can make a new ticket for this contextProvider, and just called buildParams directly here for now.)
  • Build Params calls src/app/components/ATIAnalytics/atiUrl/index.ts
  • ATIAnalytics component is rendered on each page

The below diagram explains the high level architecture of Reverb in these files - it is my own understanding so may contain mistakes
ReverbDiagram drawio

Testing

  1. List the steps required to test this PR.

Useful Links

@victranfield victranfield self-assigned this Jul 1, 2026
// add resonanceBeaconConfig to state? copilot says
// It is likely there to freeze the initial analytics payload so the page-view beacon is sent once per mount, not again on re-renders.
// so likely yes, e.g.
// const [resonanceBeaconConfig] = useState(resonanceParams);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That looks great, would it prevent duplicate page views?

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.

2 participants