Using bucketVisitor API
We have a test to run which for various reasons we cannot use Optimizely to pick the variations for us. We will choose the variation and then use 'bucketVisitor' from the API to inform Optimizely, but have two questions.
1. The manual says that using this API method will tell Optimizely to ignore any 'targeting conditions'. Does it also ignore the traffic allocation percentages? What about the targeting Url?
2. When we decide that someone should get the A or B case, we call the 'bucketVisitor' and then load the Optimizely script. In the case where were decide the user is not a participant, we load no Optimizely code. This raises a problem in that someone on our team might accidentally load the Optimizely script on these pages, which would presumably cause Optimizely to bucket the visitor- without the real variations- and mess up the results. To work around this we would like to put the experiment into 'manual activation'. There is no documentation that details how the 'activate' API method interacts with 'bucketVisitor'. Does the order matter if we call both?
Hey @Edcom ,
1. Yes, if you force bucket a visitor into a variation, this overwrites all other functionality. The visitor will be included in the variation regardless of traffic allocation, audience conditions, and url targeting. Be sure to only call 'bucketVisitor' where appropriate
2. If there is no Optimizely snippet loaded on the page, the visitor would not see the experiment. How would someone on your team accidentally load the Optimizely code? If the Optimizely code was added without the 'bucketVisitor' call, then the normal targeting conditions for the experiment would take precedence.
Manual activation allows you to "activate" the experiment at a specific point in time. If you choose to go this route, then 'bucketVisitor' will still work as normal. The only order that matters is that 'bucketVisitor' *must* come before the snippet. The placement of the activate code does not matter. When you activate the experiment, the visitor will be included in the variation of the experiment specified in 'bucketVisitor'. Assuming you set your experiment to manual activation mode: if you have the 'bucketVisitor' and the snippet present but no call to 'activate', the experiment will not run at all.
Does this help clear things up? Let me know if you would like me to provide additional details.
Thanks for your answer. It was very helpful. We ended up setting the targeting url to a non-real url so that we wouldn't accidentally trigger the experiment. This seemed to work well. However we noticed one other side effect of manually bucketizing visitors: analytics integration did not work. We set an Omniture Evar in our experiment, but it did not record any data. Is that right or a bug? Do all analytic integrations not work when using bucketVisitor?
the manual bucketing does not have any impact on the analytics integration. Have you setup other experiment with an Omniture integration before?
For the integration to work you need to make sure that everything is added in the following sequence
Snippet installed > Experiment activated > activateSiteCatalyst Optimizely call > s.t() (SiteCatalyst tracking call)
If this is not the problem, can you maybe share the URL so I can have a look at the page