diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index f863bda..e87abb3 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -40,4 +40,21 @@ export default defineConfig({ lang: "zh", }, }, + head: [ + [ + "script", + { + async: "", + src: "https://www.googletagmanager.com/gtag/js?id=G-GVYKBNTKPG", + }, + ], + [ + "script", + {}, + `window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'G-GVYKBNTKPG');`, + ], + ], });