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 (under 30KB (4KB gzipped)) 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 WebsitesAdd 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 persists across sessions (via cookie if consented, otherwise per-session).

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: period24h, 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

SnapIT Analytics is designed for privacy by default:

The tracker works in two modes:

If a user explicitly declines (cookieConsent=declined), all tracking stops.

GDPR Compliance

In cookieless mode, SnapIT Analytics does not require a cookie consent banner under GDPR, as no personal data or cookies are stored. However, we recommend adding a banner for full transparency.

Pricing & Limits

PlanPriceEvents/moWebsitesRetentionFeatures
Free$0100K130 daysCore analytics, daily updates
Basic$14.99500K590 daysHourly updates, export
Pro$29.992M20180 daysHeatmaps, funnels, 5-min updates
Business$79.9910M1001 yearReal-time, white-label, API
Enterprise$149.9950MUnlimited2 yearsDedicated support
Premium$599.99UnlimitedUnlimitedUnlimitedDedicated infrastructure, 99.9% SLA
Free forever. The free plan includes 100,000 events per month and 1 website — more than enough for a personal site or small business getting started.