Headless analytics with an API, MCP, and SDKs

Collect with a 2 KB script or a server call, then pull every dashboard number into your own app, scripts, and AI agents. Run Seline next to or instead of Google Analytics and count the 43-67% of visitors who don't accept cookies.
onG2  —  “It's refreshing to use an analytics tool that just works without any hassle.”
Seline dashboard page screenshot
click to see features

Headless web analytics, with a dashboard when you want one

Seline stores your traffic, events, funnels, and revenue once. Your team reads it in the dashboard, your code reads it over HTTP, and your AI assistant reads it over MCP. All three get the same numbers, because there's only one copy.
Top referrers, last 7 days
curl -X POST 'https://api.seline.com/api/v1/stats' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{ "type": "referrer", "period": "last7d" }'
Click anywhere to copy
Response
{
"data": [
{ "type": "google.com", "visitors": 1204 },
{ "type": "chatgpt.com", "visitors": 312 },
{ "type": "news.ycombinator.com", "visitors": 187 }
],
"total": 2480
}
Click anywhere to copy
StarStarStarStarStar
“From all the analytics tools I tested, it has the best developer experience and feels simple and enjoyable to use. The customer support is also awesome.”
Quentin Gabriele
Quentin Gabriele
CTO, Youdji
StarStarStarStarStar
“As a founder, I've used several analytics platforms, but Seline stands out for several reasons. What I like most about Seline is how it combines incredible power with exceptional user-friendliness - a rare combination in analytics tools.”
John Madrak
John Madrak

What is headless analytics?

Headless analytics separates collecting and storing analytics data from the dashboard that displays it. The data sits behind an API, so any front end can use it: your admin panel, a page in your product, a Slack bot, a notebook, or an AI agent. The name comes from headless CMS, where content lives behind an API and you build the presentation yourself.
In BI, "headless" usually means a semantic layer on top of a data warehouse you already run. Seline is headless web and product analytics: we handle collection, bot filtering, and storage, and you get an analytics API without building the warehouse first.
Dashboard-only analyticsHeadless analytics
Who reads the dataPeople with a loginPeople, scripts, and AI agents
Custom reportsBuilt in the vendor's report builderJSON you render however you like
Numbers in your productScreenshots and CSV exportsOne API request
Backend eventsOnly what a browser script seesSent from your server, next to page views
Weekly reportingSomeone opens the dashboardA cron job posts it to Slack

Why do you need headless analytics?

Because the people and tools that need your numbers don't all live in an analytics dashboard.
1
Your numbers are stuck behind a login.
Product, sales, and support all ask for the same traffic and signup numbers. Instead of sharing a login or pasting screenshots into Slack, pull the numbers with one request and put them where those people already work.
2
The Google Analytics Data API starts with a Google Cloud project.
GA4's API asks for a Cloud project, a service account with property access, and a quota measured in tokens. Its reports leave out or model everyone who declined cookies. Seline needs an API token from project settings and a POST request. More on that in our Google Analytics pricing breakdown.
3
AI agents need data they can query, not screenshots.
Connect Claude, ChatGPT, Cursor, or Codex to Seline's MCP server and ask "which referrers sent more visitors this week than last?" The agent calls the same endpoints your code would.
4
Backend events never reach a browser script.
Renewals, webhooks, cron jobs, and API calls happen on your server. Track them with @seline-analytics/node or a plain POST to the ingest endpoint, and identify the user so those events sit in the same profile as their page views.
5
Headless sites still need analytics.
Next.js, Nuxt, Astro, or a headless Shopify storefront: add the script or the @seline-analytics/web package, and route changes are tracked as page views automatically.
6
Agencies need one report per client, not one login per client.
An account API token reads every project you own or collaborate on. One script loops through your clients and sends each of them their own monthly numbers.

Every dashboard number, through the analytics API

