-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More robust replacement of AB test content
As suggested by @hannako, we can make the AB test replacement less fragile by looking for a specific replacement placeholder in the content item, instead of replacing a particular bit of content. I've gone for a [mustache](https://mustache.github.io/) style replacement string of {{ab_test_find_utr_number_video_links}}. There's a possible future thought of doing other kinds of templating, so I think starting to socialise this syntax is a good idea. I've checked in the govspeak preview app, and the `{{...}}` syntax is ignored by govspeak so there should be no issue entering it in the publishing app. I've pulled the replacement strings out into the translation file so that they're easier to review / keep up to date. I've also switched to three A / B / Z variants, so we can do splits like 5% / 5% / 90% where we're measuring the difference between the two 5% samples and ignoring the 90% sample. This test is probably going to be 50% / 50%, so not strictly necessary, but this seems to be the idiomatic way to do it.
- Loading branch information
1 parent
588a57a
commit 0f30c12
Showing
3 changed files
with
37 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters