Technical recipes for frequently and infrequently recurring problems
GA_TRACKING_CODE
.UA-142424242-4
.-cm
repositories for the project.GA_TRACKING_CODE
. <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-143063836-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-5555555-5');
</script>
app/view/layouts/blacklight/base.html.erb
as the first tag in the <head>
tag, but replace the tracking code with the env variable: <%= ENV['GA_TRACKING_CODE'] %>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= ENV['GA_TRACKING_CODE'] %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<%= ENV['GA_TRACKING_CODE'] %>');
</script>
-cm
repositories for the project.