Documentation

Everything you need to set up and use INSG.

Quick Start

1. Create an account

Sign up for free — no credit card required.

2. Add your site

Go to your dashboard and click "Add Site". Enter your domain (e.g. example.com).

3. Install the tracking script

Copy the script tag from your site settings and paste it into the <head> of your website:

<script defer src="https://sbda.io/tracker.js" data-site-id="YOUR_SITE_ID"></script>

4. View your analytics

Data appears within seconds. Visit your site, then check the dashboard.

Tracking Script Reference

Basic installation

<script defer src="https://sbda.io/tracker.js" data-site-id="YOUR_SITE_ID"></script>

Place this in the <head> of every page. If you use a shared layout or template, you only need to add it once.

How it works

  • The script is ~1.6 KB gzip with default modules and loads asynchronously — it won't slow your site down.
  • It sends a lightweight request per pageview to the edge, plus small event beacons as visitors interact (scroll, click, etc.).
  • No cookies are set. No fingerprinting occurs. No personal data is stored.
  • Unique visitors are counted using an irreversible anonymization pipeline — it is mathematically impossible to extract individual visitor data from what we store.
  • The script automatically captures: page URL, referrer, country (from edge location, not from IP), browser, device type, and screen size.
  • Bot traffic is automatically filtered — known crawlers, scrapers, headless browsers, and monitoring services are dropped server-side before any data is stored. AI bots (GPTBot, ClaudeBot, etc.) are tracked separately as their own channel.

Single-page apps (SPA)

The tracker automatically detects pushState navigation. Works out of the box with React, Vue, Svelte, Next.js, Nuxt, SvelteKit, Astro, and other SPA frameworks.

Excluding traffic

To exclude your own visits during development, add localStorage.setItem('insg_ignore', '1') in your browser console. The tracker reads this flag but never writes to localStorage or any other client storage. When the flag is set, the tracker will skip sending data for that browser.

Content Security Policy

If your site uses a CSP, add these directives:

script-src https://sbda.io; connect-src https://sbda.io;

Framework Guides

HTML / Static Sites

Add the script tag to your HTML <head>.

<head>
  <script defer src="https://sbda.io/tracker.js" data-site-id="YOUR_SITE_ID"></script>
</head>

Next.js

Add to app/layout.tsx or pages/_app.tsx:

import Script from 'next/script'

<Script
  defer
  src="https://sbda.io/tracker.js"
  data-site-id="YOUR_SITE_ID"
  strategy="afterInteractive"
/>

Astro

Add to your base layout's <head>:

<head>
  <script defer src="https://sbda.io/tracker.js" data-site-id="YOUR_SITE_ID"></script>
</head>

WordPress

Add to your theme's functions.php:

function insg_script() {
  echo '<script defer src="https://sbda.io/tracker.js" data-site-id="YOUR_SITE_ID"></script>';
}
add_action('wp_head', 'insg_script');

Vue / Nuxt

In Nuxt, add to nuxt.config.ts:

export default defineNuxtConfig({
  app: {
    head: {
      script: [
        { src: 'https://sbda.io/tracker.js', defer: true, 'data-site-id': 'YOUR_SITE_ID' }
      ]
    }
  }
})

SvelteKit

Add to src/app.html:

<head>
  <script defer src="https://sbda.io/tracker.js" data-site-id="YOUR_SITE_ID"></script>
</head>

Gatsby

Add to gatsby-ssr.js:

export const onRenderBody = ({ setHeadComponents }) => {
  setHeadComponents([
    <script
      key="insg"
      defer
      src="https://sbda.io/tracker.js"
      data-site-id="YOUR_SITE_ID"
    />,
  ]);
};

Dashboard

Your dashboard organizes analytics across several tabs — Overview, Content, Acquisition, Behavior, Technology, Flows, Intelligence, and Compliance — each focused on a specific area:

At a glance

  • Smart Insights — Automated analysis comparing current vs. previous period, surfacing trends and notable changes
  • Stat cards with % change — Pageviews, visitors, bounce rate, and avg. duration with green/red indicators vs. previous period
  • Real-time visitors — Live count of people on your site right now
  • Time chart — Interactive area chart with gradient fill, toggle between pageviews and visitors, hover tooltips
  • Annotations — Mark launches, campaigns, and events on your timeline
  • Active Hours Heatmap — Hour-by-day grid showing when your visitors are most active

Traffic breakdown

  • Top Pages & Entry Pages — Most visited pages and landing pages
  • Channels — Traffic sources auto-grouped into Direct, Search, Social, Email, and Referral
  • Referrers — Individual domains sending you traffic
  • Countries, Browsers, OS, Devices — Geographic and technical breakdown
  • UTM Sources & Campaigns — Track marketing campaigns

Events

  • Custom events, outbound links, file downloads, 404 errors — All tracked automatically or via the JS API

Behavior

  • Rage Clicks — Detects rapid repeated clicks on elements, signaling user frustration
  • Dead Clicks — Clicks on non-interactive elements that produce no response
  • Reading Speed — Classifies visitors as scanners, average readers, or deep readers based on time on page vs. content length
  • Scroll Hesitation — Detects where visitors pause during scrolling
  • Copy Tracking — Records when visitors copy text from your pages

Performance

  • Core Web Vitals — LCP, CLS, INP with Good/Needs Work/Poor ratings
  • Scroll Depth — 25%, 50%, 75%, 100% visualization
  • Page Performance Scores — 0-100 score per page based on popularity, engagement, and depth

