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:
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.
Add the tracking snippet to your site
Paste this code into the <head> tag of every page you want to track:
<!-- 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.
View your data
Open your dashboard. Page views, visitors, devices, countries, and traffic sources start appearing within seconds of your first visitor.
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:
- The tracker sends anonymous event data to the SnapIT API
- Events are stored in our database, tagged with your tracking ID
- 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:
- Access Key — your unique account identifier (e.g.,
SA_xxxxxxxxxxxxxxxx) - Tracking ID — a unique ID for your first website (e.g.,
SA_5aac5edc3cee) - Tracking snippet — ready-to-paste HTML code
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
<!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
// 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:
- Open your website in a browser
- Open the SnapIT Dashboard
- You should see a page view appear within a few seconds
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:
- Page Views — total and per-page breakdown
- Unique Visitors — distinct visitors per day, counted on the server from a daily-salted hash (a person who returns on another day counts again)
- Traffic Sources — Google, social media, direct, referral
- Countries — visitor geography via CloudFront headers
- Devices & Browsers — desktop/mobile/tablet, Chrome/Safari/Firefox
- Hourly Breakdown — see what time of day traffic peaks
- Top Pages — most visited pages ranked by views
- Funnel Analysis — track conversion paths (Starter plan and above)
- Heatmaps — click and scroll heatmaps (every plan)
Managing Websites
Click Websites in the sidebar to see all your tracked sites. Each website card shows:
- 7-day page view and visitor counts
- Click to expand: analytics button, tracking snippet, tracked pages list
- All pages are auto-discovered — no need to register them individually
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:
// 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:
snapit.conversion('purchase', 49.99);
snapit.conversion('subscription_start', 14.99);A/B Testing
Run split tests with automatic variant assignment:
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 -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
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/auth/signup | POST | Public | Create account with email |
/auth/login | POST | Public | Login with email |
/auth/google | POST | Public | Google OAuth sign-in |
/auth/verify-key | POST | Public | Exchange access key for JWT |
/auth/account | GET | JWT | Get account details |
Track Events
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/track | POST | Public | Record a single event |
/track/batch | POST | Public | Record multiple events |
Single Event
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 -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
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/analytics/{trackingId} | GET | JWT | Get analytics data |
/analytics/{trackingId}/heatmap | GET | JWT | Get heatmap data |
/analytics/{trackingId}/funnel | POST | JWT | Run funnel analysis |
Example: Get analytics for a site
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
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/tracking/generate | POST | JWT | Add website, get tracking ID + snippet |
/tracking/{trackingId} | DELETE | JWT | Remove a website |
Add a website via API
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:
{
"success": true,
"trackingId": "SA_abc123def456",
"trackingCode": "<!-- SnapIT Analytics -->\n<script>...",
"website": { "name": "My App", "domain": "myapp.com" }
}/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):
- No cookies, no localStorage — the script never writes either, whatever the visitor's consent choice
- No fingerprinting — it does not read canvas, WebGL, fonts or hardware details
- One tab-scoped id — a random id in sessionStorage joins the pages of one visit; the browser deletes it when the tab closes
- No stored IP addresses — unique visitors are a SHA-256 hash of a random salt of the day, the site, the IP address and the browser; the salt is replaced daily and deleted after two days, and the IP address itself is never written
- Country-level geo only — from the CloudFront country header, no city or IP geolocation
- Respects Do Not Track and Global Privacy Control — no tracking when either is on
- Credentials stripped — tokens, keys and OAuth codes are removed from recorded URLs
- Retention — reports are kept 6 months (Free), 2 years (Starter) or 3 years (Pro, Business); individual events 30 days (Free) or 90 days (paid), then deleted automatically
Cookie Consent
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
| Plan | Price | Events/mo | Websites | Reports kept | Raw events kept | Adds |
|---|---|---|---|---|---|---|
| Free | $0 | 100K | 3 | 6 months | 30 days | Dashboard, real time, heatmaps, custom events, export |
| Starter | $9/mo or $90/yr | 250K | 10 | 2 years | 90 days | Funnels, email support, 14-day trial |
| Pro | $19/mo or $190/yr | 750K | 50 | 3 years | 90 days | Priority email support, 14-day trial |
| Business | $49/mo or $490/yr | 2M | Unlimited | 3 years | 90 days | Priority 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.