docusaurus-gtm

1.0.3 • Public • Published

docusaurus-gtm

This docusaurus plugin Adds a Google Tag Manager script and noscript html tag to your docusaurus site. This Plugin Adds the Google Tag Manager script to the headTags and the preBodyTags.

Add Plugin

To add the plugin to your docusaurus v2 site, do this:

  1. yarn add docusaurus-gtm (alternatively: npm install --save docusaurus-gtm)
  2. Add the plugin to your docusaurus.config.js like this:
module.exports = {
  plugins: [
    [
      require.resolve('docusaurus-gtm'),
      {
        id: 'GTM-XXXXXXX', // GTM Container ID
      }
    ]
  ],
  ...
};

Package Sidebar

Install

npm i docusaurus-gtm

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

2.27 kB

Total Files

3

Last publish

Collaborators

  • snivio