Skip to content

config and clean up for test experiment - #14580

Open
LilyL0u wants to merge 6 commits into
latestfrom
config-and-clear-up-for-test-experiment-serve-side
Open

LilyL0u wants to merge 6 commits into
latestfrom
config-and-clear-up-for-test-experiment-serve-side

Conversation

@LilyL0u

@LilyL0u LilyL0u commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

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

  • List key code changes that have been made.

Testing

  1. List the steps required to test this PR.

Useful Links

Copilot AI balanced review requested due to automatic review settings October 30, 2026 12:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have to have a placeholder here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this will always be off atm because we are using a placeholder

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes but leave it here to avoid having to constantly change the code back and forth every time we have an experiment active

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants