diff --git a/client/web/build/inject-analytics.js b/client/web/build/inject-analytics.js
index 52a75aa8..51a851ad 100644
--- a/client/web/build/inject-analytics.js
+++ b/client/web/build/inject-analytics.js
@@ -11,15 +11,25 @@ const path = require('path');
const templatePath = path.resolve(__dirname, '../assets/template.html');
+console.log('templatePath', templatePath);
+
+function appendScript(script) {
+ let template = fs.readFileSync(templatePath, {
+ encoding: 'utf-8',
+ });
+ template = template.replace('', script + '');
+
+ fs.writeFileSync(templatePath, template);
+}
+
// frontjs
// const script = ``;
-// umami
-const script = ``;
-
-console.log('templatePath', templatePath);
-let template = fs.readFileSync(templatePath, {
- encoding: 'utf-8',
-});
-template = template.replace('', script + '');
-fs.writeFileSync(templatePath, template);
+// umami
+appendScript(
+ ``
+);
+// tianji
+appendScript(
+ ``
+);
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index 35fa8a2d..5d907dcb 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -136,4 +136,12 @@ module.exports = {
'data-website-id': '22f7ff7b-db54-4222-b123-c8e3acfbf1aa',
},
],
+ scripts: [
+ {
+ src: 'https://tianji.moonrailgun.com/tracker.js',
+ async: true,
+ defer: true,
+ 'data-website-id': 'clo189w7r0003o65exm2pvdnp',
+ },
+ ],
};