Web SDK · v0.6.0
Troubleshooting
Diagnose script loading, consent, identity, quality policies, and event delivery issues.
rtn is undefined
Use the two-tag snippet from Quick Start without async or defer, so rtn exists before your pages call it. If you load the SDK asynchronously, make every call from the script's onload handler. Confirm the script request is not blocked by a content security policy or browser extension.
No batch request appears
- If you initialized with
consent: 'pending', events wait untilrtn.setConsent('granted'). - A previous
denieddecision is stored asrtn_consentand reused on later visits. Clear site data to test again. rtn.pause()drops calls untilrtn.resume().- Verify that the write key belongs to the current site. A missing write key or endpoint disables the SDK and logs an error.
Events are dropped
Initialize with debug: true to see server rejection reasons in the console, and add onDiagnostic to see client-side drops:
rtn.init('WRITE_KEY', {
debug: true,
onDiagnostic: (diagnostic) => console.debug('[rtn diagnostic]', diagnostic),
});event_dropwithrate_limitedorsampled_outcomes fromratePolicyoreventRatePolicies.event_dropwithduplicate_pagemeans the SPA page key did not change.- Ecommerce events without
product_idandprice, or orders withoutorder_idandvalue, are rejected by the ingest edge. - A
beforeSendhook that returnsnullor throws drops the event.
Events arrive without a user ID
Anonymous events are expected before rtn.identify(...). Call identify at sign-in or when checkout provides a reliable customer identifier.
Identity changes between domains
Cookies do not cross registrable domains. Use cookieDomain for subdomains and the linker for separate domains.
Test a delivery immediately
rtn.track('sdk_tested', { source: 'browser_console' });
await rtn.flush();Inspect the v1/batch request in developer tools. A successful ingest responds with HTTP 202.