Flows (Standard & Pro)

  • Sankey Flow Diagrams — Visualize page-to-page transitions with proportional flow widths
  • Auto-Detected Funnels — Common conversion paths identified automatically with drop-off rates at each step
  • Entry & Exit Pages — Where sessions start and where they end
  • Revenue Attribution — Connect Stripe revenue to traffic sources via UTM campaign metadata

Intelligence (Pro)

  • Smart Scores — Engagement, friction, and conversion potential scores for every page
  • Friction Alerts — Automatically surfaces pages with high rage clicks, dead clicks, or bounce rates
  • Conversion Opportunities — Identifies high-traffic pages with untapped conversion potential
  • AI-Powered Analysis — Contextual recommendations based on behavioral patterns and traffic trends

Interactive filtering

Click on any page, referrer, country, browser, or device in the lists to filter the entire dashboard by that value. Active filters appear as blue pills at the top — click the X to remove.

CSV export

Click "Export CSV" in the top bar to download your analytics data as a CSV file. The export includes time series, top pages, referrers, countries, and browsers.

Public dashboards

Share a read-only version of your analytics with anyone. Toggle the "Public Dashboard" switch and share the link. Public dashboards show all stats but don't allow annotation editing or configuration changes.

Stats badge

Embed a live visitor count SVG badge on your website or GitHub README.

What the Tracker Captures Automatically

The tracker handles all of this out of the box — no extra JavaScript, no configuration. Just add the script tag and everything works:

Core (always on)

  • Pageviews & visitors — Every page load, with referrer, UTM parameters, and screen size
  • Session tracking — Random token links pageviews within a tab (dies on tab close)
  • Attention & duration — Time spent on page, adjusted for tab switches
  • SPA navigation — Detects pushState/popstate for React, Vue, Svelte, etc.
  • UTM attribution — Captures and stores first-touch UTM parameters automatically

Interaction modules (automatic)

  • Outbound links — Clicks on links to external domains
  • File downloads — Clicks on .pdf, .zip, .dmg, .exe, .doc, .xls, .csv, and more
  • Rage clicks — Rapid repeated clicks on the same spot (signals frustration)
  • Dead clicks — Clicks on non-interactive elements (signals broken UX)
  • Copy tracking — When visitors copy text from your pages

Engagement modules (automatic)

  • Scroll depth — 25%, 50%, 75%, 100% milestones
  • Scroll hesitation — Detects where visitors pause while scrolling
  • Reading speed — Classifies visitors as readers, skimmers, or scanners based on time vs. content length

Performance modules (automatic)

  • Core Web Vitals — LCP, CLS, INP sent automatically on page exit

Advanced modules (automatic)

  • Hover aggregates — Tracks which elements visitors hover over and for how long
  • CTA visibility — Measures how long call-to-action elements are visible in the viewport
  • Keyboard interactions — Detects Tab navigation, Enter presses, and keyboard shortcut usage
  • JS error counts — Captures unhandled JavaScript errors per page without storing stack traces
  • Network hints — Records connection type and effective bandwidth for performance correlation
  • Mobile insights — Touch gesture patterns, orientation changes, and viewport resize events
  • Click heatmap — Aggregated click coordinates for visual heatmap overlays
  • DOM snapshot — Lightweight page structure fingerprint for layout change detection
  • Product page intelligence — Detects product pages and tracks add-to-cart, variant selection, and image gallery interactions

404 detection (one meta tag)

The only thing that requires any setup. Add this meta tag to your 404 error page:

<meta name="insg-status" content="404">

Custom events (optional JS)

For tracking business-specific actions like signups or purchases, the tracker exposes a simple API. This is the only part that requires writing JavaScript:

// Track a signup
window.insg.event('signup', 'pro-plan');

// Track a purchase
window.insg.event('purchase', JSON.stringify({plan: 'pro', price: 10}));

Custom events appear in the Events tab on your dashboard.

Revenue attribution (optional, 2 lines)

To connect Stripe revenue to traffic sources, pass attribution data to your checkout:

const attribution = window.insg.getAttribution();
// Pass as metadata to your Stripe checkout session

The tracker automatically stores first-touch UTM data. You just retrieve it at checkout time.

Timeline Annotations

Mark important events on your analytics timeline — product launches, blog posts, marketing campaigns, or outages. Annotations appear as badges below your time series chart, making it easy to correlate traffic changes with real-world events.

To add an annotation, expand the "+ Add annotation" section below your chart, pick a date, write a short note (max 280 characters), and click Add.

Billing

Billing is handled through Stripe. You can upgrade, downgrade, or cancel anytime from your dashboard.

  • Upgrading — Takes effect immediately. You're charged a prorated amount.
  • Downgrading — Takes effect at the end of your current billing period.
  • Canceling — Your plan remains active until the end of the billing period, then reverts to Free.

Privacy & Compliance

INSG is designed to be compliant with privacy regulations by default:

  • GDPR — No personal data is collected. No consent banner required.
  • CCPA — No personal information is sold or shared.
  • PECR — No cookies or similar technologies are used.

IP addresses are processed transiently in server memory, combined with a daily rotating salt, and fed into an irreversible mathematical counting structure — the IP is never stored and cannot be recovered. We don't set cookies, don't use fingerprinting, and don't build individual user profiles. The data we store (page URL, referrer, country, browser, device) is aggregate by nature and cannot be used to identify individuals.

Stats API

The Stats API lets you access your analytics data programmatically — build custom dashboards, integrate with internal tools, or pull data into spreadsheets. Available on the Pro plan.

Full API documentation is available in your Pro account dashboard under Settings → API.

Support

Need help? Email us at hello@insg.io. Standard and Pro customers get priority response times.