We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96a8d05 commit f01a0d0Copy full SHA for f01a0d0
_config.yml
@@ -35,6 +35,8 @@ theme: jekyll-theme-hacker
35
plugins:
36
- jekyll-feed
37
38
+google_analytics: "G-WZE3Q1HC4G"
39
+
40
# Exclude from processing.
41
# The following items will not be processed, by default.
42
# Any item listed under the `exclude:` key here will be automatically added to
_includes/head-custom-google-analytics.html
@@ -0,0 +1,10 @@
1
+{% if site.google_analytics %}
2
+<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
3
+<script>
4
+ window.dataLayer = window.dataLayer || [];
5
+ function gtag(){dataLayer.push(arguments);}
6
+ gtag('js', new Date());
7
8
+ gtag('config', '{{ site.google_analytics }}');
9
+</script>
10
+{% endif %}
0 commit comments