Node.js server
Sending events and errors to Clearlook from a Node.js server.
- Events:
POST https://app.clearlook.dev/v1/b?key=pk_…with JSON{"sent_at": "<ISO time>", "events": [{"id": "<uuid>", "event": "Invoice paid", "timestamp": "<ISO time>", "user_id": "<the app's user id>", "properties": {"amount": 120}}]}. Events are batched, sent after the response, and dropped quietly on failure so the app never waits on analytics. - Ids:
user_idis the same id the browser passes toidentify, so server and browser events join up. Ids are never generated on the server. - Errors:
@sentry/nodewith the project DSN;releaseset to the deploy's commit so errors link to releases. - Keys: the
pk_key is public; apat_orsvc_key only belongs in server secrets, for uploads and the API.