vercel/analytics

Integration with Docusaurus

onattech opened this issue · 1 comments

Is there a way to integrate vercel analytics with Docusaurus?

Hey!

I think there are two ways you could achieve this using Docusaurus.

  1. Adding a script tag
    Add our tracking script to docusaurus.config.js : https://docusaurus.io/docs/api/docusaurus-config#scripts
 scripts: [
    {
      src: '/_vercel/insights/script.js',
      defer: true,
    },
  ],
  1. Swizzling your theme https://docusaurus.io/docs/swizzling#wrapper-your-site-with-root

There might be other ways to add it but I am not too familiar with docusaurus.

I hope that helps