aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/default')
-rw-r--r--templates/web/default/footer.html4
-rw-r--r--templates/web/default/header.html1
-rw-r--r--templates/web/default/tracking_code.html24
3 files changed, 15 insertions, 14 deletions
diff --git a/templates/web/default/footer.html b/templates/web/default/footer.html
index a71909539..bd684b722 100644
--- a/templates/web/default/footer.html
+++ b/templates/web/default/footer.html
@@ -31,9 +31,7 @@
</p>
</div>
-[%# INCLUDE 'tracking_code.html' %]
-
-[%# INCLUDE 'debug_footer.html' %]
+[% INCLUDE 'debug_footer.html' %]
</body>
</html>
diff --git a/templates/web/default/header.html b/templates/web/default/header.html
index 8fffbda88..b2bfd27d7 100644
--- a/templates/web/default/header.html
+++ b/templates/web/default/header.html
@@ -14,6 +14,7 @@
<link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]">
[% END %]
+ [% INCLUDE 'tracking_code.html' %]
</head>
<body>
diff --git a/templates/web/default/tracking_code.html b/templates/web/default/tracking_code.html
index e5fc13793..b35fe2e4b 100644
--- a/templates/web/default/tracking_code.html
+++ b/templates/web/default/tracking_code.html
@@ -1,16 +1,18 @@
[% IF c.config.BASE_URL == "http://www.fixmystreet.com" %]
-<!-- Piwik -->
<script type="text/javascript">
-var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.mysociety.org/" : "http://piwik.mysociety.org/");
-document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
-</script><script type="text/javascript">
-try {
-var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 8);
-piwikTracker.trackPageView();
-piwikTracker.enableLinkTracking();
-} catch( err ) {}
-</script><noscript><p><img src="http://piwik.mysociety.org/piwik.php?idsite=8" style="border:0" alt=""/></p></noscript>
-<!-- End Piwik Tag -->
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-25102988-1']);
+ _gaq.push(['_setDomainName', '.fixmystreet.com']);
+ _gaq.push(['_trackPageview']);
+
+ (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';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script>
[% ELSE %]
<!-- Tracking code not inserted as "[% c.config.BASE_URL %]" not "http://www.fixmystreet.com" -->
[% END %]