Skip to main content
@dataframer/signals is a small browser SDK that sends user/product events to DataFramer and generates the journey id that ties those events to your AI traces.

Install

Get a write key

In your DataFramer dashboard, go to Settings → Keys and create a Signals SDK Write Key. On DataFramer hosted by us that’s app.dataframer.ai/settings?tab=keys; on a private deployment it’s the same Settings → Keys page on your own instance. This key is meant to only send events in, not read data out.

Initialize once, at app start

Send events

Sending is best-effort: it will never throw an error into your app. If the server rejects an event (bad write key, failed validation, rate limit), the SDK logs a console.warn with the status and reason, and the rejected event appears with its reason in your dashboard under User Journeys → Live Events — so you can tell the difference between “wired wrong” and “nothing sent yet” while setting up.

Journey ids

Every event you send carries a journey_id automatically:
  • Default: a journey id is created for you. By default, it resets after 30 minutes of inactivity. It is configurable.
  • Use your own id: if you already have a natural id (order id, conversation id, ticket id), you can use that:

CORS: getting the journey id to your own backend

This section is about attaching the journey id to the requests your frontend makes to your own backend, so your server can stamp that id onto your AI traces. How the journey id reaches your backend depends on where your frontend and your backend live.
If your frontend and your backend are on the same domain (or share a parent domain, like app.acme.com and api.acme.com with cookies set on .acme.com), the journey id rides along as a cookie automatically. You don’t need to configure anything.

Content Security Policy (CSP)

If your site sets a Content-Security-Policy, the browser will block the SDK’s requests unless your DataFramer API host is allowed in the connect-src directive:
A blocked request produces no SDK error by default — it only shows up as a CSP violation in the browser console (with debug: true the SDK also warns about the failed delivery). If events aren’t arriving, this is one of the first things to check.

Config reference

Next steps

Server Instrumentation

Stamp this same journey id onto your AI traces automatically.