Track ad impressions and clicks
activeEvery ad you serve must report back that it was seen and clicked — that reporting is what campaign delivery, billing, and advertiser reporting run on. This is the shared last step for both Display Ads and Sponsored Ads.
For the full specification — every event name, every property, and the wire format — see Ad events.
Who fires what
How much you implement depends on the rendering path you chose:
| Your path | Impressions & clicks |
|---|---|
| Display Ads → Web SDK rendering | Fired for you. Nothing to implement. |
| Display Ads → self-rendered | You fire them. |
| Sponsored Ads | You fire them. |
Fire the events yourself
On the two self-rendered paths, report each event through the Web SDK running on the page,
keyed by the bidId the ad request returned:
// The ad entered the viewport
Binoban.track("ads_impression", {
bid_id: "550e8400-e29b-41d4-a716-446655440003",
index: 3, // position of the ad in the response array
});
// The user clicked the ad
Binoban.track("ads_click", {
bid_id: "550e8400-e29b-41d4-a716-446655440003",
index: 3,
});
Use the bidId from the item you rendered — banners[].bidId / natives[].bidId on the
Ad Request API, or ads[].bidId on the
Sponsored Ads API. An event without bid_id is
dropped.
Counting clicks
Sending the user to the ad's destination can happen two ways, and they differ in who counts the click:
- Via the tracker URL (
clickUrl) — the tracker counts the click, then redirects to the destination. Nothing else to do; the click is counted automatically. - Via the destination directly (
targetUrlon a banner,landingUrlon a native,landing_urlon a sponsored display banner) — you send the user straight there, but then you must fire the click event yourself (viaBinoban.track("ads_click", ...)or the direct endpoint below) so the campaign's click is counted.
The destination is the advertiser's own URL, configured in the Advertiser Portal during campaign creation.
Direct tracker endpoints
The endpoints the SDK's track() calls resolve to. They're also callable directly — for
example from a backend that renders ads server-side — keyed by bidId, with no
authentication required:
# impression (billing)
curl --location '{apiPath}/api/tracker/ad/billing?bidId=5b0d331d-...'
# click
curl --location '{apiPath}/api/tracker/ad/click?bidId=5b0d331d-...'
The tracker counts each impression and click once per bidId — sending the same event
multiple times is safe; only the first is counted.
Next steps
- Ad events — the full event and property reference.
- Web SDK reference → Identity — how these events are attributed to a visitor.
- Go-live checklist — before you ship.