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

Setup Content Pages Taxonomy Navigation AB Test (with services) #983

Merged
merged 7 commits into from
Jul 26, 2018

Conversation

vanitabarrett
Copy link
Contributor

@vanitabarrett vanitabarrett commented Jul 23, 2018

Trello: https://trello.com/c/X1RaZyOR/46-get-most-popular-services-content

This PR sets up the Content Pages AB test. The B variant will add taxonomy navigation to the bottom of content pages which are tagged to at least one live taxon (excluding HTML publications).

This PR also includes getting the data for the first supergroup section (Services) in that navigation section. Work done to tidy up the frontend rendering of this section will be done in a later commit.

Example tagged to one taxon

screen shot 2018-07-23 at 14 21 46

Example tagged to multiple taxons

screen shot 2018-07-23 at 14 22 09

Note: we are currently rendering all results in highlight boxes rather than making use of the document list component. This will be addressed in a later commit.

Examples:

You will need to have an extension like ModHeader installed in your browser to see the B Variant. The values should be:
Request Header Name: GOVUK-ABTest-ContentPagesNav
Request Header Value: B

Component guide for this PR:
https://government-frontend-pr-983.herokuapp.com/component-guide

sihugh and others added 7 commits July 23, 2018 12:33
This adds the AB testing logic we will hook into in subsequent commits.
We will be showing taxonomy-based navigation in variant B.

Rules for the AB test:
- Exclude HTML publications as these don't yet use the universal layout
- Included pages must be tagged to at least one live taxon.
Puts in place the supergroup (services) and rummager search logic in place ready to retrieve the most popular services.

We are also stubbing the rummager requests in the tests.

The test helpers in gds-api-adapters are all set to stub rummager responses.
This was done in alphagov/gds-api-adapters@ddae94d
as an explicit choice.
Retrieves the most popular services for the first taxon that content item is tagged to.
TODO: handle tagging to multiple taxons
This checks that the ab test works for content which is tagged to a single taxon.
Where content is tagged to more than one taxon, get the tagged content for all those taxons.

Note that this doesn't put any limit on the number of taxons allowed.  We may
want to set an arbitrary limit on this just to be on the safe side.
Copy link
Contributor

@sihugh sihugh left a comment

Choose a reason for hiding this comment

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

I'm happy with this. This is behind an AB test which is currently set to 100% on A (that is, to not show any of this stuff).

It will show the new navigation if you're in the B sample and viewing a page tagged to a live taxonomy that is not an HTML publication.

@vanitabarrett vanitabarrett merged commit 2356bcc into master Jul 26, 2018
@sihugh sihugh deleted the add-services-ab-2 branch August 1, 2018 07: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.

3 participants