Skip to content

Commit

Permalink
Merge pull request #392 from NYULibraries/reenable-google-analytics
Browse files Browse the repository at this point in the history
Re-enable Google Analytics
  • Loading branch information
nmwolf authored Nov 20, 2024
2 parents 70c2228 + 17298cc commit e111a47
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/views/layouts/blacklight/base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@

<%= csrf_meta_tags %>
<%= content_for(:head) %>

<!-- 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 class="<%= render_body_class %>">
<nav id="skip-link" role="navigation" aria-label="<%= t('blacklight.skip_links.label') %>">
Expand Down

0 comments on commit e111a47

Please sign in to comment.