SnapIT Analytics Documentation

Set up privacy-first website analytics in under 2 minutes. No coding experience required.

Quick Start

Get analytics running on your website in 3 steps:

1

Create a free account

Sign up at snapitanalytics.com with Google or email. You'll get an access key and your first tracking ID instantly.

2

Add the tracking snippet to your site

Paste this code into the <head> tag of every page you want to track:

HTML
<!-- SnapIT Analytics -->
<script>
  window.SNAPIT_TRACKING_ID = 'SA_your_tracking_id';
</script>
<script src="https://snapitanalytics.com/analytics.js" defer></script>

Replace SA_your_tracking_id with the tracking ID from your dashboard.

3

View your data

Open your dashboard. Page views, visitors, devices, countries, and traffic sources start appearing within seconds of your first visitor.

That's it. One snippet tracks all user activity on the page automatically — page views, scroll depth, clicks, time on page, devices, browsers, countries, and traffic sources. No extra code needed.

How It Works

SnapIT Analytics uses a lightweight JavaScript tracker (about 32 KB, about 9.5 KB compressed) that runs on your website. When a visitor loads a page:

  1. The tracker sends anonymous event data to the SnapIT API
  2. Events are stored in our database, tagged with your tracking ID
  3. Your dashboard aggregates the data into charts, tables, and insights

One tracking ID covers your entire website. The tracker automatically captures the full URL of every page, so you don't need to register individual pages. Just add the snippet to every page and you're done.

Create an Account

Visit snapitanalytics.com and click Get Started Free or Sign in with Google.

After signing up, you'll receive:

Add the Tracking Snippet

Add the snippet inside the <head> tag of your HTML. It works with any website — static HTML, React, Next.js, WordPress, Shopify, or any other platform.

Static HTML

HTML
<!DOCTYPE html>
<html>
<head>
    <title>My Website</title>

    <!-- SnapIT Analytics -->
    <script>window.SNAPIT_TRACKING_ID = 'SA_your_tracking_id';</script>
    <script src="https://snapitanalytics.com/analytics.js" defer></script>
</head>
<body>
    ...
</body>
</html>

React / Next.js

JSX
// In your _app.js, layout.js, or index.html
import Script from 'next/script';

export default function Layout({ children }) {
  return (
    <>
      <Script strategy="afterInteractive">
        {`window.SNAPIT_TRACKING_ID = 'SA_your_tracking_id';`}
      </Script>
      <Script
        src="https://snapitanalytics.com/analytics.js"
        strategy="afterInteractive"
      />
      {children}
    </>
  );
}

WordPress

Add the snippet to your theme's header.php file, or use a plugin like Insert Headers and Footers to paste it into the <head> section. No code editing required.

Verify It's Working

After adding the snippet:

  1. Open your website in a browser
  2. Open the SnapIT Dashboard
  3. You should see a page view appear within a few seconds
Debug mode: Add window.SNAPIT_DEBUG = true; before the analytics script to see tracking events logged in the browser console.

Track Multiple Pages

Use the same tracking ID on every page of your website. The tracker automatically captures the URL path, so each page shows up separately in your dashboard.

For a multi-page site, add the snippet to every HTML file. For a single-page app (SPA), the tracker detects URL changes automatically.

Track Multiple Websites

Each website gets its own tracking ID. In your dashboard, go to Websites → Add Website, enter the domain, and you'll get a new tracking ID. Each site's data is kept separate.

Dashboard Overview

Your dashboard shows real-time and historical analytics:

Managing Websites

Click Websites in the sidebar to see all your tracked sites. Each website card shows:

Page-Level Analytics

When you expand a website card, the Tracked Pages section shows every page that has received at least one visit, ranked by view count. Click View Analytics to see detailed charts and breakdowns for that entire site.

Page Views

Page views are tracked automatically. No extra code needed. Each time a visitor loads a page with the snippet, a pageview event is recorded with the URL, referrer, timestamp, device info, and country.

Custom Events

Track button clicks, form submissions, or any user action:

JavaScript
// Track a button click
snapit.track('button_click', {
  button: 'signup',
  location: 'hero'
});

// Track a form submission
snapit.track('form_submit', {
  form: 'contact',
  fields: 5
});

Conversions

Track revenue events with a name and dollar amount:

JavaScript
snapit.conversion('purchase', 49.99);
snapit.conversion('subscription_start', 14.99);

A/B Testing

Run split tests with automatic variant assignment:

JavaScript
var variant = snapit.abTest('hero-test', ['control', 'variant-a', 'variant-b']);

if (variant === 'variant-a') {
  document.getElementById('hero-title').textContent = 'New headline!';
}

