diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2015-02-17 13:40:48 +0000 |
---|---|---|
committer | Hakim Cassimally <hakim@mysociety.org> | 2015-02-17 13:51:58 +0000 |
commit | fb923da082116ca9b644c54be150c06611ff2d0b (patch) | |
tree | 8b8ca1c1d5833266c9dd5e929ea0889313bd3960 | |
parent | 2ffed24ccbd53d6d1b7381904c749ff6952ba24e (diff) |
[Stevenage] tracking code
-rw-r--r-- | templates/web/stevenage/header.html | 1 | ||||
-rw-r--r-- | templates/web/stevenage/tracking_code.html | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/templates/web/stevenage/header.html b/templates/web/stevenage/header.html index dbcc37866..0b3171808 100644 --- a/templates/web/stevenage/header.html +++ b/templates/web/stevenage/header.html @@ -23,6 +23,7 @@ [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] [% extra_js %] + [% INCLUDE 'tracking_code.html' %] </head> <body class="[% bodyclass | html IF bodyclass %]"> diff --git a/templates/web/stevenage/tracking_code.html b/templates/web/stevenage/tracking_code.html new file mode 100644 index 000000000..e7c2bafd6 --- /dev/null +++ b/templates/web/stevenage/tracking_code.html @@ -0,0 +1,16 @@ +[% IF c.config.BASE_URL == "https://www.fixmystreet.com" %] + +<script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + 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', 'UA-21613820-7', 'auto'); + ga('send', 'pageview'); + +</script> + +[% ELSE %] +<!-- Tracking code not inserted as "[% c.config.BASE_URL %]" not "https://www.fixmystreet.com" --> +[% END %] |