ready() when you need to confirm that the Bily browser runtime initialized. Normal event tracking does not wait for it because track() queues early calls.
Check readiness
Verify the installation
In the browser, callinit() before awaiting ready().
Know when it resolves
In 2.0.8, the promise resolves after the browser runtime finishes initialization and can accept queued events, not merely when its bootstrap script loads or exposes a queue. Queued events wait for that runtime handoff. Readiness is not a delivery receipt from an analytics destination. During server rendering, it resolves immediately because there is no browser script to load.Handle a rejection
The promise rejects when:- The browser reports a script load error.
- Bily does not finish runtime initialization before
loadTimeoutMs, even if the bootstrap script loaded. - The script loads but does not expose a usable Bily browser API.
init().
Retry one failed load
After a terminal load failure, callinit() again. Then call ready() for the new attempt.
Troubleshooting
Resolve timeouts, script errors, and conflicting configuration.