Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
googl analytic
Browse files Browse the repository at this point in the history
  • Loading branch information
cryals committed Aug 27, 2024
1 parent a640988 commit 61bab06
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ export default defineConfig({
lang: 'ru-RU',
srcDir: './docs',
base: '/',
head: [['link', { rel: 'icon', href: '/newera-station/newera.png' }]],
head: [
['link', { rel: 'icon', href: '/newera-station/newera.png' }],
// Добавляем Google Analytics
['script', { async: true, src: 'https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-X' }],
['script', {}, `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-BKG62BG33P');
`]
],
themeConfig: {
nav,
sidebar,
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
},
"dependencies": {
"vitepress-plugin-google-analytics": "^1.0.2"
}
}

0 comments on commit 61bab06

Please sign in to comment.