Skip to content

Commit

Permalink
Update rubicon analytics adapter with wrapper name (#3990)
Browse files Browse the repository at this point in the history
* Add microadBidAdapter

* Remove unnecessary encodeURIComponent from microadBidAdapter

* Submit Advangelists Prebid Adapter

* Submit Advangelists Prebid Adapter 1.1

* Correct procudtion endpoint for prebid

* analytics update with wrapper name

* changed to only send wrapperName with event when it has a value

* changed wrapperName to use value from config 'rubicon.wrapperName'

* update tests for wrapperName

* update wrapperName as let for consistency

* updated wrapperName from let to const
  • Loading branch information
Isaac Dettman authored and harpere committed Jul 23, 2019
1 parent 05cf0d2 commit c2bdb94
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions modules/rubiconAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ function sendMessage(auctionId, bidWonId) {
version: '$prebid.version$',
referrerUri: referrer
};
const wrapperName = config.getConfig('rubicon.wrapperName');
if (wrapperName) {
message.wrapperName = wrapperName;
}
let auctionCache = cache.auctions[auctionId];
if (auctionCache && !auctionCache.sent) {
let adUnitMap = Object.keys(auctionCache.bids).reduce((adUnits, bidId) => {
Expand Down
6 changes: 5 additions & 1 deletion test/spec/modules/rubiconAnalyticsAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ const ANALYTICS_MESSAGE = {
},
'bidwonStatus': 'success'
}
]
],
'wrapperName': '10000_fakewrapper_test'
};

function performStandardAuction() {
Expand Down Expand Up @@ -492,6 +493,9 @@ describe('rubicon analytics adapter', function () {
s2sConfig: {
timeout: 1000,
accountId: 10000,
},
rubicon: {
wrapperName: '10000_fakewrapper_test'
}
})
});
Expand Down
3 changes: 3 additions & 0 deletions test/spec/modules/rubiconAnalyticsSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@
}
]
}
},
"wrapperName": {
"type": "string"
}
},
"definitions": {
Expand Down

0 comments on commit c2bdb94

Please sign in to comment.