Rich-text Reply

How to bucket an unbucketed user before rendering the page on server

mana 08-25-14
Accepted Solution

How to bucket an unbucketed user before rendering the page on server

[ Edited ]

Has anyone run into the issue of someone  hitting a page while the server side rendering logic depends on which side the visitor is bucketed ?

 

Here is a more detailed description: The rendering of the page for a test variation requires server side logic to be executed,  however, when users that are not bucketed directly visit the URL the bucketing cookie is unavailable  - What is the best way to get the users bucketed before visiting the URL under test ?

Level 1

michaelwei 08-28-14
 

Re: How to bucket an unbucketed user before rendering the page on server

Hi Mana,

So if I'm understanding your question correctly, you'd like to use Optimizely's bucketing mechanism to help your site create customized/personalized content for pages, is that correct? If so, Optimizely wasn't quite built with that in mind, but it's a very interesting use case!

The Optimizely snippet contains both the logic for bucketing as well as for executing the variation code. By default, there's no way to decouple this. Would it be possible for you to create an AJAX call that can generate the customized content after Optimizely loads?
Optimizely
mana 09-02-14
 

Re: How to bucket an unbucketed user before rendering the page on server

[ Edited ]

 

 

That was the Plan-B, can you point me to the minimal set of scripts that should be run for bucketing ?   (And yes, your description of the problem I am facing is right)

Level 1
michaelwei 09-02-14
 

Re: How to bucket an unbucketed user before rendering the page on server

[ Edited ]

All the bucketing is actually part of the Optimizely snippet, so that's the only script you'll have to include. To minimize the snippet size, you can remove jQuery if you're not utilizing it in experiments. For reference, Here's an article on the inner workings of the snippet, as well as some more information on jQuery in the snippet.

Outside of the snippet, you can also use the Javascript API to bucket users manually or using your own parameters.

Optimizely