How Koah works
Knowing the lifecycle lets you customize Koah AI ad behavior to your liking, and ensures there are no surprises in how ads work in your app. This applies across every integration page and platform.
The lifecycle
Initialize
Initialize the SDK with your publisher ID once, at app or page startup.
Request an ad
Request an ad for a placement, passing the ad context that describes the surface.
Render
Koah ranks, selects, and renders the best creative and format into your slot.
Track
Tracking happens automatically: an impression fires when the ad renders, and interactions are reported as events.
Impressions and events
- An impression is counted the first time a served ad is shown in your app, at most once per served ad (see the Glossary). Prefetching never counts, and a card that does not fit its slot never counts.
- Events cover the ad lifecycle — served, impression-tracked, clicked, no-fill — surfaced through each SDK's callback so you can instrument your own analytics.
Caching and deduplication
Koah caches and dedupes ad requests automatically. The cache key is derived from the request arguments. This lets the SDK:
- Dedupe redundant requests when a component re-renders with the same context, and
- Reuse a cached result until it expires.
On the mobile SDKs (iOS, Android, Flutter, React Native) you also pass an explicit cacheKey — a stable string identifying the placement (a message ID, a feed-row ID, a screen name). Reuse the same key across re-renders of a slot so they share one cached result, and pair it with prefetchAd to warm a slot before it's shown. On the web SDK there's no key to manage — it's derived from the request arguments.
Prefetching for feeds
In a scrolling feed you can prefetch ads for upcoming slots so they're ready the moment a row scrolls into view. Prefetching warms the cache without billing an impression — the impression is tied to the eventual on-screen render, and a slot that comes back unfilled simply renders nothing.
Reporting an ad
Every Koah ad includes an "About this ad / Report this ad" affordance so users can flag inappropriate creatives. Reports feed Koah's content moderation. No integration work is required — it ships with the ad.