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

Multiple partners on native slot send all native asset to DFP

Open haroldpussat opened this issue 7 years ago • 8 comments

Type of issue

question

Description

Hi,

We are currently trying to add more than 1 partner on native demand. Today, we have only Appnexus in competition. We are looking to add 2 appnexus alias in the native competition. My slot is name "dfp_banniere_medium" and is setup with native media type like this banniere_medium : {native : {sponsoredBy: {sendId: true},image: {sendId: true},title: {sendId: true}, body: {sendId: true}, clickUrl: {sendId: true}}},

There a 3 partners setup in competition (3 from Appnexus adapter, 2 with setAlias and 1 as official Alias). Our setup if SendAllBids:false When at least 2 partners send bids for this slot, I can see see that native value for asset are concateneted into corresponding key. So that nativeTracker can not display correctly the native style on DFP. The key concerned are all the one I setup as sendId : true

I am able to get this behavior with Prebid 2.11 (official) and our Prebid 1.39 (custom)

Steps to reproduce

0 - SendAllBids : false, adServer DFP 1- On a full native slot, add at least 2 partners (mines are appnexus) 2 - Setup the mediaType in order to send only asset for native 3 - At least 2 partner send answer with valid bids 4 - check the targeting sent to DFP

Test page

https://lp.additi.fr/interne/hpu/20190419-Prebid.2.11-multiple_native_partners/?dfptest=61

where there is one slot dfp_banniere_medium, setup with 3 alias appnexus partners. the native style targeted should be the one that include native asset.

Expected results

I was expecting that only native value corresponding to the winning are sent to DFP

Actual results

I have native value sent as many as bids received for the page, see screenshot below image

The adId 72fbad640327be from bidder Appnexus366 is "well" displayed as it is the winning bid The adId "8bc36cbffcd90c" from bidder AppnexusAst is also sent to DFP and the asset are displayed on the native style

You can see the key-value sent to DFP that include the 2 bids 👍 image

hb_native_image : hb_native_image:72fbad640327be,hb_native_image:8bc36cbffcd90c hb_native_linkurl : hb_native_linkurl:72fbad640327be,hb_native_linkurl:8bc36cbffcd90c

Platform details

Prebid 2.11 offical, Prebid 1.39 custom, Chrome / Firefox

Other information

haroldpussat avatar Apr 19 '19 14:04 haroldpussat

@haroldpussat Thanks for reporting the issue. I think this is a bug.

So any key which is not a standard key is merged before sending it to ad server. For e.g If Appnexus defining custom keyvalue pair foo:bar and Rubicon defining custom keyvalue pair foo:baz will be merged to foo: ['bar','baz']. In Prebid, Native keys are not standard keys and hence they are merged together.

I will discuss this with the team and try to fix this asap.

Meanwhile can you try using bidderSettings. If you use below snippet it may solve your problem. More info on bidderSetttings here

pbjs.bidderSettings = {
          standard: {
              adserverTargeting: [{
                  key: "hb_bidder",
                  val: function(bidResponse) {
                      return bidResponse.bidderCode;
                  }
              }, {
                  key: "hb_adid",
                  val: function(bidResponse) {
                      return bidResponse.adId;
                  }
              }, {
                  key: "hb_pb",
                  val: function(bidResponse) {
                      return bidResponse.pbMg;
                  }
              }, {
                  key: 'hb_size',
                  val: function (bidResponse) {
                      return bidResponse.size;
                  }
              }, {
                  key: 'hb_source',
                  val: function (bidResponse) {
                      return bidResponse.source;
                  }
              }, {
                  key: 'hb_format',
                  val: function (bidResponse) {
                      return bidResponse.mediaType;
                  }
              }, {
                  key: 'hb_native_body',
                  val: function (bidResponse) {
                      return bidResponse.native.body;
                  }
              }, {
                  key: 'hb_native_linkurl',
                  val: function (bidResponse) {
                      return bidResponse.native.clickUrl;
                  }
              }, {
                  key: 'hb_native_image',
                  val: function (bidResponse) {
                      return bidResponse.native.image;
                  }
              }, {
                  key: 'hb_native_brand',
                  val: function (bidResponse) {
                      return bidResponse.native.brand;
                  }
              }, {
                  key: 'hb_native_title',
                  val: function (bidResponse) {
                      return bidResponse.native.title;
                  }
              }]
          }
      }

jaiminpanchal27 avatar Apr 25 '19 18:04 jaiminpanchal27

@jaiminpanchal27 thanks for the quick feedback. I guess your workaround seems ok when my page has only full native position. But when I add other positions, such as standard banner, Prebid raise issue such as "cannot read property 'brand' of undefined.

image

I'm able to reproduce this issue with 1.39 custom and 2.11 official. Please find below test page with your workaround including other banner positions with 2.11 official https://lp.additi.fr/interne/hpu/20190419-Prebid.2.11-multiple_native_partners/index_bidder_settings_all_positions.html?pbjs_debug=true

Please find also test page with only native positions where your workaround is OK : https://lp.additi.fr/interne/hpu/20190419-Prebid.2.11-multiple_native_partners/index_bidder_settings.html?pbjs_debug=true

haroldpussat avatar Apr 29 '19 09:04 haroldpussat

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 13 '19 09:05 stale[bot]

was this ever properly fixed as i get exactly the same as this, would rather use a proper fix, than a work around if possible

spormeon avatar Aug 09 '19 09:08 spormeon

@jsnellbaker can you take another look at this?

mkendall07 avatar Aug 27 '19 15:08 mkendall07

i think you got it fixed in last release 2.29.0 as I've taken out the 'work around" and now get a single id on each bid/ targeting

spormeon avatar Aug 27 '19 15:08 spormeon

Hi @haroldpussat

Can you try this setup again using Prebid 2.29.0 and let me know if you're still having issues? If so, can you copy&paste the prebid config setup you're using so I can investigate?

As @spormeon noted, I think this was fixed via #4086 (which was part of 2.29.0).

jsnellbaker avatar Aug 27 '19 15:08 jsnellbaker

Hi, I can confirm the issue is solved with a 2.30 Prebid.js version. The only winning asset is sent to DFP. We will be able to add more than one partner in native prebid competition. Thanks

haroldpussat avatar Sep 04 '19 09:09 haroldpussat