mirror of
https://github.com/minoplhy/crappy-reverie.git
synced 2024-11-14 13:26:57 +00:00
Merge pull request #48 from Kolossi/master
Add Google Analytics GA4 code (Issue #45)
This commit is contained in:
commit
c6edc6db0b
@ -43,6 +43,9 @@ disqus:
|
||||
# Enter your Google Analytics web tracking code (e.g. UA-2110908-2) to activate tracking
|
||||
google_analytics: UA-43339302-11
|
||||
|
||||
# For newer "GA4" analytics, use the following instead of the "UA" entry above
|
||||
#google_analytics_ga4: G-GABC1DEFG
|
||||
|
||||
# Your website URL (e.g. http://amitmerchant1990.github.io or http://www.amitmerchant.com)
|
||||
# Used for Sitemap.xml and your RSS feed
|
||||
url: http://www.amitmerchant.com/reverie
|
||||
|
9
_includes/analytics_head.html
Normal file
9
_includes/analytics_head.html
Normal file
@ -0,0 +1,9 @@
|
||||
{% if site.google_analytics_ga4 %}
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics_ga4 }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{ site.google_analytics_ga4 }}');
|
||||
</script>
|
||||
{% endif %}
|
@ -11,6 +11,7 @@
|
||||
|
||||
<meta name="theme-color" content="#000000">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.baseurl }}/images/favicon-32x32.png">
|
||||
{% include analytics_head.html %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
Loading…
Reference in New Issue
Block a user