Skip to content

Commit

Permalink
add gtag module
Browse files Browse the repository at this point in the history
  • Loading branch information
deetz99 committed Jan 20, 2025
1 parent 03d8146 commit d479e57
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
8 changes: 7 additions & 1 deletion strr-base-web/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default defineNuxtConfig({
'@nuxtjs/eslint-module',
'@nuxt/test-utils/module',
'@nuxt/image',
'@zadigetvoltaire/nuxt-gtm'
'@zadigetvoltaire/nuxt-gtm',
'nuxt-gtag'
],

extends: ['@daxiom/nuxt-core-layer-test'],
Expand Down Expand Up @@ -85,6 +86,11 @@ export default defineNuxtConfig({
defer: true
},

gtag: {
enabled: !!process.env.NUXT_GTAG_ID?.trim(),
id: process.env.NUXT_GTAG_ID?.trim()
},

runtimeConfig: {
public: {
// Keys within public, will be also exposed to the client-side
Expand Down
1 change: 1 addition & 0 deletions strr-base-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"eslint-plugin-tailwindcss": "^3.17.4",
"happy-dom": "^14.12.3",
"nuxt": "^3.15.0",
"nuxt-gtag": "3.0.2",
"playwright-core": "^1.49.1",
"sass": "^1.77.6",
"typescript": "^5.5.3",
Expand Down
20 changes: 20 additions & 0 deletions strr-base-web/pnpm-lock.yaml

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

0 comments on commit d479e57

Please sign in to comment.