From 0ae836ed2e658c8a28782f725bfaa53305a1c407 Mon Sep 17 00:00:00 2001 From: Soitora Date: Fri, 8 Sep 2023 23:14:54 +0200 Subject: [PATCH] Prepare GA4 for release --- website/package.json | 1 + website/pnpm-lock.yaml | 15 +++++++++++---- website/src/.vitepress/theme/index.ts | 4 ++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/website/package.json b/website/package.json index b7257600..1088723a 100644 --- a/website/package.json +++ b/website/package.json @@ -58,6 +58,7 @@ "unplugin-element-plus": "^0.8.0", "vite-plugin-eslint": "^1.8.1", "vitepress": "1.0.0-rc.10", + "vitepress-plugin-google-analytics": "^1.0.2", "vitepress-plugin-tabs": "^0.3.0", "vue": "^3.3.4", "vue-eslint-parser": "^9.3.1", diff --git a/website/pnpm-lock.yaml b/website/pnpm-lock.yaml index 4c4ede9b..441c591a 100644 --- a/website/pnpm-lock.yaml +++ b/website/pnpm-lock.yaml @@ -1,5 +1,9 @@ lockfileVersion: '6.0' +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + dependencies: '@iconify-prerendered/vue-mdi': specifier: ^0.23.1689058119 @@ -114,6 +118,9 @@ devDependencies: vitepress: specifier: 1.0.0-rc.10 version: 1.0.0-rc.10(@algolia/client-search@4.19.1)(@types/node@20.5.7)(axios@1.5.0)(search-insights@2.7.0)(stylus@0.60.0) + vitepress-plugin-google-analytics: + specifier: ^1.0.2 + version: 1.0.2 vitepress-plugin-tabs: specifier: ^0.3.0 version: 0.3.0(vitepress@1.0.0-rc.10)(vue@3.3.4) @@ -5464,6 +5471,10 @@ packages: fsevents: 2.3.3 dev: true + /vitepress-plugin-google-analytics@1.0.2: + resolution: {integrity: sha512-ri8bFUAmt3c/DtPrALauGBIUr2gIJ11c1qNRhwd3/+aiuYZBfQpOosSxcO1AswgwRxP9FwBS6Z7jgdDVyXb2hA==} + dev: true + /vitepress-plugin-tabs@0.3.0(vitepress@1.0.0-rc.10)(vue@3.3.4): resolution: {integrity: sha512-3dKsBuP6PDzcFHgUtNCwwCs3bYoZduj7AcQkT9JfAKTRAKPCNmjiNInPT3IZ7AihL0SJNoQ3liz/e97z8oo+XA==} peerDependencies: @@ -5711,7 +5722,3 @@ packages: /yoga-wasm-web@0.3.3: resolution: {integrity: sha512-N+d4UJSJbt/R3wqY7Coqs5pcV0aUj2j9IaQ3rNj9bVCLld8tTGKRa2USARjnvZJWVx1NDmQev8EknoczaOQDOA==} dev: true - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false diff --git a/website/src/.vitepress/theme/index.ts b/website/src/.vitepress/theme/index.ts index 37d0b8d4..51b6228f 100644 --- a/website/src/.vitepress/theme/index.ts +++ b/website/src/.vitepress/theme/index.ts @@ -14,6 +14,9 @@ import { enhanceAppWithTabs } from "vitepress-plugin-tabs/client" // Import Icon components import { IconBugReport, IconDownload, IconNewspaperVariant } from "@iconify-prerendered/vue-mdi" +// Import Google Analytics plugin +import googleAnalytics from "vitepress-plugin-google-analytics" + export default { extends: DefaultTheme, enhanceApp({ app }) { @@ -22,5 +25,6 @@ export default { app.component("IconDownload", IconDownload) app.component("IconNewspaperVariant", IconNewspaperVariant) app.component("IconBugReport", IconBugReport) + // googleAnalytics({ id: "G-2CBXXM1Y86" }) }, }