Skip to content

Instantly share code, notes, and snippets.

@lstude
Created April 11, 2014 19:27
Show Gist options
  • Save lstude/10494492 to your computer and use it in GitHub Desktop.
Save lstude/10494492 to your computer and use it in GitHub Desktop.
manually bucket new vs returning customer
1) Set up test variations - control, returning visitor, new visitor
2) Set a cookie in each variation - one for new, another for returning
3) For new customers: If cookie matches new, bucket user into new variation. Else, bucket them into returning variation.
4) For returning customers: If cookie matches returning, bucket user into returning variation. Else, bucket them into new version.
5) API: window['optimizely'].push(["bucketVisitor", experimentId, variationId]); // https://www.optimizely.com/docs/api#bucket-visitor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment