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

Pubmatic adaptor not working for certain accounts

Open jdelhommeau opened this issue 10 years ago • 5 comments

Hi,

It seems there is a bug in the Pubmatic adaptor. prebid.js doesn't handle the response properly, causing pubmatic response to always been considered as no bid response.

In the code in Pubmatic adaptor, we have below lines:

pubmatic1

As you can see by the code and the comment, we expect the response to be of the form bidstatus=0;bid=0.0000;bidid=39620189@320x50;wdeal=

While actually, Pubmatic response is of the form: "bidstatus;1;bid;0.3554;bidid;/3845/ebay.es.search/RTM_391@728x90;wdeal;"

We should update the pubmatic adaptor to use the correct response format.

Here is an example implementing pubmatic which fails: https://jsfiddle.net/mohsink4u/1fshL465/6/

Julien

jdelhommeau avatar Feb 24 '16 09:02 jdelhommeau

As per Pubmatic team, it seems the response change depending on which adserver the publisher is using. If using DFP, then the response I provided will be used (with key;value). If using another adserver, then the response used currently (with key=value) will be used. We should be able to manage both case.

I am still unclear how pubmatic detect the adserver, especially since prebid code executing before the adserver code, they shouldn't be able to detect it runlive. If it's a setup at the account level for the publisher, it might be possible to force pubmatic to always send abck the non DFP response (the one we manage today).

Will keep you posted.

jdelhommeau avatar Feb 24 '16 11:02 jdelhommeau

We had this issue with the Pubmatic adapter, and have made a Pull Request to have our solution added to the main Prebid.js project: https://github.com/prebid/Prebid.js/pull/186

Basically the params may be in either of those formats ("key=value;key2=value2;" or "key;value;key2;value2;"), so I've checked for the presence of "=" in the incoming string and written additional different processing if it's not found. There may be a better way to do it so please feel free to suggest another solution!

tomraa avatar Feb 24 '16 14:02 tomraa

@tr-coull indeed, this is the issue and your fix seems the best way to do it from prebid.js POV. In case of my test, I was actually able to ask Pubmatic to change the response type for my pubmatic account, to it matches the key=value. It took them less than half a day between the moment I asked them and the moment the change was effective, so it might also be a good way to quickly fix this if you have issue right now.

jdelhommeau avatar Feb 24 '16 14:02 jdelhommeau

I believe we just need a test with working params for PR #186 and that it then can be merged. We'll reach out to Pubmatic for that. In the meantime, another workaround is to fork this repo and use @tr-coull's changes to build your prebid.js. Since @jdelhommeau has the expected response type now this may be unnecessary.

protonate avatar Feb 24 '16 17:02 protonate

This has been fixed. closing

mkendall07 avatar Mar 14 '16 16:03 mkendall07