Skip to content

Commit

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

gtag('config', 'G-B6TEYPN1P7');
gtag('config', 'G-X0YHVTDQVR');

<% if (current_user) %>
gtag('set', { 'user_id': '<%= current_user.id %>' }); // Set the user ID using signed-in user_id.
<% end %>
Expand Down

0 comments on commit 65551f2

Please sign in to comment.