Skip to content

Commit

Permalink
Merge pull request #343 from scientist-softserv/GoogleUpdate
Browse files Browse the repository at this point in the history
Google Analytics update
  • Loading branch information
bkiahstroud authored Nov 14, 2023
2 parents e8dbf2e + 6f41fcd commit 10cd626
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions app/views/_ga.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Override file from Hyrax 3.5 -->
<% if !Rails.env.development? %>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6QL7MDR1HQ"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-6QL7MDR1HQ');
</script>
<meta name="analytics-provider" content="google">
<% end %>
2 changes: 1 addition & 1 deletion config/initializers/hyrax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# Google Analytics tracking ID to gather usage statistics
# Only add the ID on production
if Rails.env == "production"
config.google_analytics_id = 'UA-93701167-5'
config.google_analytics_id = 'G-6QL7MDR1HQ'
end

# Date you wish to start collecting Google Analytic statistics for
Expand Down

0 comments on commit 10cd626

Please sign in to comment.