Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The server-side experiment lacks Optimizely activation, preventing impression attribution, while the empty page-metrics list disables completion and scroll-depth tracking for the still-enabled related-topic experiment.
2 open issues
What changed in this PR
Updates Simorgh’s homepage experiment configuration and analytics identifiers for new A/A tests, while cleaning up existing page-metric registrations.
Changes:
- Registers a server-side homepage test for eight services.
- Replaces the client-side homepage experiment identifier and updates its test expectations.
- Clears experiment registrations for article, media-article, and homepage metrics.
| File | Description |
|---|---|
ws-nextjs-app/utilities/experimentHeader/enabledExperimentsList.ts |
Adds the server-side test configuration. |
src/app/contexts/ReverbParamsContext/getEnrichedHomePageATIData/index.ts |
Updates the client-side experiment identifier and simplifies variable names. |
src/app/contexts/ReverbParamsContext/getEnrichedHomePageATIData/index.test.ts |
Updates expected analytics data for the renamed experiment. |
src/app/components/OptimizelyPageMetrics/experimentsForPageMetrics.ts |
Empties the page-metric experiment lists. |
Review effort: Balanced
| const testPageViewsVariant = useOptimizelyVariation({ | ||
| experimentName: testPageViewsExperimentName, | ||
| // EXPERIMENT: replace with the name of an active client side home page experiment | ||
| const experimentName = 'test_homepage_client_side_aa'; |
There was a problem hiding this comment.
why do we have to have a placeholder here?
There was a problem hiding this comment.
I don't want to remove all the code, as it will need to be put in again next time we have an experiment that uses it. Placeholder shows where people can put their experiment name when they next run an experiment, and also makes the tests function more realistically with a string instead of an empty string.
I could remove the placeholder and change the code to have an empty string where you insert your experiment name and a comment for people to say where to add it. But I thought maybe this is easier to understand? it means the test expect the placeholder string as well.
What do you think?
|
|
||
| const isTestPageViewsVariant = | ||
| testPageViewsVariant && testPageViewsVariant !== 'off'; | ||
| const isActiveVariant = experimentVariant && experimentVariant !== 'off'; |
There was a problem hiding this comment.
I guess this will always be off atm because we are using a placeholder
There was a problem hiding this comment.
yes but leave it here to avoid having to constantly change the code back and forth every time we have an experiment active

Resolves JIRA:
Summary
A very high-level summary of easily-reproducible changes that can be understood by non-devs, and why these changes where made.
Code changes
Testing
Useful Links