-
Notifications
You must be signed in to change notification settings - Fork 236
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
WORLDSERVICE-418: Optimizely Experiment Lite Site CTA #12557
base: latest
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -26,6 +26,7 @@ export interface Translations { | |||
informationPageLink: string; | |||
dataSaving: string; | |||
articleDataSavingLinkText: string; | |||
experiment: Record<string, string>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯
a042d84
to
98e1ab5
Compare
const { enabled: showCTA } = useToggle('liteSiteCTA'); | ||
const viewRef = useViewTracker(eventTrackingData); | ||
const titleVariation = useOptimizelyVariation( | ||
OPTIMIZELY_CONFIG.flagKey, | ||
true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this boolean param meant to be here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh, I missed out a param.
<div | ||
css={[ | ||
styles.liteCTAContainer, | ||
!titleVariation && styles.displayNone, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up (I think) this means that users without JS (and possibly on Opera Mini extreme mode) will not have the displayNone styles removed. The blank fallback will be shown.
Since it's an experiment, we could follow the rationale that if a user is not in the experiment, then we will not show this component. But alternatively, we might want to have a fallback for non-JS users.
Resolves JIRA: WORLDSERVICE-418
Summary
Lead branch for lite site Optimizely experiment to test variations of the lite site CTA copy.
Example of experiment working for user:

Example of experiment tracking scrolls:

Example of click tracking:

We've checked that component view events are fired only once the user sees a CTA, events will not be fired for the loading div.
Code changes
Developer Checklist
Testing
Ready-For-Test, Local
)Ready-For-Test, Test
)Ready-For-Test, Preview
)Ready-For-Test, Live
)Additional Testing Steps
Useful Links