Skip to main content
The Clickbase widget is a single, tiny <script> you drop into your site’s <head>. It collects pageviews, sessions, autocapture events, and (optionally) Web Vitals, error tracking, and session replay — with no cookies by default. Every behavior is configured remotely from your dashboard, so the tag itself never changes.

Add the snippet

Paste this into your site’s <head>, replacing YOUR_SITE_KEY with your site’s tracking key:
Your tracking key and the exact snippet are shown on the site’s install screen in the dashboard — copy it from there so the values are filled in for you. A handful of optional data-* attributes tune advanced behavior (manual mode, path filtering, download extensions, event tagging) — see Configuration.

What loads at runtime

Beyond those install-time attributes, every behavior toggle — tracking mode, which autocapture events fire, whether Web Vitals / error tracking / session replay are on — is fetched once from your site’s remote configuration (GET /api/tracking-config/{trackingKey}) before the first pageview. Change those toggles in your dashboard and every visitor picks them up without touching the tag. See Configuration.

Single-page apps

The script tracks history navigations automatically — no extra setup for SPAs. See Pageviews & SPAs for what counts as a pageview and how URL parameters are handled.

Content Security Policy

If your site sends a Content-Security-Policy header, allow the widget to load and to send its hits:
  • script-src https://cdn.clickbase.so
  • connect-src https://clickbase.so

Verify it’s working

Once the snippet is live, open your site and then watch the site’s Realtime view in Clickbase — your own visit should appear within a few seconds. If nothing shows up, confirm the data-site-id matches your site’s tracking key and that no CSP or ad blocker is stripping cdn.clickbase.so.