- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How to bucket an unbucketed user before rendering the page on server

How to bucket an unbucketed user before rendering the page on server
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
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 ?
Solved! Go to Solution.
Re: How to bucket an unbucketed user before rendering the page on server
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
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?
Re: How to bucket an unbucketed user before rendering the page on server
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
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)

Re: How to bucket an unbucketed user before rendering the page on server
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
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.