Skip to content

Commit a807983

Browse files
committed
adds google analytics code
1 parent ac95c57 commit a807983

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

_config.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,15 @@ gitalk:
7171
owner: matthewlisp
7272

7373
# 输入Google Analytics web tracking code
74-
google_analytics:
74+
google_analytics: <!-- Global site tag (gtag.js) - Google Analytics -->
75+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-147239486-1"></script>
76+
<script>
77+
window.dataLayer = window.dataLayer || [];
78+
function gtag(){dataLayer.push(arguments);}
79+
gtag('js', new Date());
80+
81+
gtag('config', 'UA-147239486-1');
82+
</script>
7583

7684
# 输入你的网站域名(如果你没有添加自己的域名,而是直接用GitHub pages分配的域名的话可以省略)
7785
url:

0 commit comments

Comments
 (0)