Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor domain configuration for load-analytics
- now that the domain config contains information about more than just analytics, it feels like it should be separated out for clarity - updated docs and tests accordingly
- Loading branch information
1 parent
f4b21b0
commit c6d89cb
Showing
4 changed files
with
105 additions
and
98 deletions.
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
app/assets/javascripts/govuk_publishing_components/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
window.GOVUK = window.GOVUK || {} | ||
window.GOVUK.vars = window.GOVUK.vars || {} | ||
window.GOVUK.vars.domains = [ | ||
{ | ||
// need to have this one at the start, see loadGa4 function | ||
name: 'development', | ||
domains: [ | ||
'localhost', | ||
'127.0.0.1', | ||
'0.0.0.0', | ||
'dev.gov.uk' | ||
], | ||
initialiseGA4: true, | ||
id: 'GTM-MG7HG5W', | ||
auth: 'bRiZ-jiEHtw6hHpGd6dF9w', | ||
preview: 'env-3', | ||
gaProperty: 'UA-UNSET', | ||
gaPropertyCrossDomain: 'UA-UNSET', | ||
consentApiUrl: 'staging' | ||
}, | ||
{ | ||
name: 'production', | ||
domains: [ | ||
'www.gov.uk', | ||
'www-origin.publishing.service.gov.uk', | ||
'assets.publishing.service.gov.uk' | ||
], | ||
initialiseGA4: true, | ||
id: 'GTM-MG7HG5W', | ||
gaProperty: 'UA-26179049-1', | ||
gaPropertyCrossDomain: 'UA-145652997-1', | ||
consentApiUrl: 'production' | ||
}, | ||
{ | ||
name: 'staging', | ||
domains: [ | ||
'www.staging.publishing.service.gov.uk', | ||
'www-origin.staging.publishing.service.gov.uk', | ||
'assets.staging.publishing.service.gov.uk' | ||
], | ||
initialiseGA4: true, | ||
id: 'GTM-MG7HG5W', | ||
auth: 'oJWs562CxSIjZKn_GlB5Bw', | ||
preview: 'env-5', | ||
gaProperty: 'UA-26179049-20', | ||
gaPropertyCrossDomain: 'UA-145652997-1', | ||
consentApiUrl: 'staging' | ||
}, | ||
{ | ||
name: 'integration', | ||
domains: [ | ||
'www.integration.publishing.service.gov.uk', | ||
'www-origin.integration.publishing.service.gov.uk', | ||
'assets.integration.publishing.service.gov.uk' | ||
], | ||
initialiseGA4: true, | ||
id: 'GTM-MG7HG5W', | ||
auth: 'C7iYdcsOlYgGmiUJjZKrHQ', | ||
preview: 'env-4', | ||
gaProperty: 'UA-26179049-22', | ||
gaPropertyCrossDomain: 'UA-145652997-1', | ||
consentApiUrl: 'staging' | ||
}, | ||
{ | ||
name: 'devdocs', | ||
domains: [ | ||
'docs.publishing.service.gov.uk' | ||
], | ||
initialiseGA4: true, | ||
id: 'GTM-TNKCK97', | ||
consentApiUrl: 'production' | ||
} | ||
] |
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