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 (under 30KB (4KB gzipped)) 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_0c1ec8ab83f04d2e) - 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 users (session-based in cookieless mode)
- 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 (Pro plan and above)
- Heatmaps — click and scroll heatmaps (Pro plan and above)
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 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 -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
SnapIT Analytics is designed for privacy by default:
- Cookieless by default — no cookies are set unless the visitor explicitly consents via your cookie banner
- No personal data — we don't track names, emails, or IP addresses in analytics
- Country-level geo only — derived from CloudFront headers, not IP geolocation
- Respects Do Not Track — if a visitor has DNT or Global Privacy Control enabled, no tracking occurs
- Lightweight — under 30KB (4KB gzipped), no third-party dependencies
Cookie Consent
The tracker works in two modes:
- Cookieless mode (default) — no cookies set, visitor identity is session-based only
- Full mode — when user accepts cookies (
cookieConsent=acceptedin cookie or localStorage), enables returning visitor tracking, UTM persistence, and A/B test persistence across sessions
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
| Plan | Price | Events/mo | Websites | Retention | Features |
|---|---|---|---|---|---|
| Free | $0 | 100K | 1 | 30 days | Core analytics, daily updates |
| Basic | $14.99 | 500K | 5 | 90 days | Hourly updates, export |
| Pro | $29.99 | 2M | 20 | 180 days | Heatmaps, funnels, 5-min updates |
| Business | $79.99 | 10M | 100 | 1 year | Real-time, white-label, API |
| Enterprise | $149.99 | 50M | Unlimited | 2 years | Dedicated support |
| Premium | $599.99 | Unlimited | Unlimited | Unlimited | Dedicated infrastructure, 99.9% SLA |