From 9dedae601a61d06024d7f73bb2a07dac7db7bc0f Mon Sep 17 00:00:00 2001 From: "Cathy J. Fitzpatrick" Date: Fri, 22 Mar 2013 02:43:49 -0600 Subject: [PATCH] Analytics crossdomain tracking --- index.php.template.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.php.template.txt b/index.php.template.txt index 9ba159d6c..4db1a2d95 100644 --- a/index.php.template.txt +++ b/index.php.template.txt @@ -152,8 +152,13 @@ if (!$psim) { _gaq.push(['_setDomainName', 'psim.us']); + _gaq.push(['_setAllowLinker', true]); _gaq.push(['_trackPageview']); - + if (window.history && history.replaceState && location.search.match(/__utm/)) { + _gaq.push(function() { + history.replaceState(null, '', location.pathname); + }); + } (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';