Skip to content

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

Merged
pvaliani merged 29 commits into
latestfrom
WS-3011-setup-experiment-code-in-simorgh
Aug 7, 2026
Merged

WS-2532-Run Search OJ ordering experiment#14269
pvaliani merged 29 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

  • Sets up the client-side Search OJ Optimizely experiment with seven validated variations
  • Activates the experiment when the mid-article Recommendations OJ enters view
  • Adds tracking for OJ clicks, including portrait and standard video curations
  • Enables page-view, article-completion and scroll-depth metrics
  • Maps each assigned variation to its matching mobile OJ layout with a safe control fallback
  • Sends the newswb_ws_oj_order_referrer_search activation event to Piano when Optimizely returns a valid variation

Code changes

  • See files changed

Testing

  1. Run the app locally with yarn dev
  2. Open http://localhost:7081/arabic/articles/ce8l40gnk41o?renderer_env=live&debugReferrer=search in a mobile viewport
  3. Scroll until the mid-article Recommendations OJ enters view
  4. Confirm Optimizely assigns a variation and the matching OJ layout appears
  5. Filter browser developer tools for xiti to check Piano events
  6. Scroll through and click each available OJ, confirming its view and click events are logged
  7. Confirm the newswb_ws_oj_order_referrer_search activation event is logged once with the assigned variation

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 thread src/app/pages/ArticlePage/ArticlePage.tsx Outdated
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
Comment thread src/app/hooks/useClickTrackerHandler/index.jsx
@pvaliani pvaliani self-assigned this Aug 5, 2026
Comment on lines +27 to +32
// these are included for now so possible search oj clicks are not missed
// remove any that are outside the final experiment brief
'topic-discovery-more-about-link',
'location-based-topic-oj',
'portrait-video-carousel-article',
'video-curation-grid',

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.

We should check against the brief which of these we need to remove after we are done testing. (assuming those code comments are still true!)

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.

This has been addressed in a sub task for the ticket to do clean-up after the AA test

@pvaliani
pvaliani merged commit 4f43841 into latest Aug 7, 2026
17 checks passed
@pvaliani
pvaliani deleted the WS-3011-setup-experiment-code-in-simorgh branch August 7, 2026 09:42
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.

7 participants