Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 加入 Google Analytics https://github.com/siyuan-note/siyuan/issues/6369

Liang Dingf8d01913a4d5
diff --git a/app/src/assets/template/app/index.tpl b/app/src/assets/template/app/index.tpl
index aac258cd1f..dcd8a2a74a 100644
--- a/app/src/assets/template/app/index.tpl
+++ b/app/src/assets/template/app/index.tpl
@@ -32,5 +32,15 @@
}
}, 2000)
</script>
+
+<!-- Google tag (gtag.js) -->
+<script async src="https://www.googletagmanager.com/gtag/js?id=G-L7WEXVQCR9"></script>
+<script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+
+ gtag('config', 'G-L7WEXVQCR9');
+</script>
</body>
</html>
diff --git a/app/src/assets/template/desktop/index.tpl b/app/src/assets/template/desktop/index.tpl
index f0e940dc82..1e837293d2 100644
--- a/app/src/assets/template/desktop/index.tpl
+++ b/app/src/assets/template/desktop/index.tpl
@@ -26,5 +26,15 @@
<div id="status" class="fn__flex status"></div>
<div id="commonMenu" class="b3-menu fn__none"></div>
<div id="message" class="b3-snackbars"></div>
+
+<!-- Google tag (gtag.js) -->
+<script async src="https://www.googletagmanager.com/gtag/js?id=G-L7WEXVQCR9"></script>
+<script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+
+ gtag('config', 'G-L7WEXVQCR9');
+</script>
</body>
</html>
diff --git a/app/src/assets/template/mobile/index.tpl b/app/src/assets/template/mobile/index.tpl
index 3ebad2d7a0..23f7bcbc3a 100644
--- a/app/src/assets/template/mobile/index.tpl
+++ b/app/src/assets/template/mobile/index.tpl
@@ -72,5 +72,15 @@
<button data-type="redo"><svg><use xlink:href="#iconRedo"></use></svg></button>
<span class="fn__flex-1"></span>
</div>
+
+<!-- Google tag (gtag.js) -->
+<script async src="https://www.googletagmanager.com/gtag/js?id=G-L7WEXVQCR9"></script>
+<script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+
+ gtag('config', 'G-L7WEXVQCR9');
+</script>
</body>
</html>