@aioproductoscom/node
v0.1.3
Published
AIOProductOS server-side analytics for Node.js — identity-first backend events (signup, payment, subscription, churn) onto the AIOProductOS spine. Zero dependencies.
Maintainers
Readme
@aioproductoscom/node
Server-side analytics for AIOProductOS. Send identity-first backend events — signup, payment, subscription, churn — straight to the AIOProductOS spine, where they join the same customer record as your web/product analytics, feedback, and revenue. Zero dependencies, Node 18+.
Install
npm install @aioproductoscom/nodeQuick start
import { ProductOS } from "@aioproductoscom/node";
// Use a SECRET ingest key (sk_live_…) from your AIOProductOS workspace —
// server-side only, never ship to a browser.
const pos = new ProductOS({ apiKey: process.env.PRODUCTOS_KEY! });
// A backend truth event the browser can't be trusted to report:
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" });
// On graceful shutdown, flush anything queued:
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.
Links
- Website: aioproductos.com
- Platform (get your keys): platform.aioproductos.com
- All SDKs (web, product, chat, scheduling, mobile): aioproductos.com/sdk
- Mobile twin:
@aioproductoscom/react-native - Support: [email protected]