Seline's web analytics API has 17 read endpoints that cover everything on the dashboard. The reporting endpoints take the same filters as the dashboard: page, country, device, referrer, UTM campaign, source, and medium.
Send data in from the browser, your server, or any language that can make a POST request. Read it back with an API token, or hand it to an AI assistant through MCP.
*
optional
means you need to connect Stripe, Polar, or Shopify, or send custom events.

REST API

API token
Visitors and pageviews over time, top pages, referrers, countries, visit metrics, custom events, and raw events. Project tokens read one site; account tokens read all of them.
{
"data": [
{ "type": "google.com", "visitors": 1204 },
{ "type": "chatgpt.com", "visitors": 312 },
{ "type": "news.ycombinator.com", "visitors": 187 }
],
"total": 2480
}
Click anywhere to copy

MCP server

hosted or local
Hosted at api.seline.com/mcp for ChatGPT and Claude, or local with npx for Cursor, Claude Code, and Codex. Read-only, with a tool for every read endpoint.
{
"mcpServers": {
"seline": {
"command": "npx",
"args": ["-y", "@seline-analytics/mcp", "sln_your_api_key"]
}
}
}
Click anywhere to copy

Server-side tracking

Node.js SDK
Track custom events and identify users from your backend with @seline-analytics/node, or POST to the ingest endpoint from Python, Go, Ruby, PHP, or anything else.
import { Seline } from '@seline-analytics/node';
const seline = Seline({ token: 'PROJECT_TOKEN' });
seline.track({
userId: user.id,
name: 'subscription: renewed',
data: { plan: 'pro', total: 99 },
});
Click anywhere to copy

Revenue

optional
Connect Stripe, Polar, or Shopify and the charges endpoint returns revenue over time, filterable by referrer and UTM campaign like your traffic.
Sources
6 referrers
Visitors
Revenue
google.comgoogle.com
1,840
$12,480
chatgpt.comchatgpt.com
620
$8,210
reddit.comreddit.com
1,150
$4,390
duckduckgo.comduckduckgo.com
410
$0
x.comx.com
930
$1,260
bing.combing.com
380
$640

Funnels

