No cookies. No PII. One API call.
Updated March 2026
Sutrena is the web runtime for AI agents. Sutrena Analytics gives you privacy-first web analytics with no cookies and no personally identifiable information. Two tracking paths: Sutrena-hosted pages are tracked automatically server-side (zero client JavaScript), and external sites need one script tag (~1.2 KB). Query page views, build conversion funnels, and track retention cohorts through the API or MCP tools. Bot filtering is built in. Event limits scale with your plan: Free 5K/mo, Pro 500K/mo, Scale unlimited.
1. Create an analytics site
POST to /api/analytics/sites to create an analytics site. Pass a subdomainId to enable automatic server-side tracking for Sutrena-hosted pages (no script needed). Omit subdomainId to track an external site with the JavaScript snippet instead.
# Option 1: Track a Sutrena-hosted subdomain (auto-collected, no JS needed)
curl -X POST https://sutrena.com/api/analytics/sites \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"name": "My Blog", "subdomainId": "sub_abc123"}'
# Option 2: Track an external site (use the script tag from step 2)
curl -X POST https://sutrena.com/api/analytics/sites \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"name": "External Marketing Site"}'
# Response:
# {
# "id": "sa_xyz789",
# "name": "My Blog",
# "eventsThisMonth": 0
# }2. Add the tracking script (external sites only)
For external sites, add one script tag to your HTML. The script is ~1.2 KB, loads asynchronously, uses no cookies, and supports single-page apps out of the box. Sutrena-hosted pages skip this step entirely -- they are tracked server-side automatically.
# Add this to your HTML <head> or before </body>:
# <script defer data-site="sa_xyz789" src="https://sutrena.com/a.js"></script>
# Or send events manually from any environment:
curl -X POST https://sutrena.com/api/collect \
-H "Content-Type: application/json" \
-d '{"siteId": "sa_xyz789", "name": "pageview", "url": "https://example.com/pricing"}'3. Query your data
Use GET /api/analytics/query to pull metrics. Specify the metric (page_views, unique_visitors, visits, bounce_rate), a time period, and an optional groupBy for time series. Results include both the aggregate total and the time series breakdown.
curl -G https://sutrena.com/api/analytics/query \
-H "Authorization: Bearer $KEY" \
--data-urlencode "siteId=sa_xyz789" \
--data-urlencode "metric=page_views" \
--data-urlencode "period=30d" \
--data-urlencode "groupBy=day"
# Response:
# {
# "total": 4823,
# "timeSeries": [
# { "date": "2026-03-01", "value": 152 },
# { "date": "2026-03-02", "value": 187 },
# ...
# ]
# }4. Break down by dimension
Add breakdownBy to see where your traffic comes from. Supported dimensions: url, referrer, country, device, browser, os. Combine with any metric and time period.
# Top referrers
curl -G https://sutrena.com/api/analytics/query \
-H "Authorization: Bearer $KEY" \
--data-urlencode "siteId=sa_xyz789" \
--data-urlencode "metric=page_views" \
--data-urlencode "period=30d" \
--data-urlencode "breakdownBy=referrer"
# Visitors by country
curl -G https://sutrena.com/api/analytics/query \
-H "Authorization: Bearer $KEY" \
--data-urlencode "siteId=sa_xyz789" \
--data-urlencode "metric=unique_visitors" \
--data-urlencode "period=30d" \
--data-urlencode "breakdownBy=country"5. Build a conversion funnel
POST to /api/analytics/funnel with 2 to 5 steps. Each step is an event name with optional URL filter. Sutrena calculates the conversion rate between each step and the overall funnel completion rate.
curl -X POST https://sutrena.com/api/analytics/funnel \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"siteId": "sa_xyz789",
"period": "30d",
"steps": [
{ "name": "pageview", "url": "/" },
{ "name": "pageview", "url": "/signup" },
{ "name": "pageview", "url": "/purchase" }
]
}'
# Response:
# {
# "steps": [
# { "name": "pageview", "url": "/", "visitors": 1200 },
# { "name": "pageview", "url": "/signup", "visitors": 340, "conversionRate": 0.283 },
# { "name": "pageview", "url": "/purchase", "visitors": 85, "conversionRate": 0.25 }
# ],
# "overallRate": 0.071
# }6. Track retention
POST to /api/analytics/retention to see cohort analysis. Define the first event (what counts as acquisition) and the return event (what counts as coming back). Granularity can be day, week, or month.
curl -X POST https://sutrena.com/api/analytics/retention \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"siteId": "sa_xyz789",
"period": "90d",
"firstEvent": "pageview",
"returnEvent": "pageview",
"granularity": "week"
}'
# Response:
# {
# "cohorts": [
# {
# "cohort": "2026-W01",
# "size": 320,
# "retention": [1.0, 0.42, 0.31, 0.28, ...]
# },
# ...
# ]
# }No. Session tracking uses a SHA-256 hash of IP address, user agent, and the current date. The hash rotates daily and the raw IP is never stored. No cookies are set, no fingerprinting is performed, and no personally identifiable information is retained.
Yes. POST to /api/collect with a name and optional properties. No authentication required for the collect endpoint. Or use the sutrena_track_event MCP tool from an AI agent. Custom events count toward your monthly event quota.
Events stop recording for the rest of the month. All existing data stays queryable -- nothing is deleted. Your counters reset on the first of each month. Upgrade your plan for a higher limit, or wait for the monthly reset.
Yes. The Sutrena tracking script is ~1.2 KB and does not conflict with Google Analytics, Plausible, Fathom, or any other analytics tool. Use Sutrena for privacy-first, cookie-free data and keep your existing analytics for everything else.
One analytics site tracks one subdomain. Create multiple analytics sites for multiple subdomains. All sites share your monthly event quota. Analytics sites count toward your project limit (Free: 5, Pro: 100, Scale: unlimited).
Sutrena is the web runtime for AI agents. Forms, Pages, Dashboards, Analytics, Webhooks, Automations, Emails — all through 75 MCP tools and one REST API. Your agent creates web artifacts, humans interact with them, and your agent gets the data back. Use any one feature or all of them together.
Pages
Deploy HTML instantly
Forms
Collect structured data
Dashboards
Visualize with 7 widget types
Analytics
Privacy-first, no cookies
Webhooks
Slack, Discord, Telegram
1. Get a trial key (no auth, no signup)
curl -X POST https://sutrena.com/api/trial2. Create anything — a page, form, dashboard, or analytics site
# Create a form with a dashboard
curl -X POST https://sutrena.com/api/forms \
-H "Authorization: Bearer st_trial_xxx" \
-H "Content-Type: application/json" \
-d '{"workflowId": "waitlist", "createDashboard": true}'
# Or deploy a page
curl -X POST https://sutrena.com/api/pages \
-H "Authorization: Bearer st_trial_xxx" \
-H "Content-Type: application/json" \
-d '{"slug": "index", "title": "My Site", "html": "<h1>Live</h1>"}'Get a trial API key instantly with no signup, or create an account for the full experience.