Skip to content

Commit

Permalink
添加 Google Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
vilicvane committed Aug 26, 2023
1 parent ac04604 commit 3446542
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,26 @@ export default defineConfig({
lang: 'zh-CN',
title: '盯梢文档',
description: '快速上手盯梢应用',
head: [['link', {rel: 'icon', href: '/images/logo.svg'}]],
head: [
['link', {rel: 'icon', href: '/images/logo.svg'}],
[
'script',
{
async: '',
src: 'https://www.googletagmanager.com/gtag/js?id=G-HD5ZM67WNQ',
},
],
[
'script',
{},
`\
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-HD5ZM67WNQ');
`,
],
],
themeConfig: {
logo: '/images/logo.svg',
// https://vitepress.dev/reference/default-theme-config
Expand Down

0 comments on commit 3446542

Please sign in to comment.