Skip to content

Commit

Permalink
Tracking tags added. (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
JosueMagnus12 authored Dec 7, 2023
1 parent be6747f commit e55f875
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/views/home/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- content_for :head do
// Event snippet for Website traffic conversion page
javascript:
gtag('event', 'conversion', {'send_to': 'AW-11382454124/o0V1CIzO2O8YEOzuybMq'});
main
section class="relative bg-electric-teal hidden" data-controller="banner" data-banner-target="banner"
div class="flex max-w-3xl mx-auto py-7 md:py-8"
Expand Down
6 changes: 6 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','<%= Rails.application.credentials.dig(Rails.env.to_sym)[:google_tag_key] %>');
</script>

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-11382454124"></script>
<script>
window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-11382454124');
</script>
</head>

<body class="bg-gray-9">
Expand Down

0 comments on commit e55f875

Please sign in to comment.