Skip to content

Commit

Permalink
Google analytics (#79)
Browse files Browse the repository at this point in the history
* add google analytics

* fix google analytics 
- pages-themes/minimal#245

* fix google analytics (pt 3)
- pages-themes/minimal#100
  • Loading branch information
szorowi1 authored Jan 18, 2023
1 parent 6bd07c1 commit 6ec8cbf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,15 @@ <h3 style="margin-right: 145px;">Resources</h3>
</footer>
</div>
<script src="{{ "/assets/js/scale.fix.js" | relative_url }}"></script>
{% if site.google_analytics %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ site.google_analytics }}');
</script>
{% endif %}
</body>
</html>

0 comments on commit 6ec8cbf

Please sign in to comment.