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.
<script> tag, the global is Trevo. Check the Network tab for
the CDN request. The URL must include both the version and the filename:
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?
init() requires an explicit key. There is no auto-initialisation from a data-key
attribute:
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 toapi.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:
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 forPOST 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:
trevo_config_cache_…— the cached experiment configtrevo_failed_events_…— events that could not be delivered
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: