Add google analytics

This commit is contained in:
rebuilt 2023-02-14 16:23:25 -08:00
parent dd826c3e0d
commit c24c367339
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,12 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= google_analytics_id %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', <%= google_analytics_id.to_json.html_safe %>);
</script>