diff --git a/edivorce/apps/core/templates/partials/gtm_body.html b/edivorce/apps/core/templates/partials/gtm_body.html
new file mode 100644
index 00000000..3fbdc676
--- /dev/null
+++ b/edivorce/apps/core/templates/partials/gtm_body.html
@@ -0,0 +1,4 @@
+
+
+
\ No newline at end of file
diff --git a/edivorce/apps/core/templates/partials/gtm_head.html b/edivorce/apps/core/templates/partials/gtm_head.html
new file mode 100644
index 00000000..49ea732d
--- /dev/null
+++ b/edivorce/apps/core/templates/partials/gtm_head.html
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/edivorce/apps/core/templates/pdf/form1.html b/edivorce/apps/core/templates/pdf/form1.html
index 73e9a563..7164323c 100644
--- a/edivorce/apps/core/templates/pdf/form1.html
+++ b/edivorce/apps/core/templates/pdf/form1.html
@@ -16,10 +16,11 @@
Form F1
(Rule 2-2 (2))
diff --git a/edivorce/apps/core/templates/pdf/form35.html b/edivorce/apps/core/templates/pdf/form35.html
index 39cd5048..2ab53f41 100644
--- a/edivorce/apps/core/templates/pdf/form35.html
+++ b/edivorce/apps/core/templates/pdf/form35.html
@@ -15,6 +15,8 @@
+
+ {% include 'partials/gtm_head.html' %}
diff --git a/edivorce/apps/core/templates/pdf/form36.html b/edivorce/apps/core/templates/pdf/form36.html
index 31819dc4..952beba8 100644
--- a/edivorce/apps/core/templates/pdf/form36.html
+++ b/edivorce/apps/core/templates/pdf/form36.html
@@ -14,6 +14,8 @@
+
+ {% include 'partials/gtm_head.html' %}
diff --git a/edivorce/apps/core/templates/pdf/form38.html b/edivorce/apps/core/templates/pdf/form38.html
index 4dc65073..6ca1a19f 100644
--- a/edivorce/apps/core/templates/pdf/form38.html
+++ b/edivorce/apps/core/templates/pdf/form38.html
@@ -15,6 +15,8 @@
+
+ {% include 'partials/gtm_head.html' %}
diff --git a/edivorce/apps/core/templates/pdf/form38_we.html b/edivorce/apps/core/templates/pdf/form38_we.html
index 28615480..23e807d8 100644
--- a/edivorce/apps/core/templates/pdf/form38_we.html
+++ b/edivorce/apps/core/templates/pdf/form38_we.html
@@ -15,6 +15,8 @@
+
+ {% include 'partials/gtm_head.html' %}
diff --git a/edivorce/apps/core/templates/pdf/form52.html b/edivorce/apps/core/templates/pdf/form52.html
index cc9e7720..a10742de 100644
--- a/edivorce/apps/core/templates/pdf/form52.html
+++ b/edivorce/apps/core/templates/pdf/form52.html
@@ -15,6 +15,8 @@
+
+ {% include 'partials/gtm_head.html' %}
diff --git a/edivorce/apps/core/views/pdf.py b/edivorce/apps/core/views/pdf.py
index 3cdb1b5f..c7171fe2 100644
--- a/edivorce/apps/core/views/pdf.py
+++ b/edivorce/apps/core/views/pdf.py
@@ -41,7 +41,7 @@ def __render_form(request, form_name, context):
context["css_root"] = settings.FORCE_SCRIPT_NAME[:-1]
# render to form as HTML
- rendered_html = render_to_string('pdf/' + form_name + '.html', context=context)
+ rendered_html = render_to_string('pdf/' + form_name + '.html', context=context, request=request)
# if '?html' is in the querystring, then return the plain html
if output_as_html:
diff --git a/edivorce/settings/base.py b/edivorce/settings/base.py
index 317c9ea2..3e05da25 100644
--- a/edivorce/settings/base.py
+++ b/edivorce/settings/base.py
@@ -75,6 +75,7 @@ TEMPLATES = [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
+ 'edivorce.apps.core.context_processors.settings_processor'
],
},
},
@@ -126,3 +127,6 @@ FIXTURE_DIRS = (
)
BASICAUTH_ENABLED = False
+
+# Google Tag Manager (dev/test instance)
+GTM_ID = 'GTM-NJLR7LT'
diff --git a/edivorce/settings/openshift.py b/edivorce/settings/openshift.py
index 0bea348e..f400882a 100644
--- a/edivorce/settings/openshift.py
+++ b/edivorce/settings/openshift.py
@@ -64,6 +64,8 @@ if DEPLOYMENT_TYPE == 'test':
if DEPLOYMENT_TYPE == 'prod':
PROXY_URL_PREFIX = "/divorce"
REGISTER_URL = 'https://www.bceid.ca/directories/bluepages/details.aspx?serviceID=4483'
+ # Google Tag Manager (Production)
+ GTM_ID = 'GTM-W4Z2SPS'
FORCE_SCRIPT_NAME = PROXY_URL_PREFIX + '/'
STATIC_URL = PROXY_URL_PREFIX + '/static/'