Adsourcer Developer
Events
Track the ad lifecycle from render to conversion. Events feed attribution, analytics, and billing.
Markdown for agents · llms-full.txt
Event types
- Impression — ad rendered to the user. Fire when the sponsored unit enters view.
- Click — user engaged with the ad. Prefer the click_url redirect over manual click events.
- Conversion — downstream purchase or signup attributed to a prior click.
Impression example
typescript
await client.events.impression({ request_id: result.request_id, ad_id: ad.ad_id, session_id: sessionId,});Conversion example
python
client.events.conversion( request_id=request_id, ad_id=ad_id, value=149.0, currency="EUR", click_id=click_id,)Endpoints
- POST /v1/events/impression
- POST /v1/events/click
- POST /v1/events/conversion
Best practices
- Reuse the same anonymous
session_idacross recommend and events - Always pass
request_idfrom the recommend response - Do not send names, emails, or other PII in event payloads