Skip to content

Commit

Permalink
Merge pull request #2773 from alphagov/conditionally-add-gtm
Browse files Browse the repository at this point in the history
Conditionally add GA4 code from gem
  • Loading branch information
andysellick authored May 17, 2022
2 parents badea20 + 9e0c6fb commit 28f2324
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/assets/javascripts/analytics.js.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
//= require govuk_publishing_components/analytics

<% if ENV["GOOGLE_TAG_MANAGER_ID"] %>
//= require govuk_publishing_components/analytics-ga4
<% end %>

var linkedDomains = [
'access.service.gov.uk',
'access.tax.service.gov.uk',
Expand Down

0 comments on commit 28f2324

Please sign in to comment.