Skip to content

Commit

Permalink
Merge pull request #143 from IFRCGo/feature/google-analytics
Browse files Browse the repository at this point in the history
Integrate google analytics
  • Loading branch information
samshara authored Aug 1, 2024
2 parents 8e3610b + 918f8d2 commit d27010d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export default defineConfig({
APP_TITLE: Schema.string.optional(),
APP_MAPBOX_ACCESS_TOKEN: Schema.string(),
APP_GRAPHQL_ENDPOINT: Schema.string.optional(),
APP_GOOGLE_ANALYTICS_ID: Schema.string.optional(),
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"vite": "^5.2.6",
"vite-plugin-checker": "^0.6.2",
"vite-plugin-compression2": "^1.0.0",
"vite-plugin-radar": "^0.9.2",
"vite-plugin-radar": "^0.9.6",
"vite-plugin-svgr": "^4.2.0",
"vite-plugin-webfont-dl": "3.9.2",
"vite-tsconfig-paths": "^4.2.2",
Expand Down
1 change: 0 additions & 1 deletion src/views/Resources/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@
}
}
}

7 changes: 7 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { execSync } from 'child_process';
import { compression } from 'vite-plugin-compression2';
import checker from 'vite-plugin-checker';
import { ValidateEnv as validateEnv } from '@julr/vite-plugin-validate-env';
import { VitePluginRadar } from 'vite-plugin-radar';

import alertHubPackage from './package.json';

/* Get commit hash */
Expand Down Expand Up @@ -35,6 +37,11 @@ export default defineConfig(({ mode }) => {
webfontDownload(),
validateEnv(),
isProd ? compression() : undefined,
VitePluginRadar({
analytics: {
id: env.APP_GOOGLE_ANALYTICS_ID,
},
})
],
css: {
devSourcemap: isProd,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10451,10 +10451,10 @@ vite-plugin-compression2@^1.0.0:
gunzip-maybe "^1.4.2"
tar-stream "^3.1.7"

vite-plugin-radar@^0.9.2:
version "0.9.4"
resolved "https://registry.yarnpkg.com/vite-plugin-radar/-/vite-plugin-radar-0.9.4.tgz#917dc0425680327edd9be87830f0489e8008b398"
integrity sha512-JhUP3yODDLGsAmz+PVRaxLyJYzC3PWTnAezbhuaRONvo7gFHDTU7AcY6+6tOgyDstOJjG2Qb3oUdiEorPVxl4A==
vite-plugin-radar@^0.9.6:
version "0.9.6"
resolved "https://registry.yarnpkg.com/vite-plugin-radar/-/vite-plugin-radar-0.9.6.tgz#59ae700d478e495cad0c46f7b968550690dbd234"
integrity sha512-tLvUt7+iZznxYa8GmCrZBV3Q0fLQApsyg9EIJgaen8DjGky3vFIq9KoDWAoVMs9FZ5qbsSBb3YfSvoqwVV+5xw==

vite-plugin-svgr@^4.2.0:
version "4.2.0"
Expand Down

0 comments on commit d27010d

Please sign in to comment.