How to add analytics to Notion sites

Notion's own published pages don't let you add custom scripts. To get analytics on a Notion-powered site, publish it through a builder like Super or Potion, which let you add code to the head.

No cookies, no banner ~3 KB script About 2 minutes

Before you start

Create a free Cool Analytics account and add your site. You'll get a site ID — replace YOUR_SITE_ID in the code below with it. The dashboard shows the snippet with your ID already filled in.

Install on Notion sites

  1. 1Connect your Notion page to Super (super.so) or Potion (potion.so) and set up your site.
  2. 2In the site's settings, open the custom code section and paste the snippet into the Head field.
  3. 3Save and publish. Super and Potion sites navigate client-side, which is tracked automatically.
Super / Potion → site settings → Code → Head
<script defer src="https://coolanalytics.dev/hb.js" data-site="YOUR_SITE_ID"></script>

Check that it works

Open your live site in a new tab, then open your Cool Analytics dashboard. Your visit appears on the live map within seconds — with the page you're on, where you came from and your browser.

Nothing showing up? Make sure you're looking at the published site (not a preview or editor), that an ad blocker isn't blocking the script, and that you're not testing on localhost.

Track signups, purchases and clicks

Pageviews, sources, countries and outbound link clicks are tracked automatically. For the moments that matter to you, send a custom event. Events named like a signup show up as signups, and events with an amount show up as revenue — on the live map and per traffic source.

custom events
// anywhere in your Notion sites site's browser code
window.hb?.track("signup");

// with an amount, it shows up as revenue
window.hb?.track("purchase", { amount: 49 });

Notion sites tips

  • Notion's native “Publish to web” pages (notion.site) don't accept third-party scripts, so this tracker can't run there.
  • Custom code on Super and Potion may depend on your plan with them — check their pricing page.

Want to keep your own visits out of the stats? Open your site once with #hb-ignore at the end of the URL. That browser is excluded until you visit with #hb-track.

Notion sites analytics FAQ

Can I add analytics to a plain notion.site page?+

Not with custom scripts — Notion doesn't allow them. You need a site builder on top of Notion.

Which is better for this, Super or Potion?+

Both let you add head code. Pick the one whose themes and pricing suit you; the snippet is the same.

Will each Notion page show separately?+

Yes. Each page has its own path on your custom domain, so you'll see per-page stats and journeys.

See who's on your Notion sites site right now.

One line of code. No cookies. 7 days free.