Tracking: Google Analytics - ucsf-ckm/ucsf-library-ux-and-web-documentation GitHub Wiki
Add code snippet using our actual UA number.
Dashboard > Appearance > Elements > Legacy Hooks > After Footer Content
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-552286-26"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-552286-26'); // Universal Analytics property.
gtag('config', 'G-Y97Q0H93NY'); // Google Analytics 4 property.
</script>
- Log into Zendesk Guide
- Go to Settings > Integrations > Google Analytics
- Check the box and add actual UA code UA-XXXXXX-52
LibGuides > Admin > System Settings > Custom Analytics and add code snippet with actual UA number.
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXXX-30', 'auto'); ga('send', 'pageview');</script>
LibCal > Admin > System Settings > Custom Analytics/Tracking Type and add code snippet with actual UA number.
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXX-50', 'auto');
ga('send', 'pageview');
</script>
<script>
script type="text/javascript" src="//script.crazyegg.com/pages/scripts/0014/1423.js" async="async"></script>