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

WIP - Move AB test configuration into YAML #3033

Closed
wants to merge 5 commits into from

Conversation

richardTowers
Copy link
Contributor

This is an idea / illustration of an approach for doing AB tests of content in a slightly more maintainable way.

I still really don't like having them hard-configured in the codebase, so I'm not actually in favour of merging this.

What I'm trying to show is that if we provide government-frontend with the right bits of config, it's capable of dynamically adding the AB tests needed for a particular content item. If we can do that with a YAML file, then we could potentially do it with information on the content item itself.

I'm imagining a world where we have something like:

{
  ...
    "first_published_at": "2016-02-26T11:53:52Z",
    "links": {
      "ab_tests": [
        {
          "name": "FindUtrNumberVideoLinks",
          "dimension": 61,
          "variants": [
            ...

in the content item, and the code works out everything from that.

We could also have something listening to the publishing queue and configuring the Fastly dictionaries whenever this linked item updated.

If this idea is popular, I'll write it up as an RFC.

@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3033 January 4, 2024 18:44 Inactive
This is an idea / illustration of an approach for doing AB tests of
content in a slightly more maintainable way.

I still really don't like having them hard-configured in the codebase,
so I'm not actually in favour of merging this.

What I'm trying to show is that if we provide government-frontend with
the right bits of config, it's capable of dynamically adding the AB
tests needed for a particular content item. If we can do that with a
YAML file, then we could potentially do it with information on the
content item itself.

I'm imagining a world where we have something like:

    {
      ...
        "first_published_at": "2016-02-26T11:53:52Z",
        "links": {
          "ab_tests": [
            {
              "name": "FindUtrNumberVideoLinks",
              "dimension": 61,
              "base_paths": ["/find-utr-number"],
              "variants": [
                ...

in the content item, and the code works out everything from that.

We could also have something listening to the publishing queue and
configuring the Fastly dictionaries whenever this linked item updated.

If this idea is popular, I'll write it up as an RFC.
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3033 January 4, 2024 18:46 Inactive
This is in a separate config file in this branch
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3033 January 4, 2024 18:51 Inactive
... I've deleted the translations now, which broke the tests.
We don't need to worry about allowlisting base paths once the config is
coming from the content-item
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3033 January 5, 2024 11:23 Inactive
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.

2 participants