optional
Send the steps in the request, as page views, entry pages, or custom events, and get the visitors who reached each one plus the conversion trend.
6.4% total conversion rate
chatgpt.com
640
288
-55.0%
41
-85.8%
step 1
/blog/*
step 2
user: signed up
step 3
project: upgraded
FILTERS
chatgpt.com

Visitors and journeys

no setup required
List visitors who fired an event, pull one visitor's full timeline, or ask for an AI summary of why they didn't convert.
Bruce Wayne·
US
·macOS, Chrome
Thursday, 21 Mar 24
google.com
10:15 AM
“Seline looks so good! The power of small teams...” — x.com
Guillermo Rauch
Guillermo Rauch
CEO, Vercel

What teams build on headless analytics

The dashboard covers the daily check-in. The API covers everything else.

A stats page in your admin panel

Put signups by referrer, top pages, and this week vs. last week next to the rest of your internal tools.

A Monday digest in Slack

A small cron script posts last week’s visitors, top referrers, and revenue to your team channel.

Client reports for agencies

Loop through every client project with one account token and send each client their own numbers.

Stats inside your product

Show your customers the traffic on their pages. Cache the response and refresh it every few minutes.

AI agents and copilots

Give Claude, ChatGPT, or your own agent read-only access to traffic, funnels, and revenue through MCP.

Exports to sheets and warehouses

Page through raw events to compute average order value or join visits with data from your own database.

Or just ask your data

The same data powers Seline AI in the dashboard and through MCP in your own assistant. Read more about AI website analytics.
C
Seline
background line ctabackground line ctabackground line ctabackground line cta
seline moving boxes

Add one script. Query it with one request.

Install the script or an SDK, create an API token in project settings, and send your first request. The dashboard fills in at the same time, so you can check every response against it.
Join 1,000+ companies who see their stats plain and true.

Headless analytics without the infrastructure

No pipeline to run

We run ingestion, bot filtering, IP-to-country lookup, and storage on ClickHouse. You send a request and read a response.

No cookie banner

Seline doesn't use cookies or store personal data, so visitors who'd click Decline elsewhere still show up in your API responses.

~2 KB script

Our tracking script is 23x lighter than Google Analytics. Server-side events skip the browser entirely.

Forever data retention

Your history is kept forever, so a script can compare this month to the same month two years ago.

Unlimited websites

Track every site and app you run. One account API token reads all of them, so one script can report on every project.

API included in the plan

The Public API and MCP server come with every plan. No API add-on to buy. See pricing.

Ad-blocker bypass

Route the script and its requests through your own subdomain with one DNS record, so visitors with ad blockers are counted too.

EU-hosted

EU-based company with servers in Germany. Every request to the API and the ingest endpoint is encrypted with HTTPS.

Independent

Self-funded, with no investors deciding what we build. We earn from subscriptions, never from your data.
Every online business should have analytics in place. It's essential.
But it's not always easy to find the right tool. For us it was either too simple, too bloated, or too slow. That's why we've cherry-picked the most important analytics features and carefully crafted them into one minimalistic tool, Seline.
Think of Google Analytics, but intuitive and fast.
A tool you'll actually enjoy using daily.
If you're interested in trying our product but not sure where to start, feel free to reach out to us via , twitter or email.
Looking forward to have you on board!
Gratefully,
signature
P.S. Seline is completely free to start.
background line faq

Headless analytics Q&A

Headless analytics separates collecting and storing analytics data from the dashboard that displays it. The data is available through an API, so any front end can use it: your admin panel, a customer-facing report, a Slack bot, a notebook, or an AI agent. The name comes from headless CMS, where content lives behind an API and you build the presentation layer yourself.

Headless BI usually means a semantic layer on top of your own data warehouse: you collect and model the data, and the layer serves metrics to other tools. Seline is headless web and product analytics. We collect pageviews, custom events, and revenue, filter out bots, and store everything, so you get an analytics API without building a warehouse first.

Everything on the dashboard: visitors and pageviews over time, visit metrics like bounce rate and duration, top pages, referrers, countries, devices, UTM campaigns, custom events and their properties, raw events, funnels, revenue, individual visitors with their event timelines, and AI insights for a single visitor. There are 17 read endpoints, and the reporting ones accept the same filters as the dashboard.

The Google Analytics Data API needs a Google Cloud project, a service account with access to your GA4 property, and a quota measured in tokens. Its reports also leave out or model the visitors who declined cookies. Seline needs an API token from project settings and a POST request with a JSON body. Because Seline is cookieless, the API counts visitors who would decline a cookie banner.

Yes. Use the @seline-analytics/node package to track custom events and identify users from Node.js, or send a POST request to the ingest endpoint from any language. Identify users with setUser and their server-side events sit in the same profile as their page views.

Yes. Install the ChatGPT plugin, connect Claude or other remote MCP clients to api.seline.com/mcp, or run the local server with npx @seline-analytics/mcp in Cursor, Claude Code, and Codex. Both are read-only and expose a tool for every API endpoint.

The API allows 100 requests per minute and 10,000 requests per day per project. There's no separate API price: every request counts toward your plan's monthly events, the same way a pageview does.

Yes. On Next.js, Nuxt, Astro, a headless Shopify storefront, or any other site that loads JavaScript, add our script or the @seline-analytics/web package. Route changes in single-page apps are tracked as page views automatically.

No. Seline doesn't use cookies, store personal data, or track visitors across sites, so you don't need a consent banner in most jurisdictions.

No. We're a small bootstrapped team funded only by subscriptions, and we don't sell or share your data. You can start with a free trial, and the API is included in every paid plan.
seline-cta

Your analytics, outside the dashboard.

Try headless analytics with Seline.

Add the script, grab an API token, and put your numbers where your team already works.