The assigned variant stays the same for the rest of the visitor's tab session (kept in sessionStorage; no cookie is set).

REST API

Base URL: https://api.snapitanalytics.com

All authenticated endpoints require a JWT token in the Authorization: Bearer <token> header. Get a token by calling /auth/verify-key with your access key.

Get a JWT Token

cURL
curl -X POST https://api.snapitanalytics.com/auth/verify-key \
  -H "Content-Type: application/json" \
  -d '{"accessKey": "SA_your_access_key"}'

Response includes a token field valid for 24 hours.

Authentication Endpoints

EndpointMethodAuthDescription
/auth/signupPOSTPublicCreate account with email
/auth/loginPOSTPublicLogin with email
/auth/googlePOSTPublicGoogle OAuth sign-in
/auth/verify-keyPOSTPublicExchange access key for JWT
/auth/accountGETJWTGet account details

Track Events

EndpointMethodAuthDescription
/trackPOSTPublicRecord a single event
/track/batchPOSTPublicRecord multiple events

Single Event

cURL
curl -X POST https://api.snapitanalytics.com/track \
  -H "Content-Type: application/json" \
  -d '{
    "trackingId": "SA_your_tracking_id",
    "eventType": "pageview",
    "url": "https://yoursite.com/page",
    "userAgent": "Mozilla/5.0 ...",
    "sessionId": "unique-session-id",
    "timestamp": 1711234567890
  }'

Batch Events

cURL
curl -X POST https://api.snapitanalytics.com/track/batch \
  -H "Content-Type: application/json" \
  -d '{
    "trackingId": "SA_your_tracking_id",
    "events": [
      {"eventType": "pageview", "url": "https://yoursite.com/", ...},
      {"eventType": "click", "url": "https://yoursite.com/", ...}
    ]
  }'

Get Analytics

EndpointMethodAuthDescription
/analytics/{trackingId}GETJWTGet analytics data
/analytics/{trackingId}/heatmapGETJWTGet heatmap data
/analytics/{trackingId}/funnelPOSTJWTRun funnel analysis

Example: Get analytics for a site

cURL
curl https://api.snapitanalytics.com/analytics/SA_your_tracking_id?period=7d \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Query parameters: period — 24h, 7d, 30d, 90d

Response includes: pageViews, uniqueVisitors, sessions, bounceRate, topPages, topCountries, topSources, devices, browsers, hourlyData.

Manage Websites

EndpointMethodAuthDescription
/tracking/generatePOSTJWTAdd website, get tracking ID + snippet
/tracking/{trackingId}DELETEJWTRemove a website

Add a website via API

cURL
curl -X POST https://api.snapitanalytics.com/tracking/generate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{"websiteName": "My App", "domain": "myapp.com"}'

Response:

JSON
{
  "success": true,
  "trackingId": "SA_abc123def456",
  "trackingCode": "<!-- SnapIT Analytics -->\n<script>...",
  "website": { "name": "My App", "domain": "myapp.com" }
}
AI agent setup: Give your AI agent (Claude, ChatGPT, etc.) your access key. It can call /auth/verify-key to get a JWT, then /tracking/generate to register all your websites and generate snippets automatically. The agent can then paste the snippet into each page's HTML.

Privacy-First Design

What the script does and does not do (updated 30 October 2026):

The script sets no cookies in any mode, so it does not need your consent banner to work. If your site stores a consent choice of cookieConsent=declined (or rejected) in a cookie or localStorage, the script reads it and does not track that visitor at all. If you prefer to track only after consent, insert the script tag from your banner's accept handler instead of the page head.

GDPR and ePrivacy

The script avoids the things consent rules usually target: cookies, persistent identifiers and fingerprinting. Whether your site needs a banner also depends on your country and on everything else your site loads, so check your own obligations; we cannot give legal advice.

Pricing & Limits

PlanPriceEvents/moWebsitesReports keptRaw events keptAdds
Free$0100K36 months30 daysDashboard, real time, heatmaps, custom events, export
Starter$9/mo or $90/yr250K102 years90 daysFunnels, email support, 14-day trial
Pro$19/mo or $190/yr750K503 years90 daysPriority email support, 14-day trial
Business$49/mo or $490/yr2MUnlimited3 years90 daysPriority email support

An event is a page view, click, scroll milestone, form submit, Web Vitals report or custom event; one page view averages about 10. Over the limit, tracking continues and we email you at 80% and 100%. More than 2M events a month: contact sales. Full details: pricing.

Free forever. The free plan includes 100,000 events per month on 3 websites, with no card.