Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Prebid Server Aliases not mapped/translated to their corresponding Bidder name on Cookie Sync requests

Open danielguedesb opened this issue 4 years ago • 6 comments

Type of issue

Bug

Description

PBJS is not mapping/translating PBS Aliases to their 'parent' bidder on Cookie Sync requests. Instead, it's sending the alias present in the configuration which leads to a "error": "Unsupported bidder" in the response.

Steps to reproduce

PBJS Configuration:

..
adUnits: [
  {
    code: 'path',
    mediaTypes: {
      banner: {
        sizes: [[300, 600]],
      },
    },
    bids: [
      {
        bidder: 'rubiconS2S',
        params: {
          accountId: 'a',
          siteId: 'b',
          zoneId: 'c',
        },
      },
    ],
  },
]
..


s2sConfig: [
  ..
  bidders: [
    'rubiconS2S',
  ],
  extPrebid: {
    aliases: {
      'rubiconS2S': 'rubicon',
    },
  }
],
..

Expected results

Expected to see rubicon in the request payload sent to the /cookie_sync endpoint.

Actual results

Seeing rubiconS2S instead:

image

Leading to the following response - Prebid Server Java, unsure if Go's version returns the same:

{
  "status": "ok",
  "bidder_status": [
    {
      "bidder": "rubiconS2S",
      "error": "Unsupported bidder"
    }
  ]
}

Platform details

Pbjs version 6.9.0

danielguedesb avatar Sep 26 '22 18:09 danielguedesb

Discussed with @dgirardi - we agreed that for now only pub-defined aliases will be resolved for /cookie_sync. Hardcoded aliases are supported on the PBS side.

bretg avatar Sep 26 '22 19:09 bretg

Discussed with @dgirardi - we agreed that for now only pub-defined aliases will be resolved for /cookie_sync. Hardcoded aliases are supported on the PBS side.

Registering aliases on PBJS solves the "issue". Is there any value on keeping this open?

danielguedesb avatar Sep 27 '22 09:09 danielguedesb

@danielguedesb - what do you mean by 'Registering aliases'? Glad to hear you're happy with the situation now, but I'm curious. I didn't think that pbjs.aliasBidder would have an effect on PBS cookie_sync...

bretg avatar Sep 27 '22 13:09 bretg

nm - just looked in the code. yeah, bidder aliases are already traversed. cool. closing.

bretg avatar Sep 27 '22 13:09 bretg

For reference, this is what I was referring to: https://docs.prebid.org/dev-docs/publisher-api-reference/aliasBidder.html

pbjs.aliasBidder('rubicon', 'rubiconS2S');

The above registers the alias and is then picked up correctly by prebidServerBidAdapter.

danielguedesb avatar Sep 27 '22 13:09 danielguedesb

The following does not work as intended though:

  • s2sConfig.extPrebid.aliases (as in OP)
  • aliases to aliases (pbjs.aliasBidder('rubicon', 'rubicon2'); pbjs.aliasBidder('rubicon2', 'rubicon3'))
  • "hardcoded" aliases (beintoo will be resolved to appnexus, even though it might have different sync logic in the backend).

dgirardi avatar Sep 27 '22 14:09 dgirardi