This article describes how Convert Experiments handles cross domain testing e.g. if your website spans multiple domain names. This is often the case if you are using a third party shopping card.
First Party Cookies
Before we get into the details, it’s important to understand the fundamentals of how Convert tracks visitors. Convert uses first party cookies to identify your site visitors. First party cookies are set with the same domain name that is in the location bar of the visitor’s browser. It is very important to understand that cookies can only be 'seen', and changed, by the domain that sets them. In fact, it is almost impossible for a website to set a cookie for a different website. This is due to a default security setting that most browsers have. Website A can not set a cookie for website B.
Third Party Cookies
Let’s take this knowledge and apply it to how Convert works. When a user lands on a page in your site the Convert Tracking Code looks for the Convert Tracking Cookies. If it finds the cookies then it updates them. If it does not find the cookies it sets them. Remember, if your website domain is www.convert.com, then the tracking code can recognize cookies with the www.convert.com domain and it can set cookies for the www.convert.com domain.
As the user continues their session the tracking code interacts with the tracking cookies. Continuing with our example, the user on our site is just about to click on a link to different domain, the third party e-commerce platform we use. They will leave our domain and go to the e-commerce provider’s domain. We’ve been tracking this user with a specific set of cookies on our domain. When the visitor leaves our domain we want them to take their cookies with them. The cookies identify them as a unique visitor, if they don’t take their cookies to the next domain then we will loose the rest of their session information and that’s not good.
Third party cookies were disabled in Convert Experiences on February 21st 2018, therefore you can use the methods described below.
Transfer Cookies to a Third Domain via Active Websites
In Convert Experiments we organize the experiments in Projects. A project is an entity that can contain any number of experiments and which has attached a certain number of websites to it (see screenshot below).
All the websites within one Convert Project share the cookies making it possible to achieve cross domain testing.
The way cookies are shared between domains is done by automatically passing cookies between domains that belong to the same project when visitor clicks on links or submits forms. Those cookies get passed to your other domains through GET variables. Two variables are being added to the query string in order to pass cookies:
- _conv_v ;
Do not allow Cross Domain Linking
Some systems do not allow extra query variables. If that is the case, you can deactivate automatic cookie passing inside your Project's Settings:
Pass Cookies Manually
It’s also possible to manually pass cookies to selected links or forms. All you need to do is to pass the _conv_v and _conv_s variables in the URL of the link or action of the form. Here is an example:
<a href="http://www.myothersite.com/page.html" onclick="window.location=this.href+'?_conv_v='+escape(convert.getCookie("_conv_v"))+'&_conv_s='+escape(convert.getCookie("_conv_s")); return false;" >