Docs

Install the Visitorly tracker

The first-party script powers Real-Time, Audience, and Acquisition without Google or Clarity.

1. Get your data-key

After you add a site, Visitorly generates a unique public key for that site. Find it in:

  • Dashboard → Sites — copy the snippet for your domain
  • Dashboard → Setup — step 3 shows filled snippets with your real key

2. Simple install (HTML)

Add this inside <head>:

<script async src="https://YOUR_VISITORLY_HOST/t.js?key=YOUR_SITE_PUBLIC_KEY" data-key="YOUR_SITE_PUBLIC_KEY"></script>

3. Recommended for Next.js / Netlify / SPAs

Some frameworks reload scripts in a way that breaks data-key detection. Use this loader instead (same key + Visitorly host):

<script>
  window.__VISITORLY_KEY__="YOUR_SITE_PUBLIC_KEY";
  window.__VISITORLY_HOST__="https://YOUR_VISITORLY_HOST/t.js";
  (function(){var s=document.createElement("script");s.async=true;
  s.src=window.__VISITORLY_HOST__+"?key="+encodeURIComponent(window.__VISITORLY_KEY__);
  s.setAttribute("data-key",window.__VISITORLY_KEY__);
  document.head.appendChild(s);})();
</script>

4. Verify

  1. Deploy your site, hard-refresh, and browse a few pages (try without ad blockers).
  2. In Visitorly → Real-Time you should see hits within a few seconds.
  3. If still empty: domain must match Sites; DevTools → Network should show POST …/api/collect to the Visitorly host (not your website’s domain).

Next: Connect Google →