Skip to content

Commit

Permalink
chore: update gtag
Browse files Browse the repository at this point in the history
  • Loading branch information
tachyons committed Mar 22, 2024
1 parent 559e943 commit 69b77ed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/views/layouts/_google_analytics.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-112678513-1"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-B6TEYPN1P7"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-112678513-1');
gtag('config', 'G-B6TEYPN1P7');
<% if (current_user) %>
gtag('set', { 'user_id': '<%= current_user.id %>' }); // Set the user ID using signed-in user_id.
gtag('set', { 'user_id': '<%= current_user.id %>' }); // Set the user ID using signed-in user_id.
<% end %>
</script>

0 comments on commit 69b77ed

Please sign in to comment.