diff --git a/opentech/public/utils/context_processors.py b/opentech/public/utils/context_processors.py index 482ef0e1123321f653f8d821746ac1840a6538f3..2444fdb1b890c218c1189a74039e68a935ecdbd2 100644 --- a/opentech/public/utils/context_processors.py +++ b/opentech/public/utils/context_processors.py @@ -1,12 +1,9 @@ -from django.conf import settings - from opentech.apply.home.models import ApplyHomePage from opentech.public.home.models import HomePage def global_vars(request): return { - 'GOOGLE_TAG_MANAGER_ID': getattr(settings, 'GOOGLE_TAG_MANAGER_ID', None), 'APPLY_SITE': ApplyHomePage.objects.first().get_site(), 'PUBLIC_SITE': HomePage.objects.first().get_site(), } diff --git a/opentech/templates/base-apply.html b/opentech/templates/base-apply.html index 9a1973e2617ad796f7b6cdf203b66bab764f03f6..1d2903dd3c9f6a98fe151682ed8308e221339c40 100644 --- a/opentech/templates/base-apply.html +++ b/opentech/templates/base-apply.html @@ -7,17 +7,6 @@ <meta name="description" content="{% if page.search_description %}{{ page.search_description }}{% else %}{{ page.listing_summary }}{% endif %}" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> - {% if GOOGLE_TAG_MANAGER_ID %} - {# To enable GTM code you need to specify GOOGLE_TAG_MANAGER_ID in production.py or in local.py #} - <!-- Google Tag Manager --> - <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','{{ GOOGLE_TAG_MANAGER_ID|escapejs }}');</script> - <!-- End Google Tag Manager --> - {% endif %} - <!-- favicons --> {% comment %} Generate favicons by http://realfavicongenerator.net using the following path: settings.STATIC_URL + img/favicons. @@ -45,14 +34,6 @@ <body class="{% block body_class %}light-grey-bg template-{{ page.get_verbose_name|slugify }}{% endblock %}"> {% hijack_notification %} - {% if GOOGLE_TAG_MANAGER_ID %} - {# To enable GTM code you need to specify GOOGLE_TAG_MANAGER_ID in production.py or in local.py #} - <!-- Google Tag Manager (noscript) --> - <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ GOOGLE_TAG_MANAGER_ID|escapejs }}" - height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> - <!-- End Google Tag Manager (noscript) --> - {% endif %} - {% include "includes/sprites.html" %} {% wagtailuserbar %} diff --git a/opentech/templates/base.html b/opentech/templates/base.html index 7d228a8b0964a354a701a02985f6297c7503da08..a8427016caa9b4ba516b494b1a26b6c9a37103dd 100644 --- a/opentech/templates/base.html +++ b/opentech/templates/base.html @@ -7,17 +7,6 @@ <meta name="description" content="{% if page.search_description %}{{ page.search_description }}{% else %}{{ page.listing_summary }}{% endif %}" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> - {% if GOOGLE_TAG_MANAGER_ID %} - {# To enable GTM code you need to specify GOOGLE_TAG_MANAGER_ID in production.py or in local.py #} - <!-- Google Tag Manager --> - <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','{{ GOOGLE_TAG_MANAGER_ID|escapejs }}');</script> - <!-- End Google Tag Manager --> - {% endif %} - <!-- favicons --> {% comment %} Generate favicons by http://realfavicongenerator.net using the following path: settings.STATIC_URL + img/favicons. @@ -70,13 +59,6 @@ </head> <body class="{% block body_class %}template-{{ page.get_verbose_name|slugify }}{% endblock %}"> - {% if GOOGLE_TAG_MANAGER_ID %} - {# To enable GTM code you need to specify GOOGLE_TAG_MANAGER_ID in production.py or in local.py #} - <!-- Google Tag Manager (noscript) --> - <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ GOOGLE_TAG_MANAGER_ID|escapejs }}" - height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> - <!-- End Google Tag Manager (noscript) --> - {% endif %} {% include "includes/sprites.html" %}