Skip to Content
PlatformsWebConfiguration

Configuration

API key

Passed directly as init()’s first argument — there’s no separate setApiKey() on web.

oneSygnal.init('YOUR_API_KEY', options);

Options

Passed as the second argument to init():

OptionTypeDefaultNotes
debugbooleanfalse
autoTrackbooleantrueAutomatic page_view/page_leave/session events.
exitIntentbooleantrueExit-intent trigger detection.
consentRequiredbooleanfalseWhen true, surveys start disabled (setSurveysEnabled(false)) until you explicitly enable them.
cssUrlstringAuto-derived from the bundle’s own script src (.../js/1sygnal.js.../css/1sygnal.css)Only relevant when loading the CDN bundle directly.
localestringnavigator.languageSent as Accept-Language. Fixed at init() time — unlike the natives’ setLocale(), which is live-reactive and re-fetches config under the new locale.
disableThrottlingbooleanfalseBypasses the server-configured cooldown/daily cap. For local dev and test harnesses only.

Debug logging

Set debug: true in the options to enable verbose logging to the browser console during development:

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

This logs SDK lifecycle events, trigger evaluations, and network requests. Disable it in production.

What’s absent on web

reset(), setApiKey(), and setLocale() exist on Android/iOS but not on web:

  • reset() — deferred; web has never distinguished “clear the identified user” from “mint a new anonymous ID.”
  • setApiKey() — no separate override method; the key is init()’s argument.
  • setLocale() — web’s locale is fixed at init() time by design; making it live-reactive like the natives is a product decision that hasn’t been made.

See the full Platform Parity table for every operation.