Skip to Content
Feature GuidesTesting Surveys Locally

Testing Surveys Locally

Two init() options make it practical to test a survey’s targeting and content without waiting out real-world limits.

Bypass Cooldown and Daily Cap

Throttling — the default 24-hour cooldown and 3-per-day cap — applies to every survey, including the one you’re actively testing. disableThrottling bypasses both for the current session:

oneSygnal.init('YOUR_API_KEY', { disableThrottling: true });

This is meant for local dev and test harnesses only — it’s never inferred from apiUrl or any other environment signal, so it has to be set explicitly and removed before shipping. See each platform’s Configuration page for the equivalent option (Web shown above).

Turn on debug logging

debug: true logs the Stage 1/Stage 2 trigger evaluation, throttling decisions, and network calls to the console, so you can see why a survey didn’t show instead of guessing:

oneSygnal.init('YOUR_API_KEY', { debug: true });

See Android and iOS Configuration pages for the native equivalents.

Reproducing a specific user’s targeting

If a survey isn’t showing for a real user and you can’t reproduce it locally, don’t guess at their trigger rules — call identify() with the same traits and fire the same track() event your app would, in a build with debug: true set, and read what the trigger/rules engine actually decided from the console output.