Skip to content

Conversation

@alex-magana
Copy link
Contributor

@alex-magana alex-magana commented Dec 9, 2025

Resolves JIRA: WS-222

Summary

Phase out the legacy ATI/Piano code from the Simorgh codebase following successful migration
of page and component tracking to Reverb.

Code changes

  • Update Cypress e2e tests for Home Page, Live Radio, Most Read Page, OnDemand
    Audio, OnDemand TV and Topic Page to revert utility of useReverb config for the Express app.
  • Update atiAnalytics component event tracking assertions for the Express app.
cypress/e2e/specialFeatures/atiAnalytics/assertions/articleLiteSiteLink.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/billboard.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/featuresAnalysis.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/latestMedia.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/liveMedia.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/messageBanner.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/mostRead.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/navigation.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/podcastLinks.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/podcastPromo.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/portraitVideoCarousel.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/portraitVideoModal.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/radioSchedule.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/recentAudioEpisodes.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/recommendations.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/relatedContent.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/relatedTopics.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/scrollablePromo.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/share.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/socialEmbed.js
cypress/e2e/specialFeatures/atiAnalytics/assertions/topStories.js
ws-nextjs-app/cypress/e2e/articlePage/index.cy.ts
ws-nextjs-app/cypress/e2e/languagesPage/index.cy.ts
ws-nextjs-app/cypress/e2e/livePage/index.cy.ts
ws-nextjs-app/cypress/e2e/mediaAssetPage/index.cy.ts
ws-nextjs-app/cypress/e2e/photoGalleryPage/index.cy.ts
ws-nextjs-app/cypress/e2e/storyPage/index.cy.ts
  • Update atiAnalytics component event tracking assertions for the Next.js app.
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/articleLiteSiteLink.ts
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/featuresAnalysis.ts
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/latestMedia.ts
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/mostRead.ts
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/mostRead.ts
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/podcastPromo.ts
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/recommendations.ts
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/recommendations.ts
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/relatedTopics.ts
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/scrollablePromo.ts
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/socialEmbed.ts
ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/topStories.ts
  • Remove pageviewParams prop from AmpATIAnalytics tests.
src/app/components/ATIAnalytics/amp/index.test.tsx
  • Remove pageviewParams prop from CanonicalATIAnalytics.
src/app/components/ATIAnalytics/canonical/index.tsx
src/app/components/ATIAnalytics/types.ts
  • Remove redundant functions.
src/app/components/ATIAnalytics/atiUrl/index.ts
src/app/components/ATIAnalytics/beacon/index.ts
src/app/components/ATIAnalytics/canonical/getNoScriptTrackingPixelUrl/index.ts
src/app/components/ATIAnalytics/index.tsx
src/app/components/ATIAnalytics/params/buildParams/index.ts
src/app/components/ATIAnalytics/params/index.ts
src/app/contexts/EventTrackingContext/index.tsx
src/app/lib/analyticsUtils/staticATITracking/constructATIUrl/index.ts
  • Remove useReverb from event tracking hooks.
src/app/hooks/useClickTrackerHandler/index.jsx
src/app/hooks/useCustomEventTracker/index.tsx
src/app/hooks/useSwipeTracker/index.tsx
src/app/hooks/useViewTracker/index.tsx
src/app/lib/analyticsUtils/sendBeacon/index.ts
  • Add support for xtor tracking in the Lite site tracking code.
src/app/lib/analyticsUtils/staticATITracking/processClientDeviceAndSendStaticBeacon/index.ts
  • Remove useReverb from service config.
src/app/lib/config/services/<service_name>.ts
  • Remove useReverb from service config type definition.
src/app/models/types/serviceConfig.ts
getScreenInfo
getBrowserViewPort
getCurrentTime
getDeviceLanguage
getAtUserId
getPublishedDatetime
getContentId
getAtiUrl
getEventInfo
getThingAttributes
getCampaignType
getRSSMarketingString
getAffiliateMarketingString
getSLMarketingString
getEmailMarketingString
getDisplayMarketingString
getCustomMarketingString
getXtorMarketingString
getATIMarketingString

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

Tracking Requests

  1. Visit the sample pages below.
  2. Check that page view event beacons are fired.
  3. Check that component click and view event beacons are fired.
http://localhost:7080/arabic?renderer_env=live
http://localhost:7080/arabic/topics/cz9mm6r1q5et?renderer_env=live
http://localhost:7081/arabic/articles/cn5l501r46do?renderer_env=live
http://localhost:7081/arabic/articles/cn5l501r46do.lite?renderer_env=live
http://localhost:7081/arabic/articles/cn5l501r46do.amp?renderer_env=live

Data Persistence

  1. Visit Piano and confirm that tracking data is accessible
    via reports and data queries.

Useful Links

@alex-magana alex-magana changed the title WS-222: [Canonical] - Delete dead/unused ATI code in Simorgh WS-222: [CANONICAL] - Delete dead/unused ATI code in Simorgh Dec 9, 2025
Base automatically changed from WS-222-clean-up-AmpATIAnalytics to latest December 11, 2025 09:25
@alex-magana alex-magana force-pushed the WS-222-clean-up-CanonicalATIAnalytics branch from 5779395 to d4cf896 Compare January 5, 2026 15:24
Copy link
Contributor

@Isabella-Mitchell Isabella-Mitchell left a comment

Choose a reason for hiding this comment

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

Can we remove useReverb from https://github.com/bbc/simorgh/blob/WS-222-clean-up-CanonicalATIAnalytics/ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/index.ts#L186 (can see there were some recent changes here relating to homepage migration)

Copy link
Contributor

@Isabella-Mitchell Isabella-Mitchell 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 going over this on the call earlier. I think still have some way to go to understanding this work completely, but it makes sense as far as I can tell!

@alex-magana
Copy link
Contributor Author

Can we remove useReverb from https://github.com/bbc/simorgh/blob/WS-222-clean-up-CanonicalATIAnalytics/ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/index.ts#L186 (can see there were some recent changes here relating to homepage migration)

This has been resolved via #13582. useReverb is now no longer
referenced in ws-nextjs-app/cypress/e2e/specialFeatures/atiAnalytics/assertions/index.ts.
Thanks for the feedback Izzy!

Copy link
Contributor

@HarveyPeachey HarveyPeachey left a comment

Choose a reason for hiding this comment

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

Really great work on this Alex, just a couple of comments

Comment on lines +12 to +13
export const MIN_SIZE = 924;
export const MAX_SIZE = 1294;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!


export const assertBillboardComponentClick = ({
pageIdentifier,
contentType,
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this supposed to be removed from here?

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