The Secret Recipe: What’s inside Optimizely’s Cookies

Anyone who knows me will also be aware of my love for Optimizely as a platform for split testing online. They have recently published their cookie recipe on-line.

First Party Cookies
A first party cookie is a cookie whose domain is set to your website (i.e. .yoursite.com). Optimizely sets the first party cookies to the highest level domain available on your site. This ensures that a user will be tracked through all subdomains etc. A brief summary of the first party cookies are as follows:

  • optimizelyEndUserId: Contains the end user’s unique identifier. Used by Optimizely to track information on a per user basis. This cookie has an expiration time of ten years to ensure that an end user will continue to be properly identified and thus prevent duplicated data even over long periods.
  • optimizelyBuckets: Stores the experiments and variations that a user has been bucketed into. Therefore, the user will continually see the same variation for every experiment on the page. The information is in the format {“Experiment_Id”:”Variation_Id”}. This cookie also has an expiration time of ten years.
  • optimizelyCustomEvents: Stores a mapping between a user’s unique identifier and the tracked events that the user has triggered (i.e. Clicked Signup). This information is stored in the form: {“EndUserId”:[“Event_Name_1″,”Event_Name_2”, …, “Event_Name_10”]}. It is able to hold up to ten events. Once this maximum is reached it will begin to drop off events as new ones come in starting with the oldest. This cookie also has an expiration time of ten years.
  • optimizelyRedirect: In the case that a user is re-directed for a variation, this will store the URL of the original page. It has a short expiration time of five seconds and–among other things–is used to prevent an infinite loop.

 

Third Party Cookies
The domain for these cookies is set to “log3.optimizely.com” (thus classifying them as a third party cookie in relation to your page). Optimizely employs these cookies in order to tracks users across domains and reconcile their actions to an Experiment/Variation on the original domain.

  • external_{{ProjectId}}_end_user_id: Stores the user’s unique identifier. When a user visits your page this will be created along side the optimizelyEndUserId cookie and will store the same information. This cookie also has an expiration time of ten years.
  • external_{{ProjectId}}_bucket_map: Contains the experiments and variations that a user has been bucketed into. Again, this will be created along side the optimizelyBuckets first party cookie and will store the same information. This cookie also has an expiration time of ten years.

Optimizely Editor Cookies

These are first party cookies that are only set when using Optimizely’s editor. Therefore, an end user of your webpage will never see these cookies:

  • optimizelyPendingLogEvents: Used as a cache of a user’s actions between tracking calls. When the tracking call is made the cookie will be wiped. This is to ensure that all events are tracked even if the user is committing actions in rapid succession.
  • optimizelyReferrer: Stores the document.referrer property.

Tags: , , , ,

The Secret Recipe: What’s inside Optimizely’s Cookies

3 Responses

  1. i loved reading this article.

    Lisa Del Ramos August 11, 2012 at 12:19 am #
  2. Say, you got a nice article.Really thank you! Great.

    Booker September 20, 2012 at 9:38 am #
  3. I just want to say I am very new to blogging and really savored your web-site. Very likely I’m likely to bookmark your blog post . You really come with beneficial writings. Regards for revealing your web-site.

    Huey Neiger October 8, 2012 at 10:19 pm #

Leave a Reply