-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add scripts for gtm tags for eta * update hof version to 20.2.19 * 20.2.20 * small fix to gtm tag script * update hof version 20.2.21 * - add missing comma in dataLayer push payload - add function to sanitize page pathnames in dataLayer payload events * 20.2.22 * add scripts for gtm tags for eta * 20.2.20 * small fix to gtm tag script * update hof version 20.2.21 * - add missing comma in dataLayer push payload - add function to sanitize page pathnames in dataLayer payload events * 20.2.22 * - fix linting errors - add environmentType template variable for pageLoad event * - upgrade beta version to 20.2.24 - add validation that cookies are accepted before running GTM snippets * - upgrade beta version to 20.2.26 - move gtm snippet from body to head in gov-uk html template - validate cookies accepted before running gtm * fix linting errors * remove slash * 20.2.28 - fix gtm datalayer snippet * apply conditional logic for "dataLayer" snippet to only show in ETA and not other forms * set hof version to 20.2.20
- Loading branch information
1 parent
9ed6e9f
commit 3a2fe40
Showing
7 changed files
with
67 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,6 @@ | |
ga('govuk_shared.send', 'pageview') | ||
{{/gaCrossDomainTrackingTagId}} | ||
} | ||
|
||
</script> | ||
{{/gaTagId}} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,30 @@ | ||
{{#gtmTagId}} | ||
{{#cookiesAccepted}} | ||
{{#isETA}} | ||
<!-- Google Tag Manager Data Layer for ETA --> | ||
<script {{#nonce}}nonce="{{nonce}}"{{/nonce}}> | ||
var dataLayer = window.dataLayer || []; | ||
dataLayer.push({ | ||
'event': 'pageLoad', | ||
'pageName': 'ETA | Customer Contact Webform | {{gtm-page}}', | ||
'applicationType': 'ETA | Customer Contact', | ||
'environmentType': '{{environmentType}}' | ||
}); | ||
</script> | ||
<!-- End Google Tag Manager Data Layer for ETA --> | ||
{{/isETA}} | ||
|
||
<!-- Google Tag Manager --> | ||
<script {{#nonce}}nonce="{{nonce}}"{{/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); | ||
})(window,document,'script','dataLayer','{{gtmTagId}}'); | ||
</script> | ||
<!-- End Google Tag Manager --> | ||
{{/cookiesAccepted}} | ||
{{/gtmTagId}} | ||
|
||
<meta name="format-detection" content="telephone=no"> | ||
<link rel="stylesheet" href="{{assetPath}}/css/app.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters