Skip to content

Commit

Permalink
add GTag to manage Google Analytics (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorwolpert authored Oct 22, 2024
1 parent c8e95c3 commit 8f2c340
Show file tree
Hide file tree
Showing 4 changed files with 375 additions and 88 deletions.
2 changes: 1 addition & 1 deletion web/site/devops/vaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ GOOGLE_APPLICATION_CREDENTIALS=project-firebase-adminsdk.json
AUTH_API_KEY="op://firebase/$APP_ENV/base/API_KEY"
AUTH_DOMAIN="op://firebase/$APP_ENV/base/AUTH_DOMAIN"
AUTH_PROJECT_ID="op://firebase/$APP_ENV/base/PROJECT_ID"
AUTH_APP_ID="op://firebase/$APP_ENV/business-ar/APP_ID"
NUXT_PUBLIC_GTAG_ID="op://google-analytics/$APP_ENV/developer/GTAG"
10 changes: 9 additions & 1 deletion web/site/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ export default defineNuxtConfig({
routeRules: {
'/': { redirect: '/en-CA' }
},
modules: ['@nuxtjs/eslint-module', '@nuxt/test-utils/module', '@nuxt/image'], // 'nuxt-vuefire'
modules: [
'@nuxtjs/eslint-module',
'@nuxt/test-utils/module',
'@nuxt/image',
'nuxt-gtag'
], // 'nuxt-vuefire'
extends: ['@daxiom/sbc-nuxt-assets-layer'],
imports: {
dirs: ['stores', 'composables', 'enums', 'interfaces', 'types', 'utils']
Expand Down Expand Up @@ -116,5 +121,8 @@ export default defineNuxtConfig({
runtimeConfig: {
xApiKey: '',
accountID: ''
},
gtag: {
enabled: process.env.NODE_ENV === 'production'
}
})
4 changes: 3 additions & 1 deletion web/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"eslint-plugin-tailwindcss": "^3.17.4",
"happy-dom": "^13.10.1",
"nuxt": "^3.12.3",
"nuxt-gtag": "^3.0.1",
"nuxt-vuefire": "^1.0.3",
"playwright-core": "^1.45.1",
"typescript": "^5.5.3",
Expand All @@ -47,5 +48,6 @@
"firebase-admin": "^11.11.1",
"firebase-functions": "^4.9.0",
"vuefire": "^3.1.24"
}
},
"packageManager": "[email protected]+sha1.a428b12202bc4f23b17e6dffe730734dae5728e2"
}
Loading

0 comments on commit 8f2c340

Please sign in to comment.