Documentation

Guides for installing the tracker, reading the dashboard, and using the API.

API

All endpoints return JSON. Authentication via Bearer API key.

Base URL

https://antics-api.turtletech.us

Create an account API key in Dashboard > Settings. Send it as Authorization: Bearer $ANTICS_API_KEY. Event collection and the public share routes do not use that key. Authorization: Bearer $ANTICS_API_KEY

Sites

GET /api/sites

List all tracked sites.

POST /api/sites
{ "domain": "example.com", "name": "My Site" }
DELETE /api/sites/:id

Delete a site and all its data.

Stats

GET /api/stats/:site_id?period=30d&metric=pathname

Breakdown by metric. Periods: today, 7d, 30d, 12mo. Metrics: pathname, referrer, country, browser, os, device, channel, event.

Response includes previous_summary for percent-change calculation.

GET /api/stats/:site_id/timeseries?period=30d

Daily visitor and pageview counts for charting.

GET /api/stats/:site_id/realtime

Current visitors (last 5 minutes).

GET /api/stats/:site_id/journeys?period=30d

Top page sequences (user journeys).

GET /api/stats/:site_id/paths?period=30d

Path breakdown when you want a flat list rather than sequences.

GET /api/stats/:site_id/entry-exit?period=30d

Entry and exit page breakdown.

Links

GET /api/links

List short links for the workspace.

POST /api/links | PUT /api/links/:id | DELETE /api/links/:id

Create, update, or remove a short link.

GET /api/links/:id/stats?period=30d

Redirect totals and breakdowns for one link.

Export

GET /api/export/:site_id?period=30d&metric=pathname

CSV download. Omit metric for a daily summary. CSV export is available on Pro and Team.

Folders

GET /api/folders | POST /api/folders | PUT /api/folders/:id | DELETE /api/folders/:id

Organize sites into folders.

Alerts

POST /api/alerts
{ "site_id": "...", "metric": "visitors", "operator": "lt", "threshold": 10, "email": "you@example.com" }

Checked daily during rollup. Operators: lt (less than), gt (greater than).

Event collection

POST /api/event
{ "n": null, "u": "https://example.com/page", "r": "https://google.com", "w": 1920, "t": 5 }

No session auth required. Host sites can report tokenless events from their registered origin. Add k only when routing a registered path or project into its own site. n: event name (null = pageview), t: seconds on the previous page.

Tracker script

<script defer src="https://antics-api.turtletech.us/antics.js"></script>

The dependency-free collection tracker sets no cookies and writes no localStorage or sessionStorage. The server derives a daily pseudonymous visitor bucket from a random midnight-discarded salt, registered site, user agent, and IP address; analytics events do not store the raw IP address.

Custom events: antics.event('signup', {plan: "pro"});

<script defer src="https://antics-api.turtletech.us/antics.js" data-token="TRACKER_TOKEN"></script>

Use data-token for registered paths such as example.github.io/project or for a revocable site-pinned snippet.