@aioproductoscom/node
Server-side analytics for ProductOS. Send identity-first backend events —
signup, payment, subscription, churn — straight to the ProductOS spine, where
they join the same customer record as your web/product analytics, feedback, and
revenue. Zero dependencies, Node 18+.
Install
npm install @aioproductoscom/node
Quick start
import { ProductOS } from "@aioproductoscom/node";
const pos = new ProductOS({ apiKey: process.env.PRODUCTOS_KEY! });
pos.capture({
event: "subscription_started",
distinctId: user.id,
properties: { plan: "scale", mrr: 99, currency: "EUR" },
});
pos.identify({ distinctId: user.id, traits: { email: user.email, plan: "scale" } });
pos.revenue(user.id, 99, "EUR", { plan: "scale" });
await pos.shutdown();
Events are queued and flushed in batches automatically (and on shutdown()),
so calls never block your request path. The region is read from your key.
Why server-side
A browser can drop events (ad blockers, closed tabs) and can't be trusted for
money. Revenue, signups, and subscription changes are reported from your backend
— so the numbers your dashboards, funnels, and AI teammates reason about are real.