Skip to content

Commit

Permalink
Merge pull request #823 from pulibrary/814-ga
Browse files Browse the repository at this point in the history
Switch from matomo to google analytics
  • Loading branch information
eliotjordan committed Aug 17, 2020
2 parents de785ee + d93154f commit 4423f01
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 24 deletions.
3 changes: 1 addition & 2 deletions app/views/layouts/spotlight/spotlight.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<%= render partial: 'shared/matomo' %>
<%= render 'shared/analytics' if Rails.env.production? %>
</head>
<body class="<%= render_body_class %>">
<%= render partial: 'shared/announcements' %>
Expand All @@ -53,7 +53,6 @@
</div>
</main>

<%= render partial: 'shared/matomo_noscript' %>
<%= render :partial => 'shared/footer' %>
</body>
</html>
9 changes: 9 additions & 0 deletions app/views/shared/_analytics.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-15870237-32"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-15870237-32');
</script>
15 changes: 0 additions & 15 deletions app/views/shared/_matomo.html.erb

This file was deleted.

7 changes: 0 additions & 7 deletions app/views/shared/_matomo_noscript.html.erb

This file was deleted.

0 comments on commit 4423f01

Please sign in to comment.