Releases: johannschopplich/nuxt-gtag
Releases · johannschopplich/nuxt-gtag
v3.0.2
🐞 Bug Fixes
- Mark
initCommands
as optional - by @johannschopplich in #92 (b2e3b)
🏎 Performance
- Add preload for script - by @williamchong in #93 (3fc77)
View changes on GitHub
v3.0.1
🚀 Features
- Mock composables when module is disabled - by @johannschopplich in #90 (a1f3a)
View changes on GitHub
v3.0.0
🚨 Breaking Changes
initMode
for manual Gtag initialization - by @johannschopplich (f9080)
ℹ️ Migration
In v2.x and earlier, the enabled
option was used to control manual initialization of the Google tag script. This option has been replaced with initMode
in v3.x. To migrate your configuration, set the initMode
option to manual
:
export default defineNuxtConfig({
modules: ['nuxt-gtag'],
gtag: {
- enabled: false,
+ initMode: 'manual',
id: 'GX-XXXXXXXXXX'
}
})
The enabled
option is still available in v3.x, but is now used to disable the Google tag module for the current environment. This is useful if you want to disable the module in development or staging environments:
export default defineNuxtConfig({
modules: ['nuxt-gtag'],
gtag: {
enabled: process.env.NODE_ENV === 'production',
id: 'G-XXXXXXXXXX'
}
})
View changes on GitHub
v2.1.0
🚀 Features
- Prevent ad blockers from affecting development - by @johannschopplich in #85 (1bcd2)
View changes on GitHub
v2.0.7
🐞 Bug Fixes
View changes on GitHub
v2.0.6
🐞 Bug Fixes
- Augment runtime config types - by @DamianGlowala in #63 (000c9)
- Augment
@nuxt/schema
- by @johannschopplich (2ec0f) - Always provide default
config
value for Gtag init - by @johannschopplich (3d9ea)
View changes on GitHub
v2.0.5
🐞 Bug Fixes
- Ensure head script is injected once - by @johannschopplich (2eb26)
- Require Nuxt 3.7 or higher - by @johannschopplich in #54 (2142b)
View changes on GitHub
v2.0.4
v2.0.3
v2.0.2
🐞 Bug Fixes
- Resolve
initCommands
option - by @johannschopplich in #50 (e83d2)