WS-2532-Run Search OJ ordering experiment - #14269
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces a new client-side Optimizely experiment hook-up on ArticlePage to resolve and apply a “Search OJ ordering” experiment variant, and pass experiment tracking props into the mid-article onward-journey (Recommendations) module.
Changes:
- Added
SearchOjExperimentcomponent that resolves an Optimizely variation and reports a validatedSearchOjVariantback to the page. - Added experiment configuration (experiment name, allowed variants, and layout definitions) under
ArticlePage/SearchOjExperiment/config.ts. - Updated
ArticlePageto lazily resolve the experiment variant around the mid-article OJ area and passexperimentPropsintoRecommendations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/app/pages/ArticlePage/SearchOjExperiment/index.tsx |
New component to resolve Optimizely variation and report a validated experiment variant to the parent. |
src/app/pages/ArticlePage/SearchOjExperiment/config.ts |
New experiment configuration: name, variants, helpers, and layout mappings for variants. |
src/app/pages/ArticlePage/ArticlePage.tsx |
Integrates the experiment into the mid-article OJ (wsoj) rendering and passes experiment tracking props into Recommendations. |
| const hasReachedMidArticleOj = useNearViewport({ | ||
| elementId: MID_ARTICLE_OJ_EXPERIMENT_TRIGGER_ID, | ||
| }); |
|
Did the ticket brief get updated to match the experiment brief? Just highlighting so we have that consistency going forward - not strictly related to the PR but will be easier to review the work down the line |
|
Will want to add the experiment here so that we can getoj_clicks correctly logged
Similarly in otherwisearticle_completes won't log correctly
From looking at the dashboard it looks like Hausa is still included (audiences value) but i think it should be excluded for this work i believe? |
Which part of the ticket brief needed updating? Are you referring to the table with the Footer OJ order? That was in the other ticket (https://bbc.atlassian.net/browse/WS-2995) |
Yeah it was the render order alignment between the experiment brief and ticket - not strictly needed right now but was just highlighting it to make sure we've captured it and included topic discovery |
| import { isValidClick } from './clickTypes'; | ||
|
|
||
| // allowlist of onward journey components that should feed the total oj clicks event | ||
| const OJ_COMPONENT_NAMES = [ |
There was a problem hiding this comment.
need to also add the non-portrait video curation component to these clicks
Resolves JIRA: https://bbc.atlassian.net/browse/WS-2532
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