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

Add optional check for experiment cookie to persist previously seen variations (Fixes #93) #100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexgibson
Copy link
Member

Whilst traffic cop no longer sets cookies itself, there are circumstances where we might want to ensure a variation is seen again on repeat page visits once a visitor is entered into an experiment (such as a full page redesign).

This PR adds an optional check to read an experiment cookie that can be set by the initiating website. This enables websites to be responsible for handing cookie consent, and provided cookies are accepted, Traffic Cop can then more consistently show the same variation on repeat visits.

Testing:

  1. npm install && npm run build
  2. cd demo && npm install && npm start
  3. Open http://localhost:3030
  • Verify that each of the three demo pages show the same variations on repeat navigations to the base page.

@alexgibson alexgibson force-pushed the variation-cookie branch 2 times, most recently from 6a93aa6 to 95cd170 Compare August 1, 2024 13:20
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.

1 participant