Skip to content

Conversation

@skoklowski
Copy link

@skoklowski skoklowski commented Jan 14, 2026

Type of change

  • Bugfix

  • Feature

  • New bidder adapter

  • Updated bidder adapter

  • Code style update (formatting, local variables)

  • Refactoring (no functional changes, no api changes)

  • Build related changes

  • CI related changes

  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

  • Other

Description of change

This change adds support for passing custom targeting key-values from the DAS server response to GAM (Google Ad Manager).

Changes:

  • Extract targeting object from bid.ext.targeting in the interpretResponse function
  • Pass the entire targeting object as adserverTargeting on the bid response
  • Added unit tests covering presence, absence, and multiple targeting keys

How it works:

The DAS server can now control which key-values are sent to GAM without requiring changes to the Prebid.js adapter. When the server returns a targeting object in the bid extension, all keys are automatically passed to GAM targeting.

Since these are custom keys (without hb_ prefix), Prebid.js will aggregate values from all DAS bids for each ad unit, not just the winning bid.

Example bid response from server:

{
  "seatbid": [{
    "bid": [{
      "impid": "bid123",
      "price": 3.5,
      "ext": {
        "targeting": {
          "bidder_variant": "variant_a",
          "custom_key": "custom_value"
        }
      }
    }]
  }]
}

@skoklowski skoklowski changed the title dasBidAdapter: add bidder_variant to adserverTargeting in interpretRe… dasBidAdapter: add server-driven adserverTargeting support Jan 15, 2026
@skoklowski skoklowski merged commit 2a04176 into dreamlab-master Jan 15, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants