Convert Experiences Tracking Cookies Structure


Currently we are using three cookies in order to track visitor experiments. These cookies are a small bit of text that accompanies requests and pages as they go between the Web server and browser. The cookie contains information that Convert application can read whenever the user visits the site. So in that sense they are necessary to store user-specific information.

Below you will find more details for these three cookies.

_conv_v

This cookie is the visitor centric cookie that has a lifetime of max 6 months from the last update time. It is a string of star(*) separated pieces; each piece is a string that contains key and value strings glued together by colon (:). Here is a list of used keys:

    • vi : random number, when filled means it's a returning visitor;

    • sc : sessions count; number of session for this visitor;

    • cs : current session start timestamp

    • fs : first session start timestamp

    • pv : number of pageviews for this visitor across all sessions

    • ps : previous session start timestamp

    • seg:  the IDs of project-level segments that this visitor belongs to 
    • exp : json like structure of all experiments presented to this visitor together with the goals triggered for each one of them. Replacing dot (.) with colon (:) , hyphen (-) with comma (,) and quoting all the keys and values it becomes a valid JSON. Something like this could be used to transform it into a valid JSON:


  data = data.replace(/-/g,","); //getting back the comas
  data = data.replace(/\./g,":"); //getting back the column
  data = data.replace(/([a-z0-9]+):/g,'"$1":'); //bringing back quotes

This json has as keys the experiments IDs and values has objects where the key “v” represents the variation ID and the key “g” represents the goals triggered for that experiment;

example cookie value: vi:1374074822644-0.8675333885475993*sc:2*cs:1374079443*fs:1374074823*pv:4*seg:{100246.1}*exp:{10001236.{v.10008683-g.{10001841.1}}-10001237.{v.10008687-g.{10001841.1}}}*ps:1374074823

_conv_s 

This cookies is session centric cookie that has a lifetime of 20 minutes since the last update (last browsing activity). It is stored in the same structure as the one above, having the following keys:

    • si - session ID; starts at 1 and increases with each new session

    • pv - number of pageviews in the current session

example cookie value: si:2*pv:1

_conv_r 

This cookie holds the referral data for the current visitor. This is overwritten each time visitor comes from a new referrer. Structure same as above using the following keys:

    • s : source name - domain name of the referrer or the provided value through the corresponding utm variable

    • m : referral medium  or the provided value through the corresponding utm variable

    • t : referrer search terms automatically picked from search engines or manually fed through the corresponding utm variable

example cookie value: s:www.google.com*m:organic*t:ab testing

Size Limits

According to Microsoft, most browsers will allow cookies of up to 4096 bytes and again, most browsers only allow you to store up to 20 cookies per site.  The oldest cookie would be discarded if trying to store more than the limit. You can find a reference here: https://msdn.microsoft.com/en-us/library/ms178194.aspx.

AWS Persistent Cookies

We cannot write persistent cookies on some public domains such as amazonaws.com. In cases such as this you would have to use a domain that you own in order to run experiments. 

Have more questions? Submit a request

Comments