• 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.

Install

Server

Send events from your backend with an API key, for webhooks, background jobs and purchases confirmed on the server.

Send events from your backend when the browser is not involved: a webhook, a background job, or a purchase confirmed on the server. Use the Node.js package, or one HTTP request from any language.

Create an API key#

Create a key under Integrations → API keys in your organization settings and tick Send events (events:write).

Warning

A key with Send events can write events for every site in your organization. Keep it in an environment variable, never ship it to the browser, and revoke it if it leaks.

Send an event from Node.js#

The package runs on Node.js 22.12 and newer, Bun and Deno, and has no dependencies.

bun add @ultanimus/node
npm install @ultanimus/node
pnpm add @ultanimus/node
yarn add @ultanimus/node

Keep the key in ULTANIMUS_API_KEY, then send events from anywhere on your server, for example a payment webhook:

TypeScript
import { Ultanimus } from '@ultanimus/node'

const ultanimus = new Ultanimus({ site: 'YOUR_SITE_ID' })

await ultanimus.track('purchase', { user: order.userId, id: order.id, props: { plan: order.plan } })

track takes the event's name, then the fields below. It never rejects, so a failed event cannot take your webhook down with it. It resolves to { ok: true } or { ok: false, error }, where error.code is one of the codes below:

TypeScript
const result = await ultanimus.track('signup', { user: user.id })
if (!result.ok) console.error(result.error.code, result.error.message)

An event that gets no answer is sent again, up to twice, with the same id, so it never counts twice. Either way track answers within 3 seconds. On a serverless platform, await the call or hand it to waitUntil, so the function does not end before the event leaves.

Send an event from any language#

POSThttps://api.ultanimus.com/v1/events
Terminal
curl -X POST https://api.ultanimus.com/v1/events \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"site":"YOUR_SITE_ID","name":"purchase","user":"u_8f2k1x","id":"ord_4410","props":{"plan":"pro"}}'

The fields#

sitestringRequired

Your site ID, from the site's settings. The site has to belong to the key's organization.

namestringRequired

The event name, such as purchase. Up to 120 characters.

userstring | number

Your own ID for the person, the same one you pass to identify() in the browser. Up to 256 characters. Leave it out when the event belongs to no one.

idstring | number

An ID for the event, such as the order ID. If another event with the same ID arrived in the last 5 minutes, this one does not count, so a webhook that fires twice counts once. Up to 64 letters, digits, dashes and underscores.

propsobject

Properties to filter and break the event down by, such as the plan. Up to 30, each a string of up to 512 bytes, a number, or true or false.

urlstring

The page the event belongs to, on the site's domain or a subdomain. Required when name is pageview.

A body can be up to 8 KB. Keep personal details such as names and email addresses out of every field. Use an ID from your own database for user.

The answer#

A counted event gets 202. So does a repeat of an id from the last 5 minutes, with a message that says it did not count, so retrying a request never does harm.

JSON
{
  "status_code": 202,
  "data": null,
  "message": "Event received."
}

Failures use the envelope from the API overview. These are the ones to expect here:

StatusCodeWhen
401ULT-1220The API key is missing, wrong or revoked.
403ULT-1203The organization's plan does not include API access.
403ULT-1219The organization is suspended. An owner can read why in the dashboard.
403ULT-1221The key does not have Send events (events:write).
403ULT-1302url is not on the site's domain.
404ULT-1210No site in the key's organization has that ID.
413ULT-1904The body is larger than 8 KB.
422ULT-1900A field failed a check. validation_errors says which.
429ULT-1902More than 6,000 events in a minute from one key, or for one user. Retry in the next minute.
429ULT-1303The organization is past its monthly event limit. The event does not count.
503ULT-9003Events cannot be stored right now. Retry with backoff.

How server events count#

Server events count toward your monthly event limit like browser events. Goals, funnels and the Events page include them.

  • With user. The event counts for the same visitor as the browser where you called identify() with that ID. If their browser sent an event in the last 30 minutes, the event joins that visit and takes its source, country and device. If not, it counts on its own and adds nothing to visits, bounce rate or visit duration.
  • Without user. All of the site's server events on one day count as one visitor, with no source, country or device.

Server events skip the bot check that browser events go through, since your own server sends them. Signed-in users explains how a user ID ties the two sides together.

Plan limits#

FeatureGlanceInsightForesight
API accessNot includedIncludedIncluded
PreviousOther frameworksNextWebsite builders

On this page

  • Create an API key
  • Send an event from Node.js
  • Send an event from any language
  • The fields
  • The answer
  • How server events count
  • Plan limits
View as Markdown