Bucket people based on URL conditions

Status: Great Idea!
by igerber ‎05-21-2014 May 21, 2014

I'd like the ability to bucket people into a variation based on URL query string.


Here's my example. I'd like to run an experiment that actually starts with an A/B test through my email marketing system. I want to send two emails that run different special offers. Links from each email would have corresponding campaign codes in the query string.


I'd like to use the value of that campaign parameter to show the user the corresponding special offer.


That's just a specific example though. You can imagine running other campaigns - for example through Google adwords, touting different offers or similar.


Being able to plug in to the query string in the URL would allow me to run integrated tests spanning multiple systems.

Status: Great Idea!
Level 2

by gilbo
‎05-22-2014 May 22, 2014

I believe you could go to targeting and then select the visitor conditions to be based on either a query parameter or a specific url. 

If you create a url for each you could either use that whole url or the utm paramter. 


* I am new to this and could be wrong.

Level 1
by igerber
‎05-22-2014 May 22, 2014

Unfortunately not the case. Visitor conditions (which are morphing into Audiences) allow you to determine if someone is qualitfied to be in your experiment at all - not which variation they see once they're in an experiment.


From the article ( https://help.optimizely.com/hc/en-us/articles/200039685 ):


"Audiences allow you control which visitors can see your experiment, based on whether they match a list of conditions that you specify."

Level 2
by Dodiet
‎05-27-2014 May 27, 2014

This is a good suggestion for a future feature. The way I would currently tackle your use case is to create two different experiements. Each experiement would target one of the two URLs with your email campaign tag. I would then run the two experiements at the same time. For example:


Experiement 1

1. Target URL with 1st email parameter and run variation vs. original.


Experiement 2

1. Targe URL with 2nd email parameter and run variation vs. original.


Of course this is limited to this one use case and could get more complicated for other use cases. 


Level 1
by EricF
‎05-27-2014 May 27, 2014

If you don't mind making your experiment ID public you could create a variation for each offer and force the variation to appear by adding this to the email's outbound URL query:



[EXPERIMENT_ID] : This is the ID of the experiment you want to run, which can be found from the Optimizely Editor URL as well as the experiment Diagnostic Report (Options->Diagnostic Report)

[VARIATION_ID] : This is the variation which you want to run, which is 0 for the original, 1 for variation #1, 2 for variation #2, etc...



Level 2
by Optimizely
‎05-28-2014 May 28, 2014
Hi igerber
EricF already answered your question. I've ran integrated experiments that spanned across email marketing / PPC advertising and landing pages before.
The easiest way to implement this would be to use the URL parameters EricF mentions. So, in your email service provider's A/B testing tool, you'd use http://example.com/landingpage/?optimizely_x12345=0 for the original and http://example.com/landingpage/?optimizely_x12345=1 for the variation. People reaching the landing page will be bucketed into the correct variation and tracked accordingly.
If you don't want to use that parameter for some reason, you can also use Optimizely’s bucketing API on your page to make sure a visitor ends up in the variation you want to send them to: http://developers.optimizely.com/javascript/#bucket-visitor
That way, you could, for instance, write Javascript that puts people with a specific "utm_term" parameter in one variation.
by HeatherW
‎06-02-2014 June 2, 2014
Status changed to: Great Idea!
Level 2
by lkraav Level 4
‎07-20-2015 July 20, 2015
Does running the force variation parameter cause permanent bucketing into that variation? I need the experience bucketing to stick across multiple template page URLs such as different market search results. There's no way to use the bucketing API in my particular scenario because that requires backend setup (rules must be defined before optimizely snippet loaded) and for now backend code changes are off limits.
Level 4