Skip to main content
Docusaurus

Search documentation

Type to search this documentation.

On this pageOverview

πŸ“¦ plugin-google-tag-manager

A plugin for adding Google Tag Manager (gtm.js) to a Docusaurus site. Use this plugin in conjunction with the standard gtag plugin for in-depth analysis of how users are using your site.

npm2yarn
npm install --save @docusaurus/plugin-google-tag-manager

Accepted fields:

mdx-code-block
<APITable>
Name Type Default Description
containerId string Required Your Tag Manager container Id (usually starts with GTM-).
mdx-code-block
</APITable>

You can configure this plugin through preset options or plugin options.

config-tabs
// Preset Options: googleTagManager
// Plugin Options: @docusaurus/plugin-google-tag-manager

const config = {
  containerId: 'GTM-12345',
};
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu