From 0888a92075860e5adeca9e998f4b7c2156ad2a22 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Fri, 5 Sep 2014 14:51:08 +0200 Subject: [PATCH] [IMP] website: google analytic - use Automatic Cookie Domain Configuration. Automatic Cookie Domain Configuration simplifies cross domain tracking implementations by automatically writing cookies to the highest level domain possible when the auto parameter is used. When used on the domain www.example.co.uk, it will try to write cookies in the following order: co.uk example.co.uk www.example.co.uk Analytics.js will fail to write a cookie on co.uk but will succeed on example.co.uk. Since a cookie was succesfully written on a higher level domain, www.example.co.uk will be skipped. --- addons/website/views/website_templates.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index a6b91db0ced..f7915b98874 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -100,7 +100,7 @@ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - ga('create',_.str.trim('')); + ga('create', _.str.trim(''), 'auto'); ga('send','pageview');