Skip to content

Commit be392f1

Browse files
author
Zhicheng WANG
committed
feat: 添加 GA 分析代码
1 parent b186090 commit be392f1

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,18 @@
1616
<script src="/assets/js/translator.js" async></script>
1717
<link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
1818
<script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>
19+
<!-- Global site tag (gtag.js) - Google Analytics -->
20+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-159351998-1"></script>
21+
<script>
22+
window.dataLayer = window.dataLayer || [];
23+
24+
function gtag() {
25+
dataLayer.push(arguments);
26+
}
27+
28+
gtag('js', new Date());
29+
30+
gtag('config', 'UA-159351998-1');
31+
</script>
1932
</body>
2033
</html>

0 commit comments

Comments
 (0)