Skip to main content
Data → Events is empty, or the setup panel is still saying “waiting for your first event”. Work down this list in order; each step rules out everything above it.

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?

Check the console for:
init() requires an explicit key. There is no auto-initialisation from a data-key attribute:
Calling init() with no argument throws TrevoSDKError: init() requires a non-empty apiKey string.

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 → API keys. 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. Trevo has no autocapture — no click tracking, no pageviews. An event exists only where you wrote one:
Exposures are the exception: those fire automatically inside getVariant(). 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 — up to 50 per request, flushed about every 2 seconds, and on page unload. 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. Failed batches are kept in local storage for retry:
You will see two keys, each suffixed with the last 8 characters of your API key:
  • trevo_config_cache_… — the cached experiment config
  • trevo_failed_events_… — events that could not be delivered
Entries in trevo_failed_events_… mean the SDK is working and the network is the problem. Check for a slow network. Requests time out after 10 seconds, and you will see this warning in the console:

Quick reference