Skip to content

Commit fbe9a25

Browse files
committed
New: Google Analytics
1 parent c8747c0 commit fbe9a25

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.vitepress/config.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ export default defineConfig({
1414
rel: 'icon',
1515
href: '/icon.png',
1616
},
17+
],
18+
[
19+
'script',
20+
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-5SN0WR5ETP' }
21+
],
22+
[
23+
'script',
24+
{},
25+
`window.dataLayer = window.dataLayer || [];
26+
function gtag(){dataLayer.push(arguments);}
27+
gtag('js', new Date());
28+
gtag('config', 'G-5SN0WR5ETP');`
1729
]
1830
],
1931
themeConfig: {

0 commit comments

Comments
 (0)