Installation
1. Add a Site
Sign in, open your Organization and choose Add a website. Give it a name, the domain you track, such as
example.com, and the timezone your days should follow. Each Site belongs to one Organization, and a domain can be added once per
Organization.
2. Copy the tracking snippet
Open the Site's Settings → Install. The Tracking code card shows the snippet with your Site's id filled in. It looks like this:
<script defer data-site="YOUR_SITE_ID" src="https://supersaasanalytics.com/sd.js"></script>Put it on every page of the website, ideally just before the closing </body> tag. The defer attribute keeps it
from slowing the page down, and the script is under 1 KB gzipped.
data-site and sends its hits to /collect on the same origin it was loaded from. If
data-site is missing, it does nothing.3. Check that it works
Open your website in a browser, then open the Site's Live page in the dashboard. You should appear as a Live visitor within a few seconds.
If nothing shows up:
- Check the browser's network tab for a request to
/collectthat answers204. The answer is always204, even when the hit is dropped, so a204alone does not prove the hit was stored. - Make sure your IP or the page's path is not excluded in Settings → Filtering. See Excluding traffic.
- Ad blockers may block the script on another domain. Proxy it through your own domain to avoid that.
What is collected automatically
With only the script tag, every page reports:
- Pageviews, with the path, the page title, the referrer's domain and any
utm_source,utm_medium,utm_campaign,utm_termandutm_contentparameters. The rest of the query string and the#hashare never sent, because they can hold personal data. - Route changes in single-page apps, through the History API (
pushState,replaceStateand the back button). - Outbound links: clicks on links to another domain.
- Contact clicks:
tel:,mailto:and WhatsApp links, as the EventsPhone click,Email clickandWhatsApp click. - Form submits, as the Event
Form submit. - Clicks on marked elements, any element with a
data-sd-eventattribute. See Events.
It never captures every button or every click. Country, region, city, browser, operating system and device type come from the request itself on our side.
Next steps
- Frameworks: Nuxt, Next.js and plain HTML.
- Events: report sign-ups, purchases and other actions.
- Privacy model: why there is no cookie banner to add.