Configure the SDK
Every setting the collector needs is passed through one call: amb('init', { ... }). The
loader reads its configuration only from this object, never from data-* attributes.
Options reference #
The console fills in the first three for you. The rest are optional.
| Option | Type | What it does |
|---|---|---|
appId | string | The app slug. Every event is attributed to it. This is the immutable ID you chose when you created the app. |
environment | production | staging | development | preview | The deployment tier. Keeps data separated and selects the per-environment ingest policy. See Environments & releases. |
endpoint | string | The beacon URL, your ingest receiver's /v1/events. The collector also derives the GET /v1/config URL from it. |
release | string, optional | A build, commit, or version tag. Stored on rum.events.release so you can attribute regressions to a deploy. See Environments & releases. |
token | string, optional | An ingest token secret. Required when the app's policy enforces authentication. Comes from the Ingest tokens tab. |
defaultConsent | granted | denied | pending | The fallback consent state before any explicit decision. granted collects immediately. pending buffers until a choice. denied holds everything back. See Consent & privacy. |
A full init call #
With every option set, the call looks like this:
amb('init', {
appId: 'storefront', // the app slug
environment: 'production', // production | staging | development | preview
endpoint: 'https://rum-ingest.example.com/v1/events',
release: '2026.05.0', // optional build / commit tag
token: 'rum_live_…', // optional ingest token secret
defaultConsent: 'granted' // granted | denied | pending
}); Where tokens come from #
Ingest tokens are created and revoked under the Ingest tokens tab on the app. The
secret is shown once at creation time. Paste it into token in your init call,
and rotate it from the same tab when needed. See Ingest tokens.