Skip to content

Conversation

@Jakeii
Copy link
Member

@Jakeii Jakeii commented Oct 15, 2025

What does this change?

Adding info and links for opting in/out and the dashboard to docs.

Fix opting in links in the dashboard and add info on opting in/out.

Fix some rendering bugs with the tests in the dashboard. Add a few visual features. Consolidate client and server side tests.

Add the ab-test frontend to the pnpm workspace

Why?

Screenshots

Before After
before after

@github-actions
Copy link

github-actions bot commented Oct 15, 2025

@github-actions
Copy link

github-actions bot commented Oct 15, 2025

@github-actions
Copy link

github-actions bot commented Oct 15, 2025

@Jakeii Jakeii added fix run_chromatic Runs chromatic when label is applied labels Oct 15, 2025
@Jakeii Jakeii marked this pull request as ready for review October 15, 2025 11:33
@Jakeii Jakeii requested a review from a team as a code owner October 15, 2025 11:33
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Oct 15, 2025
@Jakeii Jakeii force-pushed the jlk/ab-test-opt-in-links-docs branch from 603ecee to 77adb87 Compare October 15, 2025 13:04
@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Oct 15, 2025
@Jakeii Jakeii requested a review from a team October 15, 2025 13:10
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Oct 15, 2025

Use the opt-in and opt-out URL fragments to force yourself into or out of a test.

When opted-in, the test will override any cookie based assignment and you'll only be in the specified test group.
Copy link
Contributor

Choose a reason for hiding this comment

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

the test will override any cookie based assignment

Assume this relates just to the MVT ID cookie. Don't we use cookies to explicitly opt in to AB tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah you're right, will clarify!

These links are also in the [frontend admin](https://frontend.gutools.co.uk/analytics/ab-testing).

- Opt-in Example: `https://theguardian.com/ab-tests/opt/in/commercial-test-example:variant`
- Opt-out: `https://theguardian.com/ab-tests/opt/out`
Copy link
Contributor

Choose a reason for hiding this comment

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

Would we need to specify the test we are opting out of?

Suggested change
- Opt-out: `https://theguardian.com/ab-tests/opt/out`
- Opt-out: `https://theguardian.com/ab-tests/opt/out/commercial-test-example:variant`

Or would this opt out of all tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

Can only opt into one test at a time, so specifying for the opt out isn't necessary

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh interesting! Didn't realise that

Comment on lines 88 to 94
x={`${bar.x + 0.1}%`}
y={bar.y}
width={`${bar.width}%`}
width={`${bar.width - 0.2}%`}
height={BAR_HEIGHT}
>
<g class="bar">
<rect height={BAR_HEIGHT} width="100%" rx="4" />
<rect height={BAR_HEIGHT - 2} width="100%" rx="4" />
Copy link
Contributor

Choose a reason for hiding this comment

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

what are these extra numbers for

Copy link
Member Author

Choose a reason for hiding this comment

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

just to add a bit of margin around the test blocks

@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Oct 15, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Oct 15, 2025
@Jakeii Jakeii merged commit f339095 into main Oct 15, 2025
35 checks passed
@Jakeii Jakeii deleted the jlk/ab-test-opt-in-links-docs branch October 15, 2025 16:12
@gu-prout
Copy link

gu-prout bot commented Oct 15, 2025

Seen on PROD (merged by @Jakeii 8 minutes and 20 seconds ago) Please check your changes!

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

Labels

dotcom-rendering fix Departmental tracking: fix Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants