aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/bathnes/tracking_code.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/bathnes/tracking_code.html')
-rw-r--r--templates/web/bathnes/tracking_code.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/templates/web/bathnes/tracking_code.html b/templates/web/bathnes/tracking_code.html
index a6d832e21..d7ad4679c 100644
--- a/templates/web/bathnes/tracking_code.html
+++ b/templates/web/bathnes/tracking_code.html
@@ -1,6 +1,6 @@
[% IF c.config.BASE_URL == "https://www.fixmystreet.com" %]
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-418184-9"></script>
-<script>
+<script nonce="[% csp_nonce %]">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
@@ -9,7 +9,8 @@
</script>
<!-- Google Tag Manager -->
-<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
+<script nonce="[% csp_nonce %]">
+(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
@@ -17,7 +18,8 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
<!-- End Google Tag Manager -->
<!-- Hotjar Tracking Code for www.bathnes.gov.uk -->
-<script> (function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:909367,hjsv:6}; a=o.getElementsByTagName('head')[0]; r=o.createElement('script');r.async=1; r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild(r); })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); </script>
+<script nonce="[% csp_nonce %]">
+(function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:909367,hjsv:6}; a=o.getElementsByTagName('head')[0]; r=o.createElement('script');r.async=1; r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild(r); })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); </script>
[% ELSE %]
<!-- Tracking code not inserted as "[% c.config.BASE_URL %]" not "https://www.fixmystreet.com" -->
[% END %]