Skip to main content

Google Content Experiments

Solution: Experiment Code Missing the cookie domain name

Error Looks like:

Experiment code missing the cookie domain name declared in tracking code

This error happens when you have the old Google Analytics Code and the Content Experiments Code is of a later version. 

We recommend that you update the GA Code but if you cannot, add a domain declaration just above the Google Content Experiments Code like:

 

<script> _udn = ".example.com" </script> <!-- Google Analytics Content Experiment code -->


Google Content Experiments: Fixing Domain Validation Errors

When you set up your first Content Experiment, you might face a cookie domain name consistency error. This error is caused by using different domain name settings for Google Analytics and Content Experiments code. 

To fix the error, change the content experiment code to reflect the domain name settings used in Google Analytics Code.

Google Analytics Code

var _gaq = _gaq || [];

_gaq.push(['_setAccount', 'UA- Account Id']);