Skip to content

Commit

Permalink
Integration of Realvu analytics in Somo adapter (prebid#2728)
Browse files Browse the repository at this point in the history
* Integration of Realvu analytics in Somo adapter

* Bug Fixes

* Reworked adapter to not require or include the realvu adapter.  instead checking for and using the variables directly
  • Loading branch information
SuprPhatAnon authored and dluxemburg committed Jul 17, 2018
1 parent 294cd93 commit f927875
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion modules/somoaudienceBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,34 @@ export const spec = {

buildRequests: function(bidRequests) {
return bidRequests.map(bidRequest => {
let da = openRtbRequest(bidRequest);
if (window.top1 && window.top1.realvu_aa) {
let a = window.top1.realvu_aa.check({
unit_id: bidRequest.adUnitCode,
size: bidRequest.sizes,
partner_id: 'E321'
});
a.rq_bids.push({
bidder: bidRequest.bidder,
adId: bidRequest.bidId,
partner_id: 'E321'
});
if (a.riff == 'yes') {
da.imp[0].pmp = {
private_auction: 0,
deals: [
{
id: 'realvu',
bidfloor: 1.5
}
]
};
}
}
return {
method: 'POST',
url: '//publisher-east.mobileadtrading.com/rtb/bid?s=' + bidRequest.params.placementId.toString(),
data: openRtbRequest(bidRequest),
data: da,
bidRequest: bidRequest
};
});
Expand Down

0 comments on commit f927875

Please sign in to comment.