Skip to content

Commit 1a6c044

Browse files
committed
Add google analytics for docs
1 parent ae15d6c commit 1a6c044

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

docs/.vitepress/config.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import sidebarEn from "./sidebar.en";
22
import sidebarZh from "./sidebar.zh";
3+
import sidebarJa from "./sidebar.ja";
34

45

56
// https://vitepress.dev/reference/site-config
@@ -61,5 +62,19 @@ export default {
6162
indexName: 'static-php docs',
6263
},
6364
},
64-
}
65+
},
66+
head: [
67+
[
68+
'script',
69+
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-0MBJ29BD7F' }
70+
],
71+
[
72+
'script',
73+
{},
74+
`window.dataLayer = window.dataLayer || [];
75+
function gtag(){dataLayer.push(arguments);}
76+
gtag('js', new Date());
77+
gtag('config', 'G-0MBJ29BD7F');`
78+
]
79+
]
6580
}

docs/public/favicon.ico

4.19 KB
Binary file not shown.

0 commit comments

Comments
 (0)