Skip to content

Commit

Permalink
Merge pull request #1203 from alphagov/gtm
Browse files Browse the repository at this point in the history
Add Google Tag Manager configuration to Search Admin
  • Loading branch information
richardTowers authored Apr 30, 2024
2 parents 40a5684 + 746090a commit e857c6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/views/layouts/_google_tag_manager.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% if ENV["GOOGLE_TAG_MANAGER_ID"] %>
<%= 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 %>
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<% content_for :head do %>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= csp_meta_tag %>
<%= render "layouts/google_tag_manager" %>
<% end %>
<%= render "govuk_publishing_components/components/layout_for_admin", {
Expand Down

0 comments on commit e857c6b

Please sign in to comment.