• Product

    • FeaturesFunnels, alerts, AI traffic and imports.
    • Live mapVisitors on a globe as they arrive.
    • SpeedA script under 1 KB. Visits in a second.
    • Integrations26 tools, from Slack to WordPress.
    • MCP serverAI tools set up sites and dashboards.

    Get started

    • Quick startOne script tag, and visits show up.
    • With an AI agentOne prompt, and your agent adds it.
    • API and CLIYour numbers in scripts and CI.
    • Install guides
      • Script tag
      • Next.js
      • React
      • Website builders
    Live demoacme.devLast 30 daysVisitors1,49325.5%PageVisitors/612/pricing341/docs/install208Click around before you sign up.Open the demoCompareHow we stack up against Google Analytics, Plausible, Fathom, PostHog and Umami
  • Company

    • AboutWhy it exists and how it is built.
    • BlogPrivacy, speed and how we build.
    • ContactQuestions on plans, setup or privacy.
    • BrandThe logo, colors, type and files.

    Trust

    • PrivacyWhat we collect and why.
    • TermsPlans, limits and your data.
    • StatusWhether everything is up right now. (opens in a new tab)
    Latest post4checks before DirectWhere Direct traffic comes fromNov 11, 2026Read the post
  • Blog
  • Docs
  • Pricing
Sign inStart free
FeaturesDemoSpeedBlogDocsPricing
Start freeSign in

Free for three sites. No card needed.

Getting started

  • Introduction
  • Quick start
  • Set up with an AI agent
  • CLI
  • CLI guide
  • How counting works

Install

  • Script tag
  • Next.js
  • React
  • React Native and Expo
  • Swift
  • Other frameworks
  • Server
  • Website builders

Mobile

  • Mobile apps
  • Screens and events
  • Swift apps
  • Development builds
  • Visitors and offline
  • App Store and Play privacy

Dashboard

  • Overview and filters
  • Custom dashboards
  • Realtime
  • Events page
  • Explore
  • Segments
  • Sessions
  • People
  • Journeys
  • Retention
  • Load
  • Web vitals
  • Errors
  • Revenue
  • Search Console
  • Visibility
  • Data quality
  • Transfer a site
  • Import and export
  • Scheduled reports

Tracking

  • Custom events
  • Signed-in users
  • Links and downloads
  • Goals and funnels
  • Alerts
  • Annotations
  • Excluded pages
  • Page addresses
  • Share links and embeds
  • Sitemaps

API

  • Overview
  • Query API
  • Load and vitals
  • Raw export
  • Live stream
  • MCP server

Platform

  • Architecture
  • Privacy and data

Getting started

  • Introduction
  • Quick start
  • Set up with an AI agent
  • CLI
  • CLI guide
  • How counting works

Install

  • Script tag
  • Next.js
  • React
  • React Native and Expo
  • Swift
  • Other frameworks
  • Server
  • Website builders

Mobile

  • Mobile apps
  • Screens and events
  • Swift apps
  • Development builds
  • Visitors and offline
  • App Store and Play privacy

Dashboard

  • Overview and filters
  • Custom dashboards
  • Realtime
  • Events page
  • Explore
  • Segments
  • Sessions
  • People
  • Journeys
  • Retention
  • Load
  • Web vitals
  • Errors
  • Revenue
  • Search Console
  • Visibility
  • Data quality
  • Transfer a site
  • Import and export
  • Scheduled reports

Tracking

  • Custom events
  • Signed-in users
  • Links and downloads
  • Goals and funnels
  • Alerts
  • Annotations
  • Excluded pages
  • Page addresses
  • Share links and embeds
  • Sitemaps

API

  • Overview
  • Query API
  • Load and vitals
  • Raw export
  • Live stream
  • MCP server

Platform

  • Architecture
  • Privacy and data

Cookieless web and product analytics. Fast to load, fast to read.

Start free, no card needed

Product

FeaturesLive mapDemoTry it on your siteSpeedPricingCompare

Get started

InstallDocsQuestionsSign inStart freeJoin the waitlist

Company

AboutBlogContactStatus (opens in a new tab)Brand

Legal

Privacy policyTerms of service

© 2026 Ultanimus. This site sets no cookies.

API

Live stream

Stream who is on a site right now, and every pageview and event as it lands, over Server-Sent Events.

The live stream sends the visitors on a site right now, then each pageview and event within a second of it landing. It is the feed behind the Realtime page, for a script, an office screen or a chat bot.

GEThttps://api.ultanimus.com/v1/sites/{id}/live

{id} is the site ID, such as ult_fxpitz4w7h, or the site's domain. The key needs the stats:read permission, and the organization needs Insight or Foresight.

Connect#

