Skip to main content
The fastest way to debug an install is to send traffic with the development key and open Dev mode: every request shows up live with the reason it failed and how to fix it. Add debug: true to orwel.init() to see the SDK logs in the browser console.

How the ingest answers

A 207 body looks like this:
The SDK does not retry rejected events, because resending an invalid event would loop forever. Since SDK 1.7.1 a 400 is logged in the console with the server response and the rejected codes before the events are discarded:
A 207 counts as delivered for the SDK, so the events it refused are not logged in the console. Use Dev mode to see them.

Events rejected as unknown

Symptom: some track() calls never appear, the batch answers 207 (or 500 if every event failed), and Dev mode shows event_not_found. Cause: the server only accepts track() codes that exist in your workspace catalog: the Orwel catalog plus the custom codes your workspace registered. Codes are not created on the fly. Fix:
  1. Open Journeys setup or Features setup in the Development section, add the code to a journey or feature (from the catalog, or as a Custom event) and save. See Journeys and features setup.
  2. Or change your code to an existing catalog code.
  3. Check the Status tab: the code should move from “Not registered” to “Tested” once it arrives with the development key.
Conversions are not gated by the catalog, so this never affects conversion().

Events lost on large flushes (SDK before 1.7.1)

Symptom: pages that fire many events (long sessions, heavy auto detection) lose whole blocks of events, with nothing in the console and nothing on the server. Cause: before 1.7.1 the SDK posted the whole queue (up to 1000 events) in one batch. The server caps a batch at 100 events and answers 400, and older SDKs treated that 400 as “do not retry” without logging anything. Fix: update the SDK. 1.7.1 sends the queue in chunks of 100.

A conversion fails or never shows up

conversion() is async and resolves with the real outcome. Read it:
If conversion() throws instead of resolving, the input is invalid: the code is not snake_case, the properties are not an object, or an email field is not a valid address.

The conversion arrives but the lead looks wrong

init() throws

  • apiKey must start with "orwel_" or appears to be invalid (too short): the environment variable is empty or wrong. Check the variable name for your framework (for example NEXT_PUBLIC_ORWEL_KEY, PUBLIC_ORWEL_KEY, VITE_ORWEL_KEY).
  • config must be an object: call orwel.init({ apiKey }), not orwel.init(apiKey).

API and MCP

  • 401 with a public or development key: those keys only send data. Create an API key (orwel_sk_) to read.
  • 403 from a browser: the page’s origin is not in the key’s allowed origins, or the key is server only.
  • 403 plan_not_allowed on /mcp: the workspace has no active subscription.