Docs menu
Implementation
Tracker
Sealmetrics' 2.2 KB JavaScript tracker (uncompressed): one-line install, no cookies or localStorage, automatic SPA detection, and size comparisons vs GA4.
Ultra-lightweight JavaScript tracker for collecting analytics data.
| Specification | Value |
|---|---|
| Size (uncompressed, measured 3 Dec 2026) | 2,213 bytes (~2.2 KB) |
| Dependencies | None (vanilla JavaScript) |
| Cookies | None |
| localStorage | None |
| sessionStorage | None |
| Browser support | Chrome 60+, Firefox 55+, Safari 11.1+, Edge 79+ |
| Accounts per page | One |
Size Comparison
Script size, uncompressed for every script (the size of the code), against the tracker scripts of established analytics platforms. All measured on 3 December 2026. These are dated snapshots: vendors change their scripts, and so do we.
| Platform | Uncompressed | vs Sealmetrics | Measured |
|---|---|---|---|
| Sealmetrics | 2.2 KB (2,213 B) | — | 3 Dec 2026 |
| Piwik PRO | ~69 KB | ~32× heavier | 3 Dec 2026 |
| Mixpanel | ~126 KB | ~58× heavier | 3 Dec 2026 |
| Matomo | ~222 KB | ~103× heavier | 3 Dec 2026 |
| PostHog | ~400 KB | ~185× heavier | 3 Dec 2026 |
| Google Analytics 4 | ~437 KB | ~202× heavier | 3 Dec 2026 |
| Adobe Analytics | ~730 KB parsed | ~330× heavier | field measurement, Jul 2026 |
Quick Start
Add one line to your HTML:
<script src="https://t.sealmetrics.com/t.js?id=YOUR_ACCOUNT_ID" defer></script>This script:
- Loads asynchronously (does not block page rendering)
- Tracks the initial pageview automatically
- Detects SPA navigation automatically (React, Vue, Angular, Next.js)
API
| Function | Purpose | Example |
|---|---|---|
sealmetrics() | Manual pageview | sealmetrics() |
sealmetrics({ group }) | Pageview with content grouping | sealmetrics({ group: 'blog' }) |
sealmetrics.conv(type, amount) | Conversion | sealmetrics.conv('purchase', 99.99) |
sealmetrics.conv(type, amount, props) | Conversion with properties | sealmetrics.conv('purchase', 99.99, { currency: 'EUR' }) |
sealmetrics.micro(type) | Microconversion | sealmetrics.micro('add_to_cart') |
sealmetrics.micro(type, props) | Microconversion with properties | sealmetrics.micro('add_to_cart', { product_id: 'SKU-123' }) |
Global Variables
The tracker exposes three identical global variables:
| Variable | Recommendation |
|---|---|
sealmetrics | Recommended (unique, no conflicts) |
sm | Short form |
_sm | Backup if others conflict |
// All three work identically:
sealmetrics.conv('purchase', 99.99);
sm.conv('purchase', 99.99);
_sm.conv('purchase', 99.99);Privacy
The tracker does not collect or store:
- Cookies
- IP addresses (checked in flight against a public list of automated-traffic IPs and your IP exclusions, then discarded — never stored)
- Personal identifiable information
- Form inputs
- User credentials
- localStorage or sessionStorage data
Session identification is cookieless: the tracker computes, in the browser, a hash of standard device characteristics (no canvas fingerprinting) that is never written to the device and is re-keyed on the server with a daily salt, so nothing stored can link a device across days. See What We Track.
Documentation
Getting Started
- Step-by-Step Guide - Complete visual guide from zero to tracking
- Installation - Script tag, content grouping, custom domains
Tracking Events
- Conversions - Tracking purchases, leads, signups
- Microconversions - Tracking funnel steps, engagement events
Advanced
- API Reference - Complete technical reference
- SPA Support - React, Vue, Angular, Next.js integration
- First-Party Setup - Custom domain for tracking
- Tracker v1 to v2: Breaking Changes - Breaking changes and code examples