Skip to main content
The SDK exposes two callbacks. Pick whichever you need.

onEvent — public ad lifecycle

onEvent fires for the small set of public ad-lifecycle events: ad.filled, ad.no-fill, ad.viewed, ad.clicked, ad.error, plus the video and reward events. These are the ones you typically wire your UI and analytics to. The complete list with payloads lives on Ad lifecycle events.

onDebugEvent — detailed internal log

onDebugEvent fires for every internal step the SDK takes — preload requests starting and resolving, message-id pairing decisions, retry attempts, iframe loading milestones, and so on. It is verbose and not stable across SDK versions; treat it as a diagnostic log, not an API. Wire it up only while you’re investigating something, then turn it back off in production:

When something looks off

If an ad doesn’t appear, fires the wrong event, or the SDK behaves unexpectedly:
  1. Re-enable onDebugEvent in your build.
  2. Reproduce the issue.
  3. Capture the full onDebugEvent output and share it with us at support@kontext.so.
The debug log is the fastest way for us to pinpoint what happened on your side without remote-debugging the integration.

skipCode reference

When an ad.no-fill event fires, its payload carries a skipCode explaining why no ad was returned. The values you might see: