Skip to content

Commit bd1fada

Browse files
committed
google analytics を復元
1 parent d0bdb9f commit bd1fada

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

_includes/google-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-40RZ5HKFJ0"></script>
3+
<script>
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
7+
8+
gtag('config', 'G-40RZ5HKFJ0');
9+
</script>

_includes/head.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<head>
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0">
4-
{% if jekyll.environment == 'production' %}
5-
{% include googleanalytics.html %}
6-
{% endif %}
4+
75
{% if page.title %}
86
<title>{{ page.title | strip_html }} | {{ site.title }} {{ site.year }}</title>
97
{% else %}
@@ -49,7 +47,7 @@
4947

5048
<!-- Google Analytics -------------------------- -->
5149
{% if jekyll.environment == 'production' %}
52-
{% include googleanalytics.html %}
50+
{% include google-analytics.html %}
5351
{% endif %}
5452

5553
<!-- Favicon -------------------------- -->

0 commit comments

Comments
 (0)