Ad responses include tracking URLs that must be fired to record impressions and clicks. How you fire them depends on your integration type.Documentation Index
Fetch the complete documentation index at: https://docs.thrads.ai/llms.txt
Use this file to discover all available pages before exploring further.
Sponsored polls use signed
vote_url and results_url fields in addition to normal impression tracking. Poll option clicks submit to vote_url; advertiser traffic uses the optional post-vote cta_url. See Sponsored Poll Tracking.Tracking URLs
The click URL (url) contains the tracking URLs as query parameters:
| Query param | Purpose |
|---|---|
view_url | DSP impression tracker. Fire when the ad is viewable. |
thrad_view_url | SSP impression tracker. Fire when the ad is viewable (same timing as view_url). |
url query string and fire them yourself.
Web / Browser Integration
For browser-based integrations (websites, web apps), use the Thrad Publisher Tag — a lightweight script that automatically tracks viewability using IntersectionObserver.Publisher Tag Setup
Follow the publisher tag quickstart for browser-based tracking
- Rendered — element exists in DOM
- In view — element enters viewport
- Viewable — 50% visible for at least 1 second (IAB standard)
- View end — element leaves viewport or page closes
<a href> and the tag does the rest.
Mobile Integration (iOS / Android)
Mobile apps don’t run the publisher tag. You need to extract and fire the tracking URLs yourself.1. Extract Tracking URLs from the Click URL
Parseview_url and thrad_view_url from the url query string:
2. Fire Impressions on Viewability
When the ad becomes viewable (at least 50% visible for 1 second), fire both URLs. If the app fires directly from the device, the OS networking stack sends the correct headers automatically:| Header | Description |
|---|---|
X-Forwarded-For | The end-user’s original IP address. |
User-Agent | The end-user’s original device/browser string. |
3. Handle Clicks
When the user taps the ad, open theurl field. It records the click and redirects to the advertiser’s landing page:
url or cta_url for option buttons. Option buttons submit the selected option_id to vote_url; reveal cta_url only after voting.
Testing in Staging
Staging API keys return test ads with real tracking URLs. Use these to verify your full tracking integration before going live:- Fire
view_urlandthrad_view_url— both must return204 No Content. If you get a400, your request is missing the requiredX-Forwarded-FororUser-Agentheaders. - Fire
url(click) — should redirect to a test landing page.
204 confirms your integration is correctly configured and the impression would be counted in production.