diff options
author | Struan Donald <struan@exo.org.uk> | 2019-07-29 16:32:15 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2019-10-21 14:27:42 +0100 |
commit | 50d0daa3f4d09f06d622d9c8f443d70a27098286 (patch) | |
tree | 374874d7883fa6ba69b7a5c9d1200e4552f9ddce | |
parent | 9f6895487fb32cb07a0d3e1f8337d2e6c3ee751c (diff) |
[Peterborough] add GA tracking code
Fixes mysociety/fixmystreet-commercial#1473
-rw-r--r-- | templates/web/peterborough/before_wrapper.html | 6 | ||||
-rw-r--r-- | templates/web/peterborough/header_extra.html | 1 | ||||
-rw-r--r-- | templates/web/peterborough/tracking_code.html | 15 |
3 files changed, 22 insertions, 0 deletions
diff --git a/templates/web/peterborough/before_wrapper.html b/templates/web/peterborough/before_wrapper.html new file mode 100644 index 000000000..506eafae4 --- /dev/null +++ b/templates/web/peterborough/before_wrapper.html @@ -0,0 +1,6 @@ +[% IF c.config.BASE_URL == "https://www.fixmystreet.com" %] +<!-- Google Tag Manager (noscript) --> +<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=UA-144500283-1" +height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> +<!-- End Google Tag Manager (noscript) --> +[% END %] diff --git a/templates/web/peterborough/header_extra.html b/templates/web/peterborough/header_extra.html index a008676e5..4aa99dd3c 100644 --- a/templates/web/peterborough/header_extra.html +++ b/templates/web/peterborough/header_extra.html @@ -1 +1,2 @@ +[% INCLUDE 'tracking_code.html' %] <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:900,400,700,300,100"> diff --git a/templates/web/peterborough/tracking_code.html b/templates/web/peterborough/tracking_code.html new file mode 100644 index 000000000..695aac833 --- /dev/null +++ b/templates/web/peterborough/tracking_code.html @@ -0,0 +1,15 @@ +[% IF c.config.BASE_URL == "https://www.fixmystreet.com" %] + +<!-- Global Site Tag (gtag.js) - Google Analytics --> +<script async src="https://www.googletagmanager.com/gtag/js?id=UA-144500283-1"></script> +<script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + + gtag('config', 'UA-144500283-1'); +</script> + +[% ELSE %] +<!-- Tracking code not inserted as "[% c.config.BASE_URL %]" not "https://www.fixmystreet.com" --> +[% END %] |