Skip to content

Commit

Permalink
Criteo Bid Adapter: reinforce adomain type in case of missmatch (preb…
Browse files Browse the repository at this point in the history
…id#9687)

* Update criteoBidAdapter.js

* Update auction.js
  • Loading branch information
patmmccann authored and jorgeluisrocha committed May 18, 2023
1 parent 370b3f5 commit 47ad20f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/criteoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export const spec = {
bid.meta = Object.assign({}, bid.meta, { paf: pafResponseMeta });
}
if (slot.adomain) {
bid.meta = Object.assign({}, bid.meta, { advertiserDomains: slot.adomain });
bid.meta = Object.assign({}, bid.meta, { advertiserDomains: [slot.adomain].flat() });
}
if (slot.native) {
if (bidRequest.params.nativeCallback) {
Expand Down
2 changes: 1 addition & 1 deletion src/auction.js
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ export const getPriceByGranularity = (granularity) => {
*/
export const getAdvertiserDomain = () => {
return (bid) => {
return (bid.meta && bid.meta.advertiserDomains && bid.meta.advertiserDomains.length > 0) ? bid.meta.advertiserDomains[0] : '';
return (bid.meta && bid.meta.advertiserDomains && bid.meta.advertiserDomains.length > 0) ? [bid.meta.advertiserDomains].flat()[0] : '';
}
}

Expand Down

0 comments on commit 47ad20f

Please sign in to comment.