Get Statlark working on your site
Statlark is one line of script to install. Start with the quickstart: it takes you from signing up to your first revenue next to the source that earned it.
Hand these docs to your AI tool
- Every page here and in Learn has a markdown version: add
.mdto its address, such as /docs/quickstart.md. llms.txt lists them all. - Pages that describe a change in your code, such as installing the script or tracking a goal, have a “Hand this to your AI” prompt. Paste it into Claude Code, Cursor or another coding tool, in your project. A prompt never asks for your API key: where one is needed, you set it yourself.
- To ask about your numbers instead, connect your assistant over MCP or use the command line. The REST API has an OpenAPI spec.
- Making your own site readable by AI search and assistants? See AI discoverability.
Get started
Quickstart
From sign-up to your first visitor, payment and goal: create your account, add your site, install the script, check it works, connect Stripe and track a goal.
Install on your platform
Where the script goes on Next.js, WordPress, Shopify, Webflow and Google Tag Manager, or install the npm package, with how to check it works.
Revenue attribution
Install the tracker, then tie Stripe payments back to the visitors — and the marketing sources — that drove them.
Troubleshooting
No visitors showing, payments not attributed, goals missing, or the consent banner not loading the tracker: the usual causes and how to fix each.
Track
Goals & conversions
Track the conversions that matter, report on custom events, set monthly or quarterly targets, pick your #1 KPI, and get an email the moment a goal fires.
Identifying users
Turn anonymous visitors into durable people with statlark.identify() — merged across every device, with lifetime value and a full cross-device journey.
Excluding traffic
Keep your own visits, staging sites, admin pages, bot-heavy regions and app test devices out of your numbers.
Script configuration
Every data-* option on the snippet — subdomain tracking, localhost, Do Not Track, page titles, debug, the leave signal, the visitor ID, and resetting on sign-out.
JavaScript SDK
Install from npm and initialize in code with initStatlark() — a typed API for goals, identify and revenue, plus a React provider. A thin wrapper over the tracker for SPAs and frameworks.
First-party proxy
Route the tracker and its events through your own domain — same-origin, ad-blocker-resistant, and still geo-aware, with no change to the tracker.
Cookie consent banner
A site-styled banner that holds Statlark's analytics cookie until visitors accept — shown only where consent is required, with a re-open control.
Bot traffic
See which AI assistants, search engines and training crawlers read your site, from your server, so it includes the ones that never run JavaScript.
Read your data
Reading your data
What the numbers mean — sessions, bounce rate, session length, new and returning visitors, entry and exit pages, revenue per visitor, paying conversion, how channels are classified, search keywords, the visitor journey, and lifetime value.
Google Search Console
See which Google searches bring visitors and revenue: connect Search Console, read the Keywords tab, and understand the revenue estimate.
AI assistants (MCP)
Connect Claude, ChatGPT, Claude Code, Cursor, VS Code and other AI assistants to your Statlark data with a sign-in, and ask questions in plain language.
Command line (CLI)
Read your revenue, sources, pages, goals and crawler traffic from a terminal, and give AI coding agents a read-only way to answer questions about your site.
REST API
Pull your revenue, visitors and sources over HTTP — and push conversions, revenue and identity server-side with bearer tokens.
Grow
AI discoverability
Make your site citable by ChatGPT, Claude, Perplexity and AI Overviews — allow the AI crawlers, publish llms.txt, and structure pages so an engine can quote them.
Attribution badge
Add a paste-in “Analytics by Statlark” badge to your footer — the Slark mascot plus a plain link home. No JavaScript, no requests, five variants.
Account
Plans, trial and billing
Your 14-day free trial, what counts as an event, the two plans and their rungs, the usage warnings and site cap, what happens to a workspace without a plan, and how to add a card, change plan, cancel or find an invoice.
Your account and your data
How workspaces and sites fit together, exporting everything, removing a single site, and closing your account for good.
Changelog
What's new in Statlark: features, docs and package releases, newest first.
Working out what to measure rather than how to wire it up? Learn covers the metrics themselves — revenue per visitor, paying conversion, lifetime value and attribution — without assuming you use Statlark.