Skip to content

Commit c232536

Browse files
committed
docs: gtag
1 parent 5a2d128 commit c232536

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/.vitepress/config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,21 @@ export default defineConfig({
4040
lang: "zh",
4141
},
4242
},
43+
head: [
44+
[
45+
"script",
46+
{
47+
async: "",
48+
src: "https://www.googletagmanager.com/gtag/js?id=G-GVYKBNTKPG",
49+
},
50+
],
51+
[
52+
"script",
53+
{},
54+
`window.dataLayer = window.dataLayer || [];
55+
function gtag(){dataLayer.push(arguments);}
56+
gtag('js', new Date());
57+
gtag('config', 'G-GVYKBNTKPG');`,
58+
],
59+
],
4360
});

0 commit comments

Comments
 (0)