Skip to content

Commit d6713e1

Browse files
committed
docs: add google analytics and baidu analytics
1 parent e83f49a commit d6713e1

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

docs/.vitepress/shared.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,34 @@ import { resolve } from 'path'
55
export default defineConfig({
66
base: '/',
77
title: 'Vue Styled Components',
8-
head: [['link', { rel: 'icon', href: '/logo.png ' }]],
8+
head: [
9+
['link', { rel: 'icon', href: '/logo.png ' }],
10+
[
11+
'script',
12+
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-WBXHE8DJ0C' }
13+
],
14+
[
15+
'script',
16+
{},
17+
`window.dataLayer = window.dataLayer || [];
18+
function gtag(){dataLayer.push(arguments);}
19+
gtag('js', new Date());
20+
gtag('config', 'G-WBXHE8DJ0C');`
21+
],
22+
[
23+
'script',
24+
{},
25+
`
26+
var _hmt = _hmt || [];
27+
(function() {
28+
var hm = document.createElement("script");
29+
hm.src = "https://hm.baidu.com/hm.js?29a321a01482ac90641e590b27adbbf5";
30+
var s = document.getElementsByTagName("script")[0];
31+
s.parentNode.insertBefore(hm, s);
32+
})();
33+
`
34+
]
35+
],
936

1037
lastUpdated: true,
1138
cleanUrls: true,

0 commit comments

Comments
 (0)