Replies: 5 comments 5 replies
-
@nebrelbug existing discussion, maybe ask @anaclumos |
Beta Was this translation helpful? Give feedback.
-
@slorber according to the Vercel Docs, it seems like I just need to put the following code in the main app file: import { inject } from '@vercel/analytics';
inject(); Any idea on how I could do that? |
Beta Was this translation helpful? Give feedback.
-
I've simplified the installation process for Docusaurus plugins due to the hassle of verifying script domains and options. Additionally, I've added Vercel/Analytics. However, I haven't yet confirmed whether it integrates smoothly post-deployment. We can check out the code here: https://github.com/gracefullight/docusaurus-plugins/blob/main/packages/docusaurus-plugin-vercel-analytics/src/index.ts |
Beta Was this translation helpful? Give feedback.
-
@gracefullight thanks for sharing! I've installed the plugin for production. I'll let you know if there are any issues. |
Beta Was this translation helpful? Give feedback.
-
@anaclumos Thank you for mentioning Cloudflare Pages Web Analytics! My Docusaurus site is hosted with Azure static web apps; however, DNS is already going through Cloudflare. I didn't even have to switch over to Cloudflare Pages - enabling Cloudflare Analytics was as easy as enabling Cloudflare proxy for my Azure static web app CNAME entries in Cloudflare. Thanks again for the tip! I didn't even realize Cloudflare offered this service (for Free). If the site is proxied through Cloudflare, there is no need to copy the JS snippet into any code - the JS Snippet will be automatically injected. |
Beta Was this translation helpful? Give feedback.
-
Hey! Has anybody had luck adding Vercel Analytics to their Docusaurus site? I'd like to move away from Google Analytics.
Beta Was this translation helpful? Give feedback.
All reactions