Skip to content

Commit

Permalink
Merge branch 'master' into NoBid-Version-1.2.4
Browse files Browse the repository at this point in the history
* master: (49 commits)
  Submitting Clicktripz bid adapter (prebid#4929)
  add UNICORN bid adapter (prebid#4917)
  3.12.0-pre
  3.11.0 release
  Eids liveintent ext fix (prebid#4944)
  add mediaforce bid adapter (prebid#4933)
  update logic in adpod module for playersize (prebid#4953)
  Module - Size Mapping V2 (prebid#4690)
  Lifestreet adapter 3.0 (prebid#4927)
  IX Adapter - Increase banner TTL to 300s (prebid#4957)
  assert string returned not that we break things (prebid#4962)
  added option to url parser to ignore decoding entire url (prebid#4938)
  adding user-id support in medianet adapter (prebid#4925)
  removing the log (prebid#4960)
  add import extensions (prebid#4959)
  Add 7xbid adapter to compatible with prebid 3.0 (prebid#4908)
  Fix failing code-coverage command (prebid#4892)
  enable no-console eslint rule for project (prebid#4802)
  update audigent tests to fix larger test suite issue (prebid#4952)
  use bidId or bidIds in the payload (prebid#4903)
  ...
  • Loading branch information
redaguermas committed Mar 13, 2020
2 parents 6e618f3 + 36fab76 commit 031ebf1
Show file tree
Hide file tree
Showing 132 changed files with 16,480 additions and 554 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = {
"no-throw-literal": "off",
"no-undef": 2,
"no-useless-escape": "off",
"no-console": "error"
},
"overrides": Object.keys(allowedModules).map((key) => ({
"files": key + "/**/*.js",
Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function viewCoverage(done) {

connect.server({
port: coveragePort,
root: 'build/coverage/karma_html',
root: 'build/coverage/lcov-report',
livereload: false
});
opens('http://' + mylocalhost + ':' + coveragePort);
Expand Down Expand Up @@ -328,7 +328,7 @@ function setupE2e(done) {

gulp.task('updatepath', function(){
return gulp.src(['build/dist/*.js'])
.pipe(replace('ib.adnxs.com/ut/v3/prebid', host + ':' + mockServerPort + '/'))
.pipe(replace('https://ib.adnxs.com/ut/v3/prebid', 'http://' + host + ':' + mockServerPort + '/'))
.pipe(gulp.dest('build/dist'));
});

Expand Down
262 changes: 262 additions & 0 deletions integrationExamples/gpt/audigentSegments_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
<html>
<head>
<script>
(function(window, document) {
if (!window.__cmp) {
window.__cmp = (function() {
var listen = window.attachEvent || window.addEventListener;
listen('message', function(event) {
window.__cmp.receiveMessage(event);
}, false);

function addLocatorFrame() {
if (!window.frames['__cmpLocator']) {
if (document.body) {
var frame = document.createElement('iframe');
frame.style.display = 'none';
frame.name = '__cmpLocator';
document.body.appendChild(frame);
} else {
setTimeout(addLocatorFrame, 5);
}
}
}
addLocatorFrame();

var commandQueue = [];
var cmp = function(command, parameter, callback) {
if (command === 'ping') {
if (callback) {
callback({
gdprAppliesGlobally: !!(window.__cmp && window.__cmp.config && window.__cmp.config.storeConsentGlobally),
cmpLoaded: false
});
}
} else {
commandQueue.push({
command: command,
parameter: parameter,
callback: callback
});
}
};
cmp.commandQueue = commandQueue;
cmp.receiveMessage = function(event) {
var data = event && event.data && event.data.__cmpCall;
if (data) {
commandQueue.push({
callId: data.callId,
command: data.command,
parameter: data.parameter,
event: event
});
}
};
cmp.config = {
//
// Modify config values here
//
// globalVendorListLocation: 'https://vendorlist.consensu.org/vendorlist.json',
// customPurposeListLocation: './purposes.json',
// globalConsentLocation: './portal.html',
// storeConsentGlobally: false,
// storePublisherData: false,
logging: 'debug'//,
// localization: {},
// forceLocale: 'en-us'
};
return cmp;
}());
var t = document.createElement('script');
t.async = false;
t.src = 'http://acdn.adnxs.com/cmp/cmp.bundle.js';
var tag = document.getElementsByTagName('head')[0];
tag.appendChild(t);
}
})(window, document);
// window.__cmp('showConsentTool');
</script>

<script>
var FAILSAFE_TIMEOUT = 2000;

var adUnits = [
{
code: 'test-div',
mediaTypes: {
banner: {
sizes: [[300,250],[300,600],[728,90]]
}
},

bids: [
{
bidder: 'rubicon',
params: {
accountId: '1001',
siteId: '113932',
zoneId: '535510'
}
}
]
}
];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
</script>
<script src="../../build/dev/prebid.js" async></script>

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

pbjs.que.push(function() {
pbjs.setConfig({
debug: true,
consentManagement: {
cmpApi: 'iab',
timeout: 1000,
allowAuctionWithoutConsent: true
},
// consentManagement: {
// cmpApi: 'static',
// consentData: {
// consentString: 'BOEFEAyOEFEAyAHABDENAI4AAAB9vABAASA'
// vendorData: {
// purposeConsents: {
// '1': true
// }
// }
// }
// },
usersync: {
userIds: [{
name: "unifiedId",
params: {
partner: "prebid",
url: "http://match.adsrvr.org/track/rid?ttd_pid=prebid&fmt=json"
},
storage: {
type: "html5",
name: "unifiedid",
expires: 30
},
}, {
name: "id5Id",
params: {
partner: 173 //Set your real ID5 partner ID here for production, please ask for one at http://id5.io/prebid
},
storage: {
type: "cookie",
name: "id5id",
expires: 90,
refreshInSeconds: 8*3600 // Refresh frequency of cookies, defaulting to 'expires'
},

}, {
name: "parrableId",
params: {
// change to Parrable Partner Client ID(s) you received from the Parrable Partners you are using
partner: '30182847-e426-4ff9-b2b5-9ca1324ea09b'
},
storage: {
type: "cookie",
name: "_parrable_eid", // create a cookie with this name
expires: 365 // cookie can last for a year
}
}, {
name: "pubCommonId",
storage: {
type: "cookie",
name: "pubcid",
expires: 365
},
// value: {
// foo: '9879878907987',
// bar:'93939'
// }
}, {
name: 'identityLink',
params: {
pid: '14' // Set your real identityLink placement ID here
},
storage: {
type: 'cookie',
name: 'idl_env',
expires: 30
}
}],
syncDelay: 5000,
auctionDelay: 1000
},
realTimeData: {
auctionDelay: 1000,
dataProviders: [{name: "audigent"}]
}
});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({bidsBackHandler: sendAdserverRequest});
});

function sendAdserverRequest() {
document.getElementById('tdid').innerHTML = adUnits[0].bids[0].userId['tdid'];
document.getElementById('audigent_segments').innerHTML = JSON.stringify(adUnits[0].bids[0].realTimeData.audigent_segments);

if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}

setTimeout(function() {
sendAdserverRequest();
}, FAILSAFE_TIMEOUT);
</script>

<script>
(function () {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>

<script>
googletag.cmd.push(function() {
googletag.defineSlot('/112115922/FL_PB_MedRect', [[300, 250],[300,600]], 'test-div').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>

<body>
<h2>Audigent Segments Prebid</h2>

<div id='test-div'>
<script>
googletag.cmd.push(function() { googletag.display('test-div'); });
</script>
</div>
TDID:
<div id='tdid'>
</div>

Audigent Segments:
<div id='audigent_segments'>
</div>
</body>
</html>
Loading

0 comments on commit 031ebf1

Please sign in to comment.