Documentation
Integration guide
From sign-up to your first heatmap. Create an organization and a project in the dashboard, then follow these steps. For every endpoint, see the API reference.
1. Install
Install the connector for your engine; it brings the core SDK with it. Babylon.js is shown. Connectors for three.js, react-three-fiber, PlayCanvas, A-Frame and Babylon Lite take the same options.
npm install @uptimizr/babylon2. Attach to your scene
Use your project id and your tracker domain. Events are scoped by the project id; no key is needed to send them.
import { trackScene } from "@uptimizr/babylon";
const client = trackScene(scene, {
projectId: PROJECT_ID, // shown in your project's settings
endpoint: COLLECTOR_URL, // your provisioned tracker domain
});
// ... on teardown
await client.stop("manual");3. Sampling and privacy
Capture is cookieless and carries no personal data by default; the visitor id is a server-side, daily-rotating hash. Raw session replay is opt-in per project.
trackScene(scene, {
projectId: PROJECT_ID,
endpoint: COLLECTOR_URL,
// Per-channel fidelity in Hz (0 = off, "frame" = every render tick).
sampling: { camera: 10, pointerMove: 60, perf: 0.5 },
capture: { camera: true, pointerMove: true, clicks: true, meshPicks: true, perf: true },
});4. Query analytics
Reads are tenant-scoped: you must be a member of the organization, and the project must belong to it. Authenticate with your account session.
curl "$API/api/v1/orgs/$ORG/projects/$PROJECT/insights/sessions?since=$SINCE&limit=100"
curl "$API/api/v1/orgs/$ORG/projects/$PROJECT/insights/heatmaps/pointer?bins=64"
curl "$API/api/v1/orgs/$ORG/projects/$PROJECT/insights/perf"5. Replay a session
Enable raw retention for the project, then stream a session's ordered events (NDJSON, oldest first). Without raw retention the request returns 403 and no events leave the store.
curl "$API/api/v1/orgs/$ORG/projects/$PROJECT/sessions/$SESSION/replay"