From 0425917a50aae78cebd3ec9501ff85411b3bd13e Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 1 Feb 2023 10:35:16 -0500 Subject: [PATCH] fix(preset-classic): install the right plugin for googleTagManager (#8597) --- packages/docusaurus-preset-classic/src/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-preset-classic/src/index.ts b/packages/docusaurus-preset-classic/src/index.ts index c1cc099c39bd..ff4f70602ae0 100644 --- a/packages/docusaurus-preset-classic/src/index.ts +++ b/packages/docusaurus-preset-classic/src/index.ts @@ -83,7 +83,10 @@ export default function preset( } if (googleTagManager) { plugins.push( - makePluginConfig('@docusaurus/plugin-google-gtag', googleTagManager), + makePluginConfig( + '@docusaurus/plugin-google-tag-manager', + googleTagManager, + ), ); } if (isProd && sitemap !== false) { @@ -93,7 +96,7 @@ export default function preset( throw new Error( `Unrecognized keys ${Object.keys(rest).join( ', ', - )} found in preset-classic configuration. The allowed keys are debug, docs, blog, pages, sitemap, theme, googleAnalytics, gtag. Check the documentation: https://docusaurus.io/docs/using-plugins#docusauruspreset-classic for more information on how to configure individual plugins.`, + )} found in preset-classic configuration. The allowed keys are debug, docs, blog, pages, sitemap, theme, googleAnalytics, gtag, and googleTagManager. Check the documentation: https://docusaurus.io/docs/using-plugins#docusauruspreset-classic for more information on how to configure individual plugins.`, ); }