RTN Docs

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 until rtn.setConsent('granted').
  • A previous denied decision is stored as rtn_consent and reused on later visits. Clear site data to test again.
  • rtn.pause() drops calls until rtn.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_drop with rate_limited or sampled_out comes from ratePolicy or eventRatePolicies.
  • event_drop with duplicate_page means the SPA page key did not change.
  • Ecommerce events without product_id and price, or orders without order_id and value, are rejected by the ingest edge.
  • A beforeSend hook that returns null or 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.

On this page