Skip to content

Commit e1ae7fb

Browse files
authored
Create head-custom.html
1 parent 779f504 commit e1ae7fb

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

includes/head-custom.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{% if site.google-analytics %}
2+
<!-- Google tag (gtag.js) -->
3+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google-analytics }}"></script>
4+
<script>
5+
window.dataLayer = window.dataLayer || [];
6+
function gtag(){dataLayer.push(arguments);}
7+
gtag('js', new Date());
8+
9+
gtag('config', '{{ site.google-analytics }}');
10+
</script>
11+
{% endif %}

0 commit comments

Comments
 (0)