mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-14 15:05:14 +02:00
Include Google Analytics on production
This commit is contained in:
parent
3eef418ff8
commit
bfe97c38ba
2 changed files with 13 additions and 0 deletions
|
@ -31,3 +31,8 @@ def is_demo_site(request):
|
||||||
should not appear.
|
should not appear.
|
||||||
"""
|
"""
|
||||||
return {"IS_DEMO_SITE": settings.IS_DEMO_SITE}
|
return {"IS_DEMO_SITE": settings.IS_DEMO_SITE}
|
||||||
|
|
||||||
|
|
||||||
|
def is_production(request):
|
||||||
|
"""Add a boolean if this is our production site."""
|
||||||
|
return {"IS_PRODUCTION": settings.IS_PRODUCTION}
|
||||||
|
|
|
@ -3,6 +3,14 @@
|
||||||
<html class="no-js" lang="{{ LANGUAGE_CODE }}">
|
<html class="no-js" lang="{{ LANGUAGE_CODE }}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
{% if IS_PRODUCTION %}
|
||||||
|
<!-- Google tag (gtag.js) -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PZ5QSP6QPL"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-PZ5QSP6QPL');
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
<title>
|
<title>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue