Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Analytics settings #760

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Next Next commit
Move analytics code into its own template
  • Loading branch information
CM Lubinski committed Nov 30, 2015
commit 315dcfcb65e42e1a964e2d837ecc921ae72c6599
12 changes: 12 additions & 0 deletions regulations/templates/regulations/analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% comment %}
Analytics tags. Override for different IDs
{% endcomment %}
<!-- Google Tag Manager -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KMMLRS"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(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=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KMMLRS');</script>
<!-- End Google Tag Manager -->
10 changes: 1 addition & 9 deletions regulations/templates/regulations/base.html
Original file line number Diff line number Diff line change
@@ -54,15 +54,7 @@
<!--[if IE 9]> <body class="lt-ie10"> <![endif]-->
<!--[if gt IE 9]><!--><body><!--<![endif]-->

<!-- Google Tag Manager -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KMMLRS"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(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);
})(window,document,'script','dataLayer','GTM-KMMLRS');</script>
<!-- End Google Tag Manager -->
{% include "regulations/analytics.html" %}

{% block body %}
{% endblock %}