Two keys, one pipeline
Every workspace has two keys meant for the browser:- the production API key (
orwel_...) for your live site, - the development key (
orwel_dev_...) for localhost, staging and preview deploys.
Test traffic still counts in your metrics, so keep test runs short. The
is_test flag only applies to leads the development key creates: a real customer who converts again from your laptop keeps their real lead.Set it up per environment
Use one variable and give it a different value in each environment. The code never changes, only the key..env.local (your machine)
Preview and staging
Production
PUBLIC_ORWEL_KEY in SvelteKit and Astro, VITE_ORWEL_KEY in Vite); see Install by framework.
While you test, add debug: true to see what the SDK does in the browser console:
A five minute test run
1
Open Dev mode next to your app
In the dashboard go to Development, Dev mode (
/dev-mode). If the section is locked, turn on the development tools with the toggle. Keep it open in a second window.2
Load a page
A
session request should appear within a few seconds. If nothing shows up, see Common problems.3
Identify yourself
Log in or submit a form that calls
orwel.identify({ email }). Check that the identify row has no identify_no_email warning.4
Fire your custom events
Click through the flows you instrumented. Each
track() should be OK; an event_not_found error means that code is not in the catalog yet.5
Convert once, with a campaign
Open the page with
?utm_source=test&utm_campaign=devmode and submit your main form. The conversion row should show only the test mode note, and the lead appears in Leads with the Dev badge and the test campaign as its source.Reading Dev mode
- Requests lists everything received with the development key, newest first: type, event code, visitor, endpoint and HTTP status. Filter by status (errors, warnings, OK) or by type, or search by code, visitor, session or any text in the payload.
- Detail opens one request: the exact payload, each error or warning with the field it refers to and a suggested fix, and the session trace, every other request from the same session in order. The trace is the fastest way to see whether
identifyreally happened beforeconversion. - Event types shows the latest status per kind of request, so one glance tells you whether identify, track and conversion all work.
200 means every event in the batch was accepted, 207 means some were accepted and some were rejected (open the rejected ones to see why), and 500 means none were accepted.
Every check, and how to fix it
Errors mean the event was rejected and not stored. Warnings mean it was stored, but something will make your data worse.Common problems
Nothing arrives
Nothing arrives
- The app is using the production API key, not the development key. Production traffic is not logged in Dev mode. Check the value in the browser:
window.orwelexists and the requests toapi.orwel.iocarry a key that starts withorwel_dev_. orwel.init()never runs: the env var is undefined in this environment (a missingNEXT_PUBLIC_,PUBLIC_orVITE_prefix is the usual cause), or the init code only runs on the server.- An ad blocker or a strict Content Security Policy blocks
api.orwel.io. Try a private window without extensions, and allowhttps://api.orwel.ioinconnect-src.
The lead shows as direct even though I came from a campaign
The lead shows as direct even though I came from a campaign
The UTMs have to be in the URL of a page where the SDK runs, before the conversion. Opening the page with
?utm_source=... and converting in the same browser is enough. If the conversion row shows missing_attribution, open its session trace and check the first session request: its URL should contain the UTM parameters.The same conversion appears twice
The same conversion appears twice
Each conversion carries a
conversionId and the server deduplicates on it, so a retried request creates one lead. Two rows with different ids mean the app called conversion() twice, for example from a submit handler and a success callback. Call it once, after the form is validated.Events show up twice in development only
Events show up twice in development only
React Strict Mode runs effects twice in development, so an
orwel.init() inside useEffect runs twice. Guard it so it runs once; see Install by framework.Going live
1
Clear the list
Every request in Dev mode should be OK or carry only the test mode note.
2
Swap the key in production
Set the production API key in your production environment and deploy. Leave the development key in preview and local environments.
3
Confirm with one real conversion
Submit your form once on the live site. The lead appears without the Dev badge, the notification email arrives and your integrations receive it. From now on production traffic no longer appears in Dev mode.