Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Optimizely's Click and View Events To Be Unique To Components #9882

Open
2 tasks
HarveyPeachey opened this issue Feb 22, 2022 · 0 comments
Open
2 tasks
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

Comments

@HarveyPeachey
Copy link
Contributor

HarveyPeachey commented Feb 22, 2022

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 and component_views, to make use of the passed in componentName const, which will append to the start of the event name e.g features_clicks, features_views. This will make events unique to components, and would mean these events will need to be created within Optimizely as well.

if (optimizely) {
const overrideAttributes = {
...optimizely.user.attributes,
[`clicked_${componentName}`]: true,
};
optimizely.track(
'component_clicks',
optimizely.user.id,
overrideAttributes,
);
}

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

  • This feature is expected to need manual testing.

Checklist

Additional context
Add any other context or screenshots about the feature request here.

@HarveyPeachey HarveyPeachey added Refinement Needed This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test. optimizely ws-london labels Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant