Send traffic to Lume from any Node.js server
One server-side call from any Node.js runtime: zero dependencies, batched and retrying by default.
Install
1Install
Add the package with npm i lumetraffic. It has zero dependencies.
2Create an ingest token
Generate one under Settings → Tokens and read it from your environment.
3Track in your handler
Construct a Lume client and call trackPageview in your request handler. It batches in memory and flushes in the background with retries.
4Deploy
Ship it. Events appear on your dashboard within seconds.
Server-side, in your request handler
import { Lume } from 'lumetraffic'
const lume = new Lume(process.env.LUME_INGEST_TOKEN)
// In your request handler:
lume.trackPageview(req, res) Good to know
- Best when you run a long-lived Node.js server (Express, a self-hosted Next.js Node server, any Node runtime).
- On Vercel serverless / edge isolates the instance can freeze before the batched flush sends. Use the Vercel middleware there instead.
- Forward the visitor IP to enable crawler verification; it is used transiently for reverse-DNS / IP-range checks and never stored (Lume keeps only an anonymized prefix).
Works with the rest of your stack
Lume is CDN-agnostic and server-side. This is one of several install paths, all feeding the same dashboard. Mix and match across hosts, or move providers without losing your history.
TypeScript SDK FAQ
Does the SDK add latency to my requests?
No. It batches events in memory and flushes them in the background with retries, so your request handler returns immediately. It fails open, so a Lume outage can never break your app.
What if I am not on Node.js?
Use the REST endpoint from any language, or an edge / CDN log path. The SDK is one option, not a requirement: every path feeds the same dashboard.
Send your first TypeScript SDK event in minutes.
Free plan, one ingest token. See every human, bot, and AI agent, however you install.
Start for free →