TrustX

Developer docs · Publishers

Deploy TrustX withPrebid.js 11.

The standard client-side integration for publishers running Prebid.js 11 who want to add TrustX as a header bidding demand partner. Six steps, from build to go-live.

Bidder code
trustx2
Prebid version
11.x
Ad server
Google Ad Manager
Typical deployment
Days, not weeks

In short

Add the trustx2 bid adapter to your Prebid.js 11 build, add your TrustX ads.txt line, set the placement uid in each ad unit, and wire hb_bidder = trustx2 line items in Google Ad Manager. TrustX runs bid-stream QA with you before full demand opens.

ON THIS PAGE
  1. Before you start
  2. What TrustX provides you
  3. Prerequisites
  4. Prebid 11 - two changes that affect this integration
  5. 01 Build Prebid.js 11 with the TrustX adapter
  6. 02 Add your ads.txt line
  7. 03 Configure the TrustX bidder in your ad units
  8. 04 Prebid global settings
  9. 05 Wire to Google Ad Manager
  10. 06 Validate & go live
  11. Go-live checklist

Who this is for: Publishers running Prebid.js 11 who want to add TrustX as a header bidding demand partner via the standard client-side (browser) integration. Typical deployment: days, not weeks.

Your TrustX technical contact: Boris - boris@trustx.org

Before you start

To begin, submit your domains to TrustX for approval. Once approved, TrustX will generate and provide your publisher and placement IDs.

What TrustX provides you

TrustX will send you these account-specific values. Don't begin the build without them.

ItemWhat it isWhere you use it
Placement secondaryId(s)A unique ID per monetized ad unitThe uid param in your bid config (Step 3)
Your ads.txt lineYour exact authorized-seller line, with your seat IDRoot ads.txt on each domain (Step 2)
Adapter confirmationThe current TrustX adapter module name + Prebid 11 build confirmationYour Prebid build (Step 1)

Prerequisites

  • Prebid.js 11.x (latest recommended).
  • The TrustX bid adapter module included in your build.
  • Access to your ad server (Google Ad Manager assumed below).

Prebid 11 - two changes that affect this integration

Prebid 11.0 introduced breaking changes. Two are relevant here:

  1. Strict storage enforcement. The storageControl module now defaults to strict enforcement - undisclosed cookie / localStorage use is rejected, not just warned. TrustX's adapter uses storage for user syncing, so confirm with your TrustX contact that your v11 build includes the adapter's storage-disclosure metadata (paired …metadata.js file if you load modules separately). Otherwise syncs may be blocked.
  2. Strict mediaType matching. Bids whose mediaType doesn't match the ad unit's declared mediaTypes are now rejected. Declare each TrustX placement under the correct format - banner vs. video - in Step 3.

(PAAPI and Adpod support were also removed in 11.0; neither is used by this integration.)

STEP 01

Build Prebid.js 11 with the TrustX adapter

Option A - Download tool (fastest) Go to https://docs.prebid.org/download.html, select version 11.x, add the TrustX (trustx2) adapter alongside your other partners, and download the bundle. Host it on your CDN.

Option B - Build from source

Terminal
git checkout <11.x tag>
gulp build --modules=trustx2BidAdapter,<yourOtherModules>

If you load modules separately, include the adapter's paired metadata file (required by v11 storage disclosure).

Validate the build against the TrustX test page: https://static.cdn.trustx.org/prebid/banner.html

STEP 02

Add your ads.txt line

Add the exact line TrustX gives you to the root ads.txt of every monetized domain (https://yourdomain.com/ads.txt). Format:

Text
trustx.org, <YOUR_SEAT_ID>, DIRECT, 1d2c8a747a749d25

Use the line from your TrustX dashboard - the seat ID is unique to you. A missing or incorrect line cuts off all TrustX demand instantly. Allow 24–48h for propagation and crawl before expecting bids.

STEP 03

Configure the TrustX bidder in your ad units

The adapter routes to TrustX automatically. You only pass the placement ID via uid (or secid) - both map to your TrustX Placement secondaryId.

Use a distinct placement uid for each unit and each format.

STEP 04

Prebid global settings

JavaScript
pbjs.setConfig({
  priceGranularity: 'dense',   // coarser granularity loses revenue
  enableSendAllBids: false,    // avoids GAM key-value bloat
  bidderTimeout: 1500          // 1000–2000ms; too low cuts TrustX out early
});

User sync: TrustX returns sync URLs dynamically in the bid response and the adapter registers them automatically. Enable both iframe and pixel syncing in your userSync config (see the v11 storage note above).

STEP 05

Wire to Google Ad Manager

  • Generate GAM line items per price bucket (use the Prebid GAM line-item tool).
  • Traffic these key-values: hb_pb, hb_adid, hb_bidder.
  • TrustX's value in GAM: hb_bidder = trustx2.
  • Video: the GAM creative needs a VAST redirect to %%PATTERN:hb_adid%%.

Deploy to production.

STEP 06

Validate & go live

  1. Confirm the TrustX test page renders correctly.
  2. Verify ads.txt status is valid / authorized (allow 24–48h).
  3. Notify your TrustX contact to run bid-stream QA from our side - we confirm requests are arriving, placement IDs are correct, and response rates are healthy before opening full demand.
  4. Go live.

Go-live checklist

  • Prebid 11 build includes the trustx2 adapter (+ storage-disclosure metadata)
  • ads.txt line added to every monetized domain; status valid
  • Each placement mapped to the correct uid and format
  • hb_bidder = trustx2 line items live in GAM
  • Global config set (priceGranularity, bidderTimeout, userSync)
  • TrustX-side bid-stream QA passed
  • Confirmed live

Questions or issues during deployment: adops@trustx.org

Questions during deployment?

Email adops@trustx.org. We run bid-stream QA with you before full demand opens.

Trusted Media Alliance

PROUD MEMBER

TrustX is a proud member of the Trusted Media Alliance.

Trusted inventory. Explainable AI. Independent execution.
TRUSTX • madSense • Shigotech

Learn More