docusaurus-gtm-plugin
v0.0.2
Published
Plugin to add a Google Tag Manager (GTM) script and noscript html tag to your docusaurus v2 site.
Downloads
22,063
Maintainers
Readme
docusaurus-gtm-plugin
Adds a Google Tag Manager script and noscript html tag to your docusaurus site.
Add Plugin
To add the plugin to your docusaurus v2 site, do this:
yarn add docusaurus-gtm-plugin
(alternatively:npm install --save docusaurus-gtm-plugin
)- Add the plugin to your
docusaurus.config.js
like this:
module.exports = {
plugins: [
[
require.resolve('docusaurus-gtm-plugin'),
{
id: 'GTM-XXXXXXX', // GTM Container ID
}
]
],
...
};