Skip to main content
Data → Events is empty, or the Connect your app drawer (topbar → Connect SDK, or Settings → SDK & install) is still saying “Waiting for your first event…”. Work down this list in order; each step rules out everything above it.

0. Check the status chip in the topbar

It tells you where to start:
  • not connected — the SDK never ran; start at step 1
  • SDK connected, no events — key and network are fine; skip to the events step
  • receiving events
  • SDK errors detected
  • no recent events
  • events rejected — old SDK key — a deploy still ships a rotated key: update the env var and redeploy

1. Did the SDK load at all?

Open your browser console on a page where Trevo should be running:
  • "object" — loaded. Go to step 2.
  • "undefined" — the script never ran.
If you installed via a <script> tag, the global is Trevo. Check the Network tab for the CDN request. The URL must include both the version and the filename:
A 403 or 404 there means the URL is wrong, not that your key is wrong. If you installed from npm, window.Trevo will not be set — that is normal. Confirm your bundle actually imports the module instead.

2. Did init() run, and with a key?

false before config loads, true after. It does not warn when init() was never called; to check that, call Trevo.getVariant('anything') and look for:
init() requires an explicit key. There is no auto-initialisation from a data-key attribute:
Calling init({}) or init({ apiKey: '' }) throws TrevoSDKError: init() requires a non-empty apiKey string. — init() with no argument at all throws a plain TypeError.

3. Is the key the right one?

Look at the Network tab for a request to api.trevosdk.com/v1/config. A 401 in a browser is most often a server key in client code. tsk_secret_… keys are rejected when sent with an Origin header, because that combination means the key has been shipped to a browser. Browsers need the publishable tsk_live_… key from Settings → SDK keys. A 401 right after rotating a key usually means the site was never rebuilt: hosts apply env changes to new deployments only, so the live build keeps sending the old key until you redeploy. Where the key goes has the env var for each stack. A successful config fetch is the strongest signal you can get before any event exists: it proves the script loaded, the key is valid, and the workspace is reachable.

4. Are you calling track()?

Nothing is captured automatically by @trevosdk/browser — no click tracking, no pageviews. Two exceptions: @trevosdk/react’s provider emits one page_view on mount, and exposures fire automatically inside getVariant(). A conversion exists only where you wrote one:
So if you see exposures but no conversions, the SDK is working and the missing piece is a track() call on your side.

5. Are the events leaving the browser?

Watch the Network tab for POST requests to ingest.trevosdk.com/v1/events. Events are batched, not immediate — a flush is triggered once 50 events are queued or about every 2 seconds, and on page unload; a single request carries up to 500 events. A single track() in a quiet tab can take a couple of seconds to appear. To force a send:

6. Still nothing?

Check for a blocker. Ad blockers and privacy extensions block analytics-shaped requests. Test in a clean profile with extensions disabled. If your users are blocked too, consider recording conversions from your backend with @trevosdk/node, which no blocker can intercept. Check for parked events. Batches that couldn’t be delivered before the page unloaded (or before destroy()) are persisted in local storage and replayed on the next init():
You’ll see up to four keys:
  • trevo_anon_id / trevo_user_id — identity (not key-suffixed)
  • trevo_config_cache_… — cached config
  • trevo_failed_events_… — undelivered batches
The sticky-assignment cache is _trevo_variants_… — its leading underscore means the trevo_ filter above misses it. Batches rejected with 401/403/400 are dropped, not parked — an empty trevo_failed_events_… key doesn’t rule out an auth problem. Check for a slow network. Requests time out after 10 seconds, and you will see this warning in the console:

Quick reference