Skip to content

Commit

Permalink
Add Matomo analytics code and remove secondary GA id
Browse files Browse the repository at this point in the history
  • Loading branch information
elohanlon committed Apr 16, 2024
1 parent ec33db7 commit 23618cd
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion app/views/layouts/public.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,22 @@
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<%= Rails.application.secrets[:analytics_key]%>');
gtag('config', 'G-QRM52K5M78');
</script>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://columbia-libraries.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '18']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='https://cdn.matomo.cloud/columbia-libraries.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<% end -%>
<script src="https://cdn.cul.columbia.edu/fontawesome/pro/v5.x/js/all.js" defer="defer" crossorigin="anonymous"></script>
</head>
Expand Down

0 comments on commit 23618cd

Please sign in to comment.