The answer is a Server-Sent Events stream that stays open. Pass -N so curl prints each message as it arrives.

Terminal
curl -N https://api.ultanimus.com/v1/sites/YOUR_SITE_ID/live \
  -H "Authorization: Bearer $API_KEY"
Text
event: snapshot
data: {"now":1792936825000,"minute":1792936800000,"views":[14,11,9,...],"named":{...},"visitors":[...],"events":[...]}

event: events
data: [{"at":1792936826250,"visitor":"7m2c0p4rt1","name":"signup","page":"/pricing",...}]

: ping

Keep the key on your server. A browser's EventSource cannot send an Authorization header, so a web page that shows the feed reads it through your server.

Messages#

  • snapshot comes first, once. It holds the site as it was when you connected.
  • events follows whenever something lands. It holds the pageviews and events of the last 250 ms, up to 200 in one message.
  • A line that starts with : is a comment the server sends every 20 seconds, so proxies keep a quiet connection open. Skip it.

snapshot#

JSON
{
  "now": 1792936825000,
  "minute": 1792936800000,
  "views": [14, 11, 9, 12, 16, 13, 10, 8, 11, 15, 17, 12, 9, 10, 13, 14, 12, 11, 9, 8, 12, 15, 13, 10, 11, 14, 16, 12, 10, 4],
  "named": {
    "signup": [0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]
  },
  "visitors": [
    { "id": "3k9x2f1q8z", "seen": 1792936821000, "page": "/pricing", "source": "google", "country": "GB", "city": "London", "device": "desktop", "browser": "chrome", "lat": 51.5, "lon": -0.1 }
  ],
  "events": [
    { "at": 1792936821000, "visitor": "3k9x2f1q8z", "name": "pageview", "page": "/pricing", "source": "google", "country": "GB", "city": "London", "device": "desktop", "browser": "chrome", "lat": 51.5, "lon": -0.1, "landing": true }
  ]
}
  • Times are Unix milliseconds. now is the server's clock when it sent the snapshot, so you can age visitors even when your own clock is off.
  • views holds the pageviews of each of the last 30 minutes, oldest first. The last number is the current minute, which started at minute.
  • named holds the same 30 counts for each custom event sent in that time, keyed by event name: the 20 names with the most events. Add each event from events to its name's last number, and shift every list along with views when a minute ends.
  • visitors are the visitors active in the last 5 minutes, up to 2,000, the most recent first. seen is the time of their last event, and the other fields describe that event.
  • events are the 40 latest pageviews and events of the last 30 minutes, newest first.

events#

JSON
[
  { "at": 1792936826250, "visitor": "7m2c0p4rt1", "name": "signup", "page": "/pricing", "source": "chatgpt", "country": "DE", "city": "Berlin", "device": "mobile", "browser": "safari", "lat": 52.5, "lon": 13.4 }
]
  • name is pageview or the name of a custom event, such as signup.
  • visitor links the events of one visitor through the day. It changes at midnight UTC and says nothing about who the person is.
  • source is where the visit came from, such as google or chatgpt.
  • country is a two-letter code. lat and lon place the visitor at their city, rounded to about 11 km, and are left out when the place is unknown.
  • landing is true on the pageview that started a visit, and left out on every other event. In a snapshot it is a best guess, made from the 40 events the snapshot holds.
  • target is the link the visitor followed, as its host and path, such as github.com/acme/app. Only outbound_link and file_download events carry it. The stream sends no other property of an event.

Keep a live view#

To show the same numbers as the Realtime page:

  1. Load snapshot into your state. After a reconnect, replace your state with the new one.
  2. Add each event in events to the feed, and set its visitor's seen to its at. Count a pageview in the minute it landed.
  3. Drop a visitor once their seen is 5 minutes old.

An event can arrive twice around a connect, once in snapshot and once in events. Skip an event when you already hold one with the same visitor, at and name.

When the stream ends#

The server ends each stream after 10 minutes. It ends one sooner when a deploy restarts the server, or when your client stops reading and falls 256 events behind. Connect again, and the new snapshot brings the numbers back up to date.

Limits and errors#

A key may hold 4 streams open at once and open 30 a minute. An error arrives as the usual JSON envelope, before the stream starts.

StatusCodeWhen
403ULT-1203The organization is on Glance.
403ULT-1221The key lacks stats:read.
429ULT-1902The key has 4 streams open. Close one first.
429ULT-1902The key opened 30 streams in the last minute. Retry-After says how many seconds to wait.
503ULT-9003Realtime is busy on the server. Try again in a few seconds.
PreviousRaw exportNextMCP server

On this page

  • Connect
  • Messages
  • snapshot
  • events
  • Keep a live view
  • When the stream ends
  • Limits and errors
View as Markdown