Use ATI View Tracking Public API in ATIAnalytics
Container
#5304
Labels
investigation
Refinement Needed
This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test.
technical-work
Technical debt, support work and building new technical tools and features
ws-articles
Tasks for the WS Articles Team
Is your feature request related to a problem? Please describe.
This issue intends to resolve a confusing and duplicated set of logic that made #5233 take longer to implement and opened us up to a buggy implementation going live.
ATIAnalytics
container, we build the params to send to ATI using the respective 'param builder' for each asset type:https://github.com/bbc/simorgh/blob/807a9816fdb8568ba28c29065ac9b7906b616967/src/app/containers/ATIAnalytics/index.jsx#L6..L10
https://github.com/bbc/simorgh/blob/807a9816fdb8568ba28c29065ac9b7906b616967/src/app/containers/ATIAnalytics/index.jsx#L17..L46
https://github.com/bbc/simorgh/blob/807a9816fdb8568ba28c29065ac9b7906b616967/src/app/containers/ATIAnalytics/index.jsx#L48..L53
An API already exists that does much of 1 and 2 above but we have not used it in
ATIAnalytics
:simorgh/src/app/containers/ATIAnalytics/params/index.js
Line 79 in 807a981
You can see the duplicated logic here https://github.com/bbc/simorgh/blob/807a9816fdb8568ba28c29065ac9b7906b616967/src/app/containers/ATIAnalytics/params/index.js#L38..L56
Describe the solution you'd like
Ideally we would like to use the API rather than duplicate logic, we did quickly try this but got quite a few errors, there may be some work getting the API fit for use.
Describe alternatives you've considered
Potentially the the API could be deleted instead, resolving the duplication. If we were to do this, we would have to consider where the currently unused 'click tracking' logic would go:
simorgh/src/app/containers/ATIAnalytics/params/index.js
Line 70 in 807a981
Testing notes
[Tester to complete]
Dev insight: Will Cypress tests be required or are unit tests sufficient? Will there be any potential regression? etc
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: