Change Optimizely's Click and View Events To Be Unique To Components #9882
Labels
optimizely
Refinement Needed
This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test.
ws-london
Is your feature request related to a problem? Please describe.
Optimizely events are agnostic to which experiments have fired them, this means that if multiple experiments are running on the page at the same time, and fire the same events, they would track the events for all experiments that have that metric enabled in the Optimizely UI. For example, if the high impact promos and the Hindi recommendations experiment are running at the same time on an article page, a
component_click
event that gets fired from the high impact promo, will be registered for both experiments in Optimizely results.We're unsure if there is a feature within Optimizley's SDK that can associate fired events with certain experiments, as we can't find anything documented that points to this functionality.
Describe the solution you'd like
In the click and view tracker, we should change the
component_clicks
andcomponent_views
, to make use of the passed incomponentName
const, which will append to the start of the event name e.gfeatures_clicks
,features_views
. This will make events unique to components, and would mean these events will need to be created within Optimizely as well.simorgh/src/app/hooks/useClickTrackerHandler/index.jsx
Lines 61 to 72 in e8d935f
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Testing notes
[Tester to complete]
Dev insight: Will Cypress tests be required or are unit tests sufficient? Will there be any potential regression? etc
Checklist
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: