Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AB tests for Self Assessment videos #3025

Merged
merged 1 commit into from
Jan 2, 2024
Merged

Conversation

davidtrussler
Copy link
Contributor

@davidtrussler davidtrussler commented Dec 22, 2023

Trello

This PR adds temporary A/B Tests to 3 pages on government-frontend:

N.B. The tests for the pay-weekly-monthly one are currently failing and need more work.

Page Variation A Variation B
File your Self Assessment tax return online Screenshot 2023-12-22 at 16 04 26 Screenshot 2023-12-22 at 16 04 09
Pay your Self Assessment tax bill Screenshot 2023-12-22 at 18 19 11 Screenshot 2023-12-22 at 18 19 11
Stop being self-employed Screenshot 2023-12-22 at 16 12 03 Screenshot 2023-12-22 at 16 11 52

@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3025 December 22, 2023 12:37 Inactive
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3025 December 22, 2023 12:58 Inactive
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3025 December 22, 2023 13:17 Inactive
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3025 December 22, 2023 13:23 Inactive
package-lock.json Outdated Show resolved Hide resolved
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3025 December 22, 2023 14:46 Inactive
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3025 December 22, 2023 17:55 Inactive
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3025 December 22, 2023 18:05 Inactive
@davidtrussler davidtrussler marked this pull request as draft December 22, 2023 18:22
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3025 December 22, 2023 22:35 Inactive
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3025 December 22, 2023 22:36 Inactive
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3025 December 22, 2023 22:37 Inactive
Copy link
Contributor

@hannako hannako left a comment

Choose a reason for hiding this comment

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

Great work David and Anna! This looks good to me. I checked the pages when you published the placeholder strings on integration and used the chrome extension to toggle variants - it all seemed to be working fine.

Before merging, please could you either combine the commits into a single one, or create one commit per AB test - whichever you prefer.

Because I've pushed a commit to fix your failing tests, you might want to get another person to give the work a once over before merging

Copy link
Contributor

@richardTowers richardTowers left a comment

Choose a reason for hiding this comment

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

Mostly looks good to me - it's tempting to suggest refactoring out the duplication (e.g. by pulling the placeholders / test names / base paths / dimensions from a config file), but that's a step towards normalising this kind of work, which I'm still reluctant to take. I prefer the more brutalist approach of just repeating the code (for now at least).

The one thing I'm not sure about is whether it's okay to reuse the same "dimension" (47) for all of the tests. I'm told this doesn't make any difference in the GA4 world anyway, but I'd appreciate a steer from a Performance Analyst on whether it would make their lives easier if we used different dimensions for different tests.


stub_content_store_has_item(content_item["base_path"], content_item)

request.headers["HTTP_GOVUK_ABTEST_SAVIDEORETURN1"] = "A"
Copy link
Contributor

Choose a reason for hiding this comment

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

Turns out we've created a with_variant helper method which does this in a neater way - we could consider using it here

https://github.com/alphagov/govuk_ab_testing/blob/main/README.md#minitest

@davidtrussler
Copy link
Contributor Author

Mostly looks good to me - it's tempting to suggest refactoring out the duplication (e.g. by pulling the placeholders / test names / base paths / dimensions from a config file), but that's a step towards normalising this kind of work, which I'm still reluctant to take. I prefer the more brutalist approach of just repeating the code (for now at least).

The one thing I'm not sure about is whether it's okay to reuse the same "dimension" (47) for all of the tests. I'm told this doesn't make any difference in the GA4 world anyway, but I'd appreciate a steer from a Performance Analyst on whether it would make their lives easier if we used different dimensions for different tests.

Hello @richardTowers We discussed the dimension earlier - see this thread on Slack, so it seems that it is fine to use the same value for all the tests.

- log-in-file-self-assessment-tax-return
- pay-self-assessment-tax-bill/pay-weekly-monthly
- stop-being-self-employed
@anatron anatron force-pushed the AB-Tests_SA-Videos branch from 547ed99 to dccc08c Compare January 2, 2024 11:12
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3025 January 2, 2024 11:12 Inactive
@richardTowers richardTowers marked this pull request as ready for review January 2, 2024 11:18
@richardTowers richardTowers changed the title Ab tests sa videos AB tests for Self Assessment videos Jan 2, 2024
Copy link
Contributor

@richardTowers richardTowers left a comment

Choose a reason for hiding this comment

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

Thanks folks! Happy for this to be merged now - because of the if ... @content_item.current_part_body.include?(placeholder) conditional it won't do anything until the placeholder is in place, so we can deploy it everywhere and test in lower environments by updating the content.

@davidtrussler davidtrussler merged commit 543f082 into main Jan 2, 2024
12 checks passed
@davidtrussler davidtrussler deleted the AB-Tests_SA-Videos branch January 2, 2024 14:18
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.

5 participants