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).
For browser integrations, the publisher tag extracts and fires these automatically from the click URL. For mobile, you need to extract them from the url query string and fire them yourself.
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
The tag handles:
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
No manual tracking code needed — just wrap your ad in a container with the redirect URL as an <a href> and the tag does the rest.
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:
// iOS (Swift) — direct from device (headers sent automatically)func fireTrackingPixels(viewUrl: String?, thradViewUrl: String?) { [viewUrl, thradViewUrl].compactMap { $0 }.forEach { urlString in guard let url = URL(string: urlString) else { return } URLSession.shared.dataTask(with: url).resume() }}
Every view ping must include the end-user’s original headers:
Header
Description
X-Forwarded-For
The end-user’s original IP address.
User-Agent
The end-user’s original device/browser string.
View pings missing these headers will be rejected with a 400 Bad Request. See Impression Quality Assurance for details on how impressions are verified.
IAB Viewability Standard: Only fire the impression when the ad is at least 50% visible in the viewport for at least 1 second. Firing on render (before the user sees it) inflates impression counts and hurts your analytics accuracy.
Staging API keys return test ads with real tracking URLs. Use these to verify your full tracking integration before going live:
Fire view_url and thrad_view_url — both must return 204 No Content. If you get a 400, your request is missing the required X-Forwarded-For or User-Agent headers.
Fire url (click) — should redirect to a test landing page.
Make sure to include the required headers when testing the view pings. A 204 confirms your integration is correctly configured and the impression would be counted in production.