Skip to content

Commit 88ee189

Browse files
authored
Include ganalytics t3 (#6)
1 parent 853989d commit 88ee189

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ gem "github-pages", group: :jekyll_plugins
1515
group :jekyll_plugins do
1616
gem "jekyll-feed", "~> 0.17"
1717
gem "jekyll-seo-tag", "~> 2.8"
18-
gem "jekyll-analytics", "~> 0.1.14"
1918
# gem "jekyll-sitemap", "~> 1.4"
2019
# gem "jekyll-toc", "~> 0.19"
2120
# gem "jekyll-archives", "~> 2.3"

_config.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,3 @@ exclude:
4343
- vendor/ruby/
4444
- Makefile
4545
- LICENSE
46-
47-
jekyll_analytics:
48-
GoogleAnalytics:
49-
id: G-DRN83PNJQE

_includes/analytics.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Google tag (gtag.js) -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DRN83PNJQE"></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>

_layouts/default.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% if jekyll.environment == 'production' and site.google_analytics %}
2+
{% include analytics.html %}
3+
{% endif %}
4+
</head>
5+
<body>

0 commit comments

Comments
 (0)