From 050a2abf780ce276acc44fa8868a75edd494d4ad Mon Sep 17 00:00:00 2001 From: Vercel Date: Thu, 1 Oct 2026 04:35:07 +0000 Subject: [PATCH] Add Vercel Web Analytics integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implemented Vercel Web Analytics for this Docusaurus project. Summary: - Fetched the latest installation instructions from official Vercel documentation - Identified this is a Docusaurus project and used the official @docusaurus/plugin-vercel-analytics package - Installed the package using bun (the project's package manager) - Added the Vercel Analytics plugin configuration to docusaurus.config.ts Files Modified: - package.json - Added @docusaurus/plugin-vercel-analytics@^3.10.2 to dependencies - docusaurus.config.ts - Added 'vercel-analytics' plugin to the plugins array with mode: 'auto' - bun.lock - Updated lockfile with new dependency tree Implementation Details: The Vercel Analytics plugin was configured following Docusaurus best practices: - Plugin configured with 'mode: 'auto'' to automatically detect the environment - The plugin will only be active in production builds, not during development - No debug mode enabled to keep production logs clean Testing Performed: ✅ TypeScript compilation check passed (bun typecheck) ✅ Production build completed successfully (bun run build) ✅ All dependencies properly installed and resolved The analytics integration is now ready. When deployed to Vercel with analytics enabled in the dashboard, the site will automatically start tracking page views and web vitals. Co-authored-by: Vercel --- bun.lock | 5 +++++ docusaurus.config.ts | 6 ++++++ package.json | 1 + 3 files changed, 12 insertions(+) diff --git a/bun.lock b/bun.lock index b15b254..6b7397d 100644 --- a/bun.lock +++ b/bun.lock @@ -7,6 +7,7 @@ "dependencies": { "@docusaurus/core": "3.10.2", "@docusaurus/faster": "3.10.2", + "@docusaurus/plugin-vercel-analytics": "^3.10.2", "@docusaurus/preset-classic": "3.10.2", "@mdx-js/react": "^3.1.1", "clsx": "^2.1.1", @@ -401,6 +402,8 @@ "@docusaurus/plugin-svgr": ["@docusaurus/plugin-svgr@3.10.2", "", { "dependencies": { "@docusaurus/core": "3.10.2", "@docusaurus/types": "3.10.2", "@docusaurus/utils": "3.10.2", "@docusaurus/utils-validation": "3.10.2", "@svgr/core": "8.1.0", "@svgr/webpack": "^8.1.0", "tslib": "^2.6.0", "webpack": "^5.88.1" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-JgfT3jWM0TJ8Uw0cEcqxHpybngQY1vlBYpuuNO+gEh5iPh5Ar+vxq/u9CFrYsWeXy48BN7Db76Pzp2edNXUQ8A=="], + "@docusaurus/plugin-vercel-analytics": ["@docusaurus/plugin-vercel-analytics@3.10.2", "", { "dependencies": { "@docusaurus/core": "3.10.2", "@docusaurus/logger": "3.10.2", "@docusaurus/types": "3.10.2", "@docusaurus/utils": "3.10.2", "@docusaurus/utils-validation": "3.10.2", "@vercel/analytics": "^1.1.1", "tslib": "^2.6.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-HqpkNTn0KodZYYzOso1PneReTOhffG/XJ/EtKeMtc3a79isM33dz2pZaR/ynMO0Y13qkXTJxvvxF/Fjv5DL2fg=="], + "@docusaurus/preset-classic": ["@docusaurus/preset-classic@3.10.2", "", { "dependencies": { "@docusaurus/core": "3.10.2", "@docusaurus/plugin-content-blog": "3.10.2", "@docusaurus/plugin-content-docs": "3.10.2", "@docusaurus/plugin-content-pages": "3.10.2", "@docusaurus/plugin-css-cascade-layers": "3.10.2", "@docusaurus/plugin-debug": "3.10.2", "@docusaurus/plugin-google-analytics": "3.10.2", "@docusaurus/plugin-google-gtag": "3.10.2", "@docusaurus/plugin-google-tag-manager": "3.10.2", "@docusaurus/plugin-sitemap": "3.10.2", "@docusaurus/plugin-svgr": "3.10.2", "@docusaurus/theme-classic": "3.10.2", "@docusaurus/theme-common": "3.10.2", "@docusaurus/theme-search-algolia": "3.10.2", "@docusaurus/types": "3.10.2" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-a4B3VczmDl99zK0EufDQYomdJ186WDingjmDXxhN2PNPS9Ty/Y2M5CLFX1KQMRKqRTLiRDKfutzG5IY1FC/ceg=="], "@docusaurus/theme-classic": ["@docusaurus/theme-classic@3.10.2", "", { "dependencies": { "@docusaurus/core": "3.10.2", "@docusaurus/logger": "3.10.2", "@docusaurus/mdx-loader": "3.10.2", "@docusaurus/module-type-aliases": "3.10.2", "@docusaurus/plugin-content-blog": "3.10.2", "@docusaurus/plugin-content-docs": "3.10.2", "@docusaurus/plugin-content-pages": "3.10.2", "@docusaurus/theme-common": "3.10.2", "@docusaurus/theme-translations": "3.10.2", "@docusaurus/types": "3.10.2", "@docusaurus/utils": "3.10.2", "@docusaurus/utils-common": "3.10.2", "@docusaurus/utils-validation": "3.10.2", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "copy-text-to-clipboard": "^3.2.0", "infima": "0.2.0-alpha.45", "lodash": "^4.17.21", "nprogress": "^0.2.0", "postcss": "^8.5.4", "prism-react-renderer": "^2.3.0", "prismjs": "^1.29.0", "react-router-dom": "^5.3.4", "rtlcss": "^4.1.0", "tslib": "^2.6.0", "utility-types": "^3.10.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-JqTSLQmqmA9uKWZsD5iwBGJ4JyKB4/yTw6PsSXVPRJG/6GAm/u+add9Iip+hvwP12/AnPNztrdxsI14NJW4KeA=="], @@ -751,6 +754,8 @@ "@ungap/structured-clone": ["@ungap/structured-clone@1.3.0", "", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="], + "@vercel/analytics": ["@vercel/analytics@1.6.1", "", { "peerDependencies": { "@remix-run/react": "^2", "@sveltejs/kit": "^1 || ^2", "next": ">= 13", "react": "^18 || ^19 || ^19.0.0-rc", "svelte": ">= 4", "vue": "^3", "vue-router": "^4" }, "optionalPeers": ["@remix-run/react", "@sveltejs/kit", "next", "react", "svelte", "vue", "vue-router"] }, "sha512-oH9He/bEM+6oKlv3chWuOOcp8Y6fo6/PSro8hEkgCW3pu9/OiCXiUpRUogDh3Fs3LH2sosDrx8CxeOLBEE+afg=="], + "@webassemblyjs/ast": ["@webassemblyjs/ast@1.14.1", "", { "dependencies": { "@webassemblyjs/helper-numbers": "1.13.2", "@webassemblyjs/helper-wasm-bytecode": "1.13.2" } }, "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ=="], "@webassemblyjs/floating-point-hex-parser": ["@webassemblyjs/floating-point-hex-parser@1.13.2", "", {}, "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA=="], diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 1371f19..ab61346 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -95,6 +95,12 @@ const config: Config = { lang: 'ruby', repo: 'LacusSolutions/br-utils-ruby', }), + [ + 'vercel-analytics', + { + mode: 'auto', + }, + ], ], themeConfig: { diff --git a/package.json b/package.json index b0e64f7..6ca8abf 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "dependencies": { "@docusaurus/core": "3.10.2", "@docusaurus/faster": "3.10.2", + "@docusaurus/plugin-vercel-analytics": "^3.10.2", "@docusaurus/preset-classic": "3.10.2", "@mdx-js/react": "^3.1.1", "clsx": "^2.1.1",