Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audigent RTD configurable per-bidder segment mappings #5903

Merged
merged 26 commits into from
Nov 16, 2020
Merged
Show file tree
Hide file tree
Changes from 22 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<html>
<head>
<script>

(function(window, document) {
if (!window.__cmp) {
window.__cmp = (function() {
Expand Down Expand Up @@ -90,11 +91,9 @@
},
bids: [
{
bidder: 'rubicon',
bidder: 'appnexus',
params: {
accountId: '1001',
siteId: '113932',
zoneId: '535510'
placementId: 13144370
}
}
]
Expand All @@ -108,11 +107,25 @@

<script>
var googletag = googletag || {};
var testAuctionDelay = 1000;
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

var bidSegmentMappers = {
appnexus: function(bid, segments) {
if (!bid.params) {
bid.params = {}
}
if (!bid.params.user) {
bid.params.user = {}
}

bid.params.user.segments = segments;
}
}

pbjs.que.push(function() {
pbjs.setConfig({
debug: true,
Expand Down Expand Up @@ -232,17 +245,33 @@
auctionDelay: 1000
},
realTimeData: {
auctionDelay: 1000,
dataProviders: [{name: "audigent", waitForIt: true}]
auctionDelay: testAuctionDelay, // lower in real scenario to meet publisher spec
dataProviders: [
{
name: "halo",
waitForIt: true,
params: {
mapSegments: {
appnexus: true
},
segmentCache: false,
requestParams: {
publisherId: 0
}
}

}
]
}
});
pbjs.addAdUnits(adUnits);

pbjs.requestBids({bidsBackHandler: sendAdserverRequest});
});

function sendAdserverRequest() {
document.getElementById('tdid').innerHTML = adUnits[0].bids[0].userId['tdid'];
antlauzon marked this conversation as resolved.
Show resolved Hide resolved
document.getElementById('audigent_segments').innerHTML = JSON.stringify(adUnits[0].bids[0].audigent_segments);
document.getElementById('audigent_segments').innerHTML = JSON.stringify(adUnits[0].bids[0].params.user.segments);

if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
Expand Down Expand Up @@ -294,7 +323,7 @@ <h2>Audigent Segments Prebid</h2>
<div id='tdid'>
</div>

Audigent Segments:
Audigent Segments (Appnexus):
<div id='audigent_segments'>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion modules/.submodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
"rtdModule": [
"browsiRtdProvider",
"audigentRtdProvider",
"haloRtdProvider",
"jwplayerRtdProvider",
"reconciliationRtdProvider"
]
Expand Down
145 changes: 0 additions & 145 deletions modules/audigentRtdProvider.js

This file was deleted.

76 changes: 0 additions & 76 deletions modules/audigentRtdProvider.md

This file was deleted.

Loading