Skip to main content

Staging vs. production

You build with your staging key. When you swap in the production key, two things change:

Check before you switch

Three checks with your staging key. The first one the API does for you. The other two it can’t: they decide how well ads match and whether you get paid.
1

Validation: the request is complete

Every request returns 200 with a bid and nothing logs invalid_request. Beyond that, check the fields the API accepts but can’t judge:
  • device.geo.country is on every request. This matters most: without the country, every campaign that targets one is skipped. device.ip is only the fallback.
  • device.type and device.os are on every request. device.user_agent is only the fallback.
  • device.ip and device.user_agent are the end user’s, never your server’s. Every impression is matched against them: see Impression Billing.
  • user.id is the same on every request in a session, and across sessions where you can. See User & Chat Identification.
  • context.id is on every conversation request, and stays the same for the whole chat.
  • Trackers fire: all 4 on every staging bid, each at its event. A bid can carry more than one pixel per event, so fire every one.
2

Quality: what you send is worth matching on

The auction picks ads from what you describe. A vague description matches vague ads, or none. Read a few real requests and check:
  • context.summary is specific. “User is choosing trail-running shoes for a first ultra, asked about grip and drainage” targets. “User is chatting about sport” doesn’t.
  • The latest message has PII masked. Names, emails, phone numbers, addresses, account numbers. Mask before you send; nothing on our side does it for you.
  • user.summary says who this person is, in a line: their profession, interests, current situation and preferences, in whatever shape you have them. No names, contact details or identifiers. For example:
    Software engineer, into trail running and coffee gear, training for a first marathon, prefers mid-range brands and buys online.
3

Health: the trackers land

Staging pixels don’t reach the Health page. On staging, email contact@thrad.ai and we’ll confirm from our logs that all 4 pixels fired for your bids. Health fills in once production traffic runs.
Open your publisher’s Health page on the Thrad Platform. Both numbers cover the last 24 hours.
The Health page with Ping Health and View Rate Health cards

Health → Overview

  • Ping Health is tracker calls that confirmed an impression, over all tracker calls we received from you. A call fails when it arrives twice or late, its token has expired or is invalid, the end-user headers are missing, or the payload is gone. Expect close to 100%. Under 30% shows Unhealthy. A low ping rate means the integration fires wrong, not that users aren’t looking.
  • View Rate Health is impressions you rendered, over all impressions we served you. It drops when you draw ads users never see, or don’t fire the viewable pixel. At or above 80% is Healthy, 20 to 80% Suboptimal, under 20% Unhealthy. A healthy ping rate with a low view rate is placement, not code: see Impression Billing.
The Event Stream tab lists every ping with its outcome, so a failing one tells you why.

Switch to production

1

Get your production key

Email contact@thrad.ai for your production API key, then swap it in for the staging key.
2

Add Thrad to your ads.txt

Ad buyers check your ads.txt before they bid, to confirm Thrad may sell your ad space. Without this line, bids on your inventory may be filtered out.Add this line to https://yourdomain.com/ads.txt. For a mobile app, add it to app-ads.txt on the developer website listed in your app store page.
Replace <YOUR_ORGANIZATION_ID> with your Organization ID. On the Thrad Platform, open your publisher, then Configuration → Keys: it’s the second row of the Identifiers panel, with a copy button next to it. Not the Publisher ID in the row above: that identifies one property to us, while buyers verify the organization that owns it, which is what we publish in sellers.json.
The Identifiers panel on the publisher's Keys tab, with the Organization ID row highlighted

Configuration → Keys → Identifiers → Organization ID

One organization, one line. If you run several properties (a website and an app, or several apps), every ads.txt and app-ads.txt carries the same line. The domain is thrad.ai, with no s: buyers fetch sellers.json from the domain you write, and a redirect doesn’t count.
The file has to be plain text. A single-page app that answers every path with its HTML shell serves /ads.txt as a web page, which buyers read as no file at all; put it in the static directory (public/ in Next.js) so the path returns the text itself.Ad networks can take 24–48 hours to pick up the change.

Next steps

Revenue & Metrics

You’re live: track impressions, revenue, and fill rate.

Talk to us

Questions about going live? Email us.
Need exact fields? The API Reference has every request and response.