Skip to content

Commit

Permalink
Merge pull request #2841 from alphagov/gtm
Browse files Browse the repository at this point in the history
Add Google Tag Manager configuration to Signon
  • Loading branch information
richardTowers authored Apr 30, 2024
2 parents 960f5ba + fdaff01 commit cc0806e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/views/layouts/_google_tag_manager.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<% if ENV["GOOGLE_TAG_MANAGER_ID"] %>
<% content_for :head do %>
<%= render "govuk_publishing_components/components/google_tag_manager_script", {
gtm_id: ENV["GOOGLE_TAG_MANAGER_ID"],
gtm_auth: ENV["GOOGLE_TAG_MANAGER_AUTH"],
gtm_preview: ENV["GOOGLE_TAG_MANAGER_PREVIEW"],
} %>
<% end %>
<% end %>
2 changes: 2 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<%= render "layouts/google_tag_manager" %>

<%= render 'govuk_publishing_components/components/layout_for_admin',
product_name: "Signon",
environment: GovukPublishingComponents::AppHelpers::Environment.current_acceptance_environment,
Expand Down

0 comments on commit cc0806e

Please sign in to comment.