-
Notifications
You must be signed in to change notification settings - Fork 4
Trusted Server Page Response with Ad Request Response Workflow
Jason E edited this page Aug 27, 2025
·
4 revisions
This is v0.2 of a high level overview of how Trusted Server fits into an otherwise standard prebid + GAM ad workflow (GH will compress so download instead)
Mermaid Syntax to edit:
sequenceDiagram
participant Browser
participant TrustedServer as Trusted Server
participant Prebid as Prebid Server
participant SSP1 as SSP 1 Rubicon
participant SSP2 as SSP 2 AppNexus
participant SSP3 as SSP 3 PubMatic
participant DSP1 as DSP 1 via SSP
participant DSP2 as DSP 2 via SSP
participant GAM as Google Ad Manager
Browser->>TrustedServer: GET /article-page
TrustedServer-->>Browser: HTML page with ad slots plus JS served from edge cache
Note over TrustedServer: Trusted Server initiates internal ad orchestration for this page request
rect rgb(240, 248, 255)
Note over TrustedServer,DSP2: PREBID AUCTION PHASE
TrustedServer->>Prebid: POST /openrtb2/auction OpenRTB 2.6 request with imp array ad slots plus sizes user.ext.consent GDPR user.id synthetic ID site.page site.ref device.ua device.ip permutive segments in user.ext.data ext.prebid.targeting.includewinners ext.prebid.cache.bids
Note over Prebid: Parse request: distribute to configured SSP adapters apply permutive audience segments
par Parallel SSP Requests
Prebid->>SSP1: POST /bid OpenRTB bid request with permutive segments
Prebid->>SSP2: POST /bid OpenRTB bid request with permutive segments
Prebid->>SSP3: POST /bid OpenRTB bid request with permutive segments
end
par SSPs Forward to DSPs
SSP1->>DSP1: OpenRTB bid request plus SSPs user data plus permutive audience data
SSP2->>DSP2: OpenRTB bid request plus SSPs user data plus permutive audience data
end
par DSP Responses
DSP1-->>SSP1: Bid response CPM price Creative HTML Deal ID if applicable
DSP2-->>SSP2: Bid response CPM price Creative assets Targeting data
end
par SSP Responses Back to Prebid
SSP1-->>Prebid: Bid response plus SSP markup
SSP2-->>Prebid: Bid response plus SSP markup
SSP3-->>Prebid: No bid timeout
end
Note over Prebid: Auction logic: Compare all CPM prices Apply price floors Select highest bidder per slot Generate targeting key-values hb_pb equals 2.50 hb_bidder equals rubicon hb_size equals 728x90 hb_adid equals abc123
Prebid-->>TrustedServer: Auction results: Winning bids per slot hb targeting key-values Creative cache IDs Deal IDs Price buckets
end
rect rgb(255, 248, 240)
Note over TrustedServer,GAM: GAM DECISIONING PHASE
Note over TrustedServer: Construct GAM request with original targeting params: ALL prebid key-values hb_* Synthetic ID as ppid, then apply permutive segments to cust_params for targeting
TrustedServer->>GAM: GET /gampad/ads?iu=/88059007/autoblog/reviews&cust_params=hb_pb%3D2.50%26hb_bidder%3Drubicon%26hb_size%3D728x90%26channel%3Dweb%26permutive%3D129627%2C137412%2C138272&ppid=arenaGroup-syntheticID&correlator=12345&url=https://www.autoblog.com/article
Note over GAM: GAMs decisioning: Compare prebid winners vs direct-sold line items and apply yield optimization with permutive audience targeting. Check frequency caps and verify targeting match, then return highest rev option
alt GAM Direct-Sold Wins
GAM-->>TrustedServer: GAM creative plus line item details
else Prebid Winner Wins
GAM-->>TrustedServer: Passback signal Use prebid creative
Note over TrustedServer: Retrieve prebid creative from cache using hb_adid
end
end
Note over TrustedServer: Final response preparation: Domain rewriting 3p to 1p, URL encoding for assets, GDPR compliance, check Synthetic ID injection
TrustedServer-->>Browser: Final ad response: Winning creative HTML All URLs rewritten to 1p domain and log tracking pixels with synthetic IDs
Note over Browser: Page renders with ads already in slots All requests appear first-party
Note over Browser,TrustedServer: Separate testing endpoints like /prebid-test /gam-test are for visibility and debugging only not actual production ad serving
`