-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the `load-analytics' script of govuk_publishing_components to add GA4 analytics to collections-publisher. Includes extra configuration to set the correct domains for GA4 to initialise and code to automatically accept all cookies to make tracking work.
- Loading branch information
1 parent
ceaa582
commit 7112507
Showing
4 changed files
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//= link_tree ../images | ||
//= link application.css | ||
//= link application.js | ||
//= link domain-config.js |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
window.GOVUK = window.GOVUK || {} | ||
window.GOVUK.vars = window.GOVUK.vars || {} | ||
window.GOVUK.vars.extraDomains = [ | ||
{ | ||
name: 'production', | ||
domains: [ | ||
'collections-publisher.publishing.service.gov.uk' | ||
], | ||
initialiseGA4: true, | ||
id: 'GTM-P93SHJ4Z', | ||
gaProperty: 'UA-26179049-6', | ||
}, | ||
{ | ||
name: 'integration', | ||
domains: [ | ||
'collections-publisher.integration.publishing.service.gov.uk' | ||
], | ||
initialiseGA4: true, | ||
id: 'GTM-P93SHJ4Z', | ||
auth: '8jHx-VNEguw67iX9TBC6_g', | ||
preview: 'env-50', | ||
gaProperty: 'UA-26179049-6', | ||
} | ||
] |
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