Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Modify Sonobi adapter to take an App Nexus targeting param #3

Merged
merged 1 commit into from
Jan 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/dist/prebid.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion modules/sonobiBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ var SonobiAdapter = function SonobiAdapter() {
var adSlots = request.bids || [];
var bidderRequestId = request.bidderRequestId;
var ref = '&ref=' + encodeURI(utils.getTopWindowLocation().host);
adloader.loadScript(trinity + JSON.stringify(_keymaker(adSlots)) + '&cv=' + _operator(bidderRequestId) + ref);
const appNexusTargeting =
adSlots[0] && adSlots[0].params && adSlots[0].params.appNexusTargeting ? '&gmgt=' + encodeURI(adSlots[0].params.appNexusTargeting) : '';
adloader.loadScript(trinity + JSON.stringify(_keymaker(adSlots)) + '&cv=' + _operator(bidderRequestId) + ref + appNexusTargeting);
}

function _keymaker(adSlots) {
Expand Down