1.0.4 • Published 2 years ago

@blackwall/gtm-nuxt v1.0.4

Weekly downloads
4
License
MIT
Repository
gitlab
Last release
2 years ago

@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-nuxt dependency using yarn or npm to your project
  • Add @bchteam/gtm-nuxt to modules section of nuxt.config.js
  • Add options in gtm section of nuxt.config.js or 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

MIT License

Copyright (c) 2019 Sapozhkov Evgeniy ceo@blackwall.group

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

5 years ago

1.0.1

5 years ago