Skip to main content

Integration Troubleshooting

How To Use This Page

Find your symptom, confirm the platform column, then apply the exact fix.

Runtime Initialization

SymptomPlatformProbable CauseExact Fix
window.Selwise is undefinedCDNScript URL/path or data-site-key is wrongUse https://widget.selwise.com/client.js and verify data-site-key.
window.Selwise is undefinednpmexposeGlobal is false or init() never ran in browserEnable exposeGlobal: true if global API is required and run init on client.
sdk methods return empty/defaultsReact Nativeinit() failed or not awaitedawait sdk.init(...) before invoking tracking/identity methods.

Auth and Access

SymptomPlatformProbable CauseExact Fix
403 origin validation failedCDN / npmDomain not verified or request origin mismatchVerify site domain in dashboard and ensure request originates from approved domain.
403 invalid API key or insufficient scopeReact NativeMissing/invalid x-selwise-api-key or wrong scopeRotate key if needed; include proper scope (GET -> mobile_read, write methods -> mobile_write).
401/403 on private APIsAllWrong token modelUse public site endpoints for client runtime, private endpoints only with Bearer auth.

Event and Order Delivery

SymptomPlatformProbable CauseExact Fix
Event visible locally but missing in backendAllNon-canonical event name or missing required payload fieldsUse Event Cookbook canonical payload templates.
Duplicate eventsCDN / npmMultiple runtime instances in app shellKeep one singleton runtime instance and clean up on unmount.
Duplicate orders / conflictAllRetried same order without idempotency guardDeduplicate by orderId; retry only transient failures.
Event queue not drainingReact NativeOffline state or retry backoff window activeReconnect network, call await sdk.flush(), and verify retry delay has elapsed.

Search and Recommendations

SymptomPlatformProbable CauseExact Fix
Search endpoint returns data but UI not updatedReact NativeSDK is headless, no default renderingRender response with your own RN components.
Recommendation products emptyAllMissing widget ID/context or no eligible productsValidate widget ID and optional context (currentProductId, visitorId).
Search analytics incompleteAllOnly query event emitted, interaction events missingEmit filter/sort/page/click events as part of flow instrumentation.
SymptomPlatformProbable CauseExact Fix
Consent granted but analytics still absentAllIncorrect event payload or site mismatchValidate canonical payload, siteKey, and API URL environment.
Consent resets unexpectedlyAllStorage cleared or environment switchedRecheck storage persistence and environment-specific site keys.
Withdraw consent call failsReact NativeUsing read-only scoped keyEnsure mobile_write scope for consent write endpoints.

Rate Limits and Reliability

SymptomPlatformProbable CauseExact Fix
Frequent 429 responsesAllBurst traffic without backoffRespect Retry-After, add exponential backoff and jitter.
High latency in event visibilityReact NativeLarge flush interval/batch settingsTune flushIntervalMs and batchSize conservatively.
Random data loss during app closeReact NativeApp terminated before queue flushFlush on lifecycle transitions and keep periodic flush enabled.

Escalation Checklist

Before escalating to support, collect:

  1. Integration model (CDN, npm, React Native) and SDK/package version.
  2. siteKey (masked) and environment (staging/production).
  3. Failing endpoint + HTTP status + response body (masked).
  4. Representative payload sample (masked PII).
  5. Confirmation that Verification probes were run.