window for readiness, and an internal emitter for everything after that.
Window event: cbh:ready
Dispatched on window once, after initialisation. A CustomEvent whose detail.sdk is the SDK instance.
window.CashbackHive?.initialized first. See Lifecycle.
Emitter methods
on()
console.error; they don’t affect other handlers or the SDK.
off()
on().
Emitter events
ready
Emitted synchronously inside init(), immediately after initialisation completes.
string
The SDK version.
init(), you can only observe it if you registered a handler before initialisation — which is only possible with manual initialisation. For auto-initialised installs, use the cbh:ready window event instead.
click
Emitted by openOffer() before the URL is opened. Not emitted by trackingUrl().
string
The offer’s slug.
string
The fully built tracked URL that will be opened.
auth:change
Emitted whenever the cached member changes identity: a member signs in, signs out, or a token restored from storage resolves to a member on load. It is not emitted when the same member’s profile is refreshed (same id).
Member | null
The new member, or
null after sign-out.auth:change: