Skip to content

WS-2532-Run Search OJ ordering experiment - #14269

Open
Nabeel1276 wants to merge 6 commits into
latestfrom
WS-3011-setup-experiment-code-in-simorgh
Open

WS-2532-Run Search OJ ordering experiment#14269
Nabeel1276 wants to merge 6 commits into
latestfrom
WS-3011-setup-experiment-code-in-simorgh

Conversation

@Nabeel1276

@Nabeel1276 Nabeel1276 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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

  • List key code changes that have been made.

Testing

  1. List the steps required to test this PR.

Useful Links

@Nabeel1276 Nabeel1276 changed the title Search experiment setup [copilot] WS-2532-Run Search OJ ordering experiment Jul 27, 2026
Copilot AI review requested due to automatic review settings July 28, 2026 09:22

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.

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 SearchOjExperiment component that resolves an Optimizely variation and reports a validated SearchOjVariant back to the page.
  • Added experiment configuration (experiment name, allowed variants, and layout definitions) under ArticlePage/SearchOjExperiment/config.ts.
  • Updated ArticlePage to lazily resolve the experiment variant around the mid-article OJ area and pass experimentProps into Recommendations.

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.

Comment on lines +172 to +174
const hasReachedMidArticleOj = useNearViewport({
elementId: MID_ARTICLE_OJ_EXPERIMENT_TRIGGER_ID,
});
Comment thread src/app/pages/ArticlePage/SearchOjExperiment/config.ts Outdated
Comment thread src/app/pages/ArticlePage/SearchOjExperiment/config.ts Outdated
@pvaliani

Copy link
Copy Markdown
Contributor

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

@pvaliani

Copy link
Copy Markdown
Contributor

Will want to add the experiment here

'topic-discovery-curation-grid-promo',
so that we can get oj_clicks correctly logged

Similarly in

const experimentsForPageMetrics: ExperimentsForPageTypeMetrics = [
otherwise article_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?

@Nabeel1276

Copy link
Copy Markdown
Contributor Author

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

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)

@pvaliani

Copy link
Copy Markdown
Contributor

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

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

@Nabeel1276 Nabeel1276 self-assigned this Jul 28, 2026
import { isValidClick } from './clickTypes';

// allowlist of onward journey components that should feed the total oj clicks event
const OJ_COMPONENT_NAMES = [

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.

need to also add the non-portrait video curation component to these clicks

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.

4 participants