π¦ 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.
Installation
Section titled βInstallationβnpm install --save @docusaurus/plugin-google-tag-managerConfiguration
Section titled βConfigurationβAccepted fields:
<APITable>| Name | Type | Default | Description |
|---|---|---|---|
containerId |
string |
Required | Your Tag Manager container Id (usually starts with GTM-). |
</APITable>Example configuration
Section titled βExample configurationβYou can configure this plugin through preset options or plugin options.
// Preset Options: googleTagManager
// Plugin Options: @docusaurus/plugin-google-tag-manager
const config = {
containerId: 'GTM-12345',
};