Skip to content

Commit

Permalink
Merge pull request #293 from NYULibraries/g4a
Browse files Browse the repository at this point in the history
  • Loading branch information
the-codetrane authored Nov 29, 2023
2 parents f337f68 + de3713f commit 2b471d9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= javascript_tag '$.fx.off = true;' if Rails.env.test? %>
<%= javascript_importmap_tags %>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JWGGYRXL2K"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
gtag('js', new Date());

const config = {};
<% if Settings.analytics_debug %>
config.debug_mode = true
<% end %>

gtag('config', 'G-JWGGYRXL2K', config)
</script>
</head>

<body>
Expand Down
3 changes: 3 additions & 0 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,6 @@ HELP_TEXT:
SIDEBAR_STATIC_MAP:
- 'iiif'
- 'iiif_manifest'

# GOOGLE ANALYTICS HANDLING
analytics_debug: true

0 comments on commit 2b471d9

Please sign in to comment.