Skip to content

Commit

Permalink
Use tag manager to add google analytics tag instead
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Oct 17, 2024
1 parent 69f0010 commit b2f9838
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions app/views/application/_analytics.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= ENV.fetch("GOOGLE_ANALYTICS_MEASUREMENT_ID", nil) %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '<%= ENV.fetch("GOOGLE_ANALYTICS_MEASUREMENT_ID", nil) %>', {
cookie_flags: 'max-age=7200;secure;samesite=none'
});
</script>
<%# TODO: Remove Analytics above once tag manager is working %>
<%# TODO: Extract GTM code into configuration %>
<!-- Google Tag Manager -->
Expand Down

0 comments on commit b2f9838

Please sign in to comment.