Use case · Developers
Analytics for developers: a script tag, an API, a CLI and an MCP server
npx visitrack CLI, server-side events and an MCP server.Updated
Developers want analytics to behave like any other service: documented endpoints, scoped keys, predictable rate limits, CSV and JSON out, nothing magical in the browser. And increasingly, they want their AI coding assistant to read the numbers and set up tracking for them.
VisitTrack's script needs no build step and handles SPA route changes automatically. Everything in the dashboard is on a versioned REST API, the CLI wraps that API one command per request, POST /api/track takes server-side events, and the MCP server lets Claude, ChatGPT, Cursor and other clients query your analytics — and, with the right scope, create goals and funnels.
What developers actually measure
1.Docs and README-to-signup conversion
Which docs pages and quickstarts start journeys that end in an account or an API key — the developer-product equivalent of a landing page.
2.Real-user Core Web Vitals
LCP, INP, CLS, FCP and TTFB per page from real browsers, without adding a separate RUM tool.
3.JavaScript errors in production
Uncaught errors are recorded automatically as
js_error(message, file, line; max five per page) — a lightweight early warning, not a replacement for Sentry.4.Server-side conversions
Events from webhooks and workers (
checkout_completed,build_finished) joined to the visitor's browser history through the visitor id.5.AI crawlers and AI referrals
Which AI crawlers read your docs (verified by reverse DNS, never billed) and how many visitors arrive from ChatGPT, Perplexity or Claude.
Questions developers ask (often from the terminal)
- How did traffic do this week, and from where?
npx visitrack stats --days 7andnpx visitrack referrers --days 7, or ask the assistant connected over MCP.- Which custom events does the site actually send?
GET /api/v1/events(or the MCPlist_eventstool) lists event names with counts and example props — check it before building goals.- Can my AI assistant set up a signup funnel?
- Yes, with a
write:configkey or connection: it getscreate_goalandcreate_funneltools. Creates are idempotent by name, and every change is logged in Settings → Activity. - How do I attribute a server-side signup?
- Carry
window.visitrack.visitorId()through the flow andPOST /api/trackwith it from your OAuth callback.
How to set up VisitTrack as a developer
Add the script
In Next.js, use
next/scriptin the root layout (Next.js guide); anywhere else, the plain tag. Add the origin toscript-srcandconnect-srcif you send a CSP.data-debuglogs every event to the console.<script defer data-site="SITE_ID" src="https://visitrack.app/tracker.js"></script>Type the global once
Optional chaining keeps calls safe when an ad blocker stops the script.
declare global { interface Window { visitrack?: ((name: string, props?: Record<string, unknown>) => void) & { identify?: (userId: string, traits?: Record<string, unknown>) => void; visitorId?: () => string; }; } }Query from code or the terminal
Create a key in Settings → API / MCP. Rate limit is 120 requests a minute per key; add
format=csvto row resources. Reference: API reference.export VISITRACK_API_KEY=... npx visitrack stats --days 30 npx visitrack pages --days 7 --json | jq . curl -H "Authorization: Bearer $VISITRACK_API_KEY" "https://visitrack.app/api/v1/referrers?days=30&format=csv"Connect your AI assistant over MCP
Clients with MCP sign-in (Claude, ChatGPT connectors, Claude Code, Cursor) only need the URL; others take the same config with an
Authorizationheader. See MCP setup.{ "mcpServers": { "visitrack": { "type": "http", "url": "https://visitrack.app/api/mcp" } } }Send events from the server
For webhooks, background jobs and OAuth callbacks. Rate limit: 300 requests per 10 seconds per key. See server-side events.
curl -X POST https://visitrack.app/api/track \ -H "Authorization: Bearer $VISITRACK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"type":"event","visitorId":"VISITOR_ID","name":"build_finished","props":{"ms":8420}}'
Example: a developer tool's docs-led growth, read from the CLI
An open-core API product with docs, a blog and a dashboard; numbers pulled by a weekly script and pasted into the team channel.
| Metric | Value | What it tells you |
|---|---|---|
| Visitors (7 days) | 6,840 | 62% land on /docs pages |
| Signups | 171 | Quickstart page starts 40% of signup journeys |
| api_key_created (server event) | 118 | 69% of signups — the activation event |
| INP p75 on /docs/search | 410 ms | A slow client-side search index — flagged by Web Vitals |
| js_error events | 2,310 | One unhandled promise in the code playground |
| AI crawler hits | 18,400 (not billed) | GPTBot and ClaudeBot read the API reference daily |
Illustrative numbers for a typical site of this kind, not real customer data.
The quickstart is the product's best landing page, the docs search needs a performance fix, and the code playground has a bug no one reported. All three came out of a 20-line script and two npx visitrack commands.
VisitTrack vs PostHog, Umami and Vercel Analytics for developers
Third-party details as of October 2026; check each vendor's docs for current limits.
| VisitTrack | PostHog | Umami | Vercel Web Analytics | |
|---|---|---|---|---|
| Install | Script tag, no SDK | SDK (JS and many languages) | Script tag | Package or script on Vercel projects |
| API / CLI / MCP | REST API, CLI, MCP (read + goals/funnels write) | Extensive API; MCP server available | API | Limited |
| Server-side events | Yes, POST /api/track | Yes, many SDKs | Yes, via API | Custom events on paid plans |
| Self-hosting | No — hosted only | Yes (open source) | Yes (open source) | No |
| Revenue attribution | Built in for five billing providers | Via events / warehouse | Revenue events | No |
If you need to self-host, Umami or PostHog are the right tools. If you want a hosted, privacy-first tool you can drive from code and from your assistant, VisitTrack fits. See VisitTrack vs PostHog, vs Umami and vs Vercel Analytics.
What VisitTrack costs for a developer project
Server-side events count like browser ones; crawler hits and session replays don't count.
| Profile | Events / month | Plan | Price | Notes |
|---|---|---|---|---|
| Side project / open-source docs | ~9,000 | Up to 10k events/mo | $5/mo or $50/yr | A few thousand visitors |
| Developer tool with docs + app | ~160,000 | Up to 250k events/mo | $29/mo or $290/yr | ~25k visitors plus server events |
| API platform | ~2,400,000 | Up to 2.5M events/mo | $89/mo or $890/yr | Big docs portal, many server events |
Every feature is on every plan; the price only follows monthly events (pageviews, custom events and payments, counted across all your sites). Bot and AI-crawler hits and session replays are never billed. Yearly billing is ten months' price for twelve, every plan starts with a 14-day free trial with no card, and there's a one-time lifetime deal from $59.
Frequently asked questions
Does VisitTrack have an API?
Yes. Every dashboard resource is on a REST API under /api/v1 (site, stats, timeseries, pages, referrers, countries, devices, revenue, goals, funnels, events, live, visitor, people), with scoped bearer keys, CSV output and a 120-requests-per-minute limit.
Is there a CLI?
Yes. npx visitrack runs a dependency-free CLI with commands matching the REST resources, plus --json and --csv output. Install globally with npm install -g visitrack.
Which AI assistants can use the VisitTrack MCP server?
Any MCP client. Claude, ChatGPT custom connectors, Claude Code, Cursor and the MCP Inspector can connect with sign-in using the URL https://visitrack.app/api/mcp; others use an API key header.
Can I send events from my backend?
Yes. POST /api/track with a secret key accepts event and identify calls, including an optional first-touch object. See server-side events.
Does it work with single-page apps?
Yes. Client-side route changes are detected automatically in React, Next.js, Vue, Svelte and similar frameworks.
Can I self-host VisitTrack?
No. VisitTrack is a hosted service; if self-hosting is a hard requirement, open-source tools such as Umami or Matomo are better fits.
How do I test tracking locally?
The script ignores localhost by default. Add data-allow-local to the tag to test, and data-debug to log every event and skip reason to the console.
Related
- API, CSV and MCPKeys, scopes, REST, CLI and MCP.
- Server-side eventsPOST /api/track from your backend.
- Analytics for open-source projectsDocs, stars and public stats.
- Analytics for documentation sitesMeasure docs that work.
- VisitTrack vs PostHogHosted simplicity vs an all-in-one suite.
- User-agent bot checkerIs that hit a crawler?
See which channels actually bring paying customers
VisitTrack is cookie-free analytics with revenue attribution built in. One script tag, no consent banner, live in two minutes. 14 days free, no card required.