@txp-cms/google-tagmanager
Google Tagmanager integration for your Nuxt project.
Setup
- Add
@txp-cms/google-tagmanager
dependency using yarn to your project - Add
@txp-cms/google-tagmanager
tomodules
section ofnuxt.config.js
including your specific Google Tagmanager Container ID.
{
modules: [
['@txp-cms/google-tagmanager', {
gtmId: process.env.GOOGLE_TAG_MANAGER_ID
}]
]
}
Options
-
gtmId
(string): Your personal GTM container id -
includeInDev
(boolean): Decide whether the GTM script shall be loaded in nuxt dev mode, too (default: true) -
consentManager
(string): If set to 'usercentrics' the script will be activated only if enabled in usercentrics -
scriptId
(string): Use custom script id for GTM script -
noscript
(boolean): Include noscript case as well. Default is true, -
noscriptId
(string): Use custom script id for noscript