Skip to content

Commit

Permalink
Add google analytics vite plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
seadeep42 committed Oct 2, 2023
1 parent 5b6a93b commit c771a73
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"react-i18next": "^13.2.2",
"sass": "^1.55.0",
"vite": "^4.4.9",
"vite-plugin-pwa": "^0.16.5"
"vite-plugin-pwa": "^0.16.5",
"vite-plugin-radar": "^0.9.1"
}
}
7 changes: 7 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { resolve } from "path";
import { defineConfig } from "vite";
import { VitePluginRadar } from 'vite-plugin-radar';
// import { VitePWA } from 'vite-plugin-pwa';

export default defineConfig({
Expand All @@ -20,6 +21,12 @@ export default defineConfig({
outDir: resolve(__dirname, "dist"),
},
plugins: [
VitePluginRadar({
// Google Analytics tag injection
analytics: {
id: 'G-RR5ZXFRZ7G',
},
}),
// VitePWA({
// // injectRegister: 'inline',
// // registerType: 'autoUpdate',
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3154,6 +3154,11 @@ vite-plugin-pwa@^0.16.5:
workbox-build "^7.0.0"
workbox-window "^7.0.0"

vite-plugin-radar@^0.9.1:
version "0.9.1"
resolved "https://registry.yarnpkg.com/vite-plugin-radar/-/vite-plugin-radar-0.9.1.tgz#1ee8866cb2f2275f3eb56bfe49fea82bbdd673d2"
integrity sha512-stnb+LxeEKobcesXW2JA0OdCaBRgR/zZwN6ACXZf1gF9MNR689aiK5UlgTVmrpUnEcPucO9U0M0WHnuM6NXPsA==

vite@^4.4.9:
version "4.4.9"
resolved "https://registry.yarnpkg.com/vite/-/vite-4.4.9.tgz#1402423f1a2f8d66fd8d15e351127c7236d29d3d"
Expand Down

0 comments on commit c771a73

Please sign in to comment.