EnglishDeploymentWeb Analytics

Web Analytics

Cloudflare offers a privacy-first, free Web Analytics service that you can easily integrate with your Nextra site.

Why Cloudflare Web Analytics?

  • Privacy: Does not use cookies or track personal data.
  • Performance: Extremely lightweight and runs on the edge.
  • Free: Included with your Cloudflare account.

How to Enable

  1. Go to your Cloudflare Dashboard.
  2. Navigate to Web Analytics.
  3. Click Add a site.
  4. Enter your domain (e.g., my-nextra3.pages.dev).
  5. You will get a JS snippet, but if you are using Cloudflare Pages, you don’t even need the snippet!

Automatic Setup for Pages

  1. Go to your Pages Project setting.
  2. Select Settings > Web Analytics.
  3. Click Enable Web Analytics.

That’s it! Cloudflare will automatically inject the necessary lightweight script into your pages at the edge. No code changes required.