1.0.4 • Published 4 years ago
@blackwall/gtm-nuxt v1.0.4
@bchteam/gtm-nuxt
Google Tag Manager module for Nuxt.js
Features
The module enables vue-gtm for Nuxt.js.
The module supports defining options by function with Nuxt context as argument.
Setup
- Add
@bchteam/gtm-nuxtdependency using yarn or npm to your project - Add
@bchteam/gtm-nuxttomodulessection ofnuxt.config.js - Add options in
gtmsection ofnuxt.config.jsor with module.
{
modules: [
['@blackwall/gtm-nuxt', {
id: (ctx) => ctx.app.$env.GTM_ID,
enabled: true,
}]
],
gtm: {
debug: function (ctx) {
return ctx.app.$env.GTM_DEBUG === 'true'
},
ignoredViews: ['homepage'],
},
}Options
Options can be passed in nuxt.config.js.
See vue-gtm for details
id
- Type:
String - Default:
null
enabled
- Type:
Boolean - Default:
false
debug
- Type:
Boolean - Default:
false
ignoredViews
- Type:
Array - Default:
[]
License
Copyright (c) 2019 Sapozhkov Evgeniy ceo@blackwall.group