Adsourcer Developer
Click tracking
Every ad includes a signed click_url. Use it as the link href — Adsourcer handles attribution and redirect.
Markdown for agents · llms-full.txt
How it works
POST /v1/ads/recommendreturns aclick_urlfor each ad- Your UI links the ad CTA to that URL
- The user hits
GET /v1/click/{token} - Adsourcer validates the token, records the click, and 302-redirects to the advertiser
Do not unwrap URLs
Never extract the destination URL from the token yourself. Always send users throughclick_url so clicks are attributed correctly.Example click_url
text
http://localhost:8000/v1/click/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Tokens are signed and time-limited. Expired or tampered tokens return 404.
Publisher responsibilities
- Use
click_urldirectly — do not modify query parameters - Display sponsored disclosure labels alongside every ad
- Do not prefetch or bot-click redirect URLs
Legacy manual clicks
POST /v1/events/click still exists for custom flows, but signed redirects are the recommended path. See Events.