Troubleshooting
This page collects the most common issues people hit when installing the SDK and sending events, along with practical fixes. Each section is independent, so jump straight to the symptom you're seeing.
SDK script not loading
If events never arrive and the tracker doesn't initialize, the script itself may not be loading.
- Open your browser's DevTools -> Network tab and reload the page.
- Find the request for
jl-script.js. It should return 200 (or 304 if cached), not (blocked) or a failed status. - If it shows as blocked, an ad-blocker or privacy extension is likely stripping the third-party host. Serving the tracker from a first-party tracker domain usually fixes this. See Tracker domain.
- Confirm the
<script>tag is actually on the page, placed in<head>or just before the closing</body>tag.
JourneyLayer is not defined
If you see JourneyLayer is not defined in the console, the SDK script loads
asynchronously and your code ran before it finished loading.
Guard your calls so they only run once the global is available:
window.JourneyLayer && JourneyLayer.track("Signed Up");
Or run your tracking code after the script has loaded. Note the global is named
JourneyLayer with a capital J and L — a typo in the casing
produces the same error.
Event POST returns 403
A 403 on the event request means the page origin is not in your Allowed domains list. This is an origin problem, not a token problem, so rotating tokens won't help.
To fix it:
- Add every origin your site uses: the apex domain,
www, and any staging hosts. - Or clear the Allowed domains list to accept events from any origin (least restrictive).
See Allowed domains for details.
Event POST returns 202 but the event is not visible
A 202 means the event was accepted — nothing is wrong with the request. Events are indexed on a small delay before they appear.
- Wait about 5-10 seconds after sending.
- Check Analytics -> Events, or open the user's profile, to confirm it arrived.
- Make sure you're viewing the right project.
- Confirm the event name matches exactly — event names are
case-sensitive, so
Signed Upandsigned upare different events.
Domain / CORS issues
CORS errors in the console are the browser-side symptom of the same allowed- domains check. The request origin must be permitted.
- List every origin that sends events (apex,
www, staging, and any other hosts). - For many subdomains, use a wildcard such as
*.yourdomain.com.
See Allowed domains.
Cloudflare / custom hostname issues
When serving the tracker from a first-party tracker domain behind Cloudflare, a few settings commonly trip people up:
- Verify the CNAME record for your tracker subdomain points to the right target.
- Set Cloudflare SSL to Full (Strict).
- Allow a few minutes for DNS propagation and certificate issuance before testing.
- If you recently rotated a token, bust the cache — the script bundle is cached for about 5 minutes, so an old token can linger briefly.
Mobile SDK debugging
If a mobile app isn't sending events or receiving push:
- Enable the SDK's debug logging to see what the SDK is doing.
- Verify the projectId, publishable token, and events endpoint are all correct.
- For push, confirm the push token is registered with JourneyLayer.
- Check basic device connectivity (network reachable, not offline).
See Mobile SDK capabilities for setup details.
Still stuck?
- Re-check your allowed domains and tracker domain.
- Confirm your tokens are current after any rotation.