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

Update prebid ver to 5.20.0 #5

Merged
merged 115 commits into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
f4ac2ff
Increment pre version
Sep 29, 2021
fe9d68d
Yieldmo Bid Adapter: add shared id support and cleaned up device.ip (…
ym-abaranov Sep 29, 2021
84d5650
Slimcut Bid Adapter: porting from 4.x with adomain (#7514)
bretg Sep 30, 2021
a696789
Nativo Bid Adapter: update to adUnit param usage (#7517)
jsfledd Sep 30, 2021
6d4daa4
PubLink id system adds params for site id and api key (#7515)
pycnvr Sep 30, 2021
34c189d
Gumgum Bid Adapter: use nearest matching h/w dimensions from bid requ…
lbenmore Sep 30, 2021
60a12e0
Pubmatic Bid Adapter: add support for JW player (#7450)
pm-manasi-moghe Sep 30, 2021
9ba6750
fix(vidoomyBidAdapter): macro replacement and gdprConsent null fix (#…
SasanFarrokh Sep 30, 2021
0ee71d2
Relaido Bid Adapter: support imuid module (#7422)
relaido Sep 30, 2021
d7fc1a7
Revert "Relaido Bid Adapter: support imuid module (#7422)" (#7520)
ChrisHuie Sep 30, 2021
cd53743
Relaido Bid Adapter: support imuid (with utils fix after revert) (#7521)
ChrisHuie Sep 30, 2021
7e558a5
Mytarget Bid Adapter : update adapter to comply with Prebid 5 (#7397)
Denislavrov Sep 30, 2021
80bc6e2
IAS RTD adapter: improve workflow (#7431)
raguilar-ias Sep 30, 2021
68b21be
Mediakeys bid adapter: native and video support (#7452)
Oct 1, 2021
35c1db8
Prebid Core: Support for Devcontainer for VSCode, Docker Desktop, Cod…
GLStephen Oct 1, 2021
c6e74d2
Ats Analytics Adapter: handle preflight request error & increase _lr…
mamatic Oct 4, 2021
f62ad03
SpotX: add support for price floors module (#7481)
agdillon Oct 4, 2021
3d606de
tappxBidAdapter: fix wrong params (#7528)
prebidtappx Oct 4, 2021
20e0c44
TheMediaGridNM: Fix bug with wrong vastUrl (#7530)
TheMediaGrid Oct 4, 2021
d15d519
sspBC Bid Adaptor : add native support, instream video support, & tes…
wojciech-bialy-wpm Oct 4, 2021
e543638
TrustX Bid Adapter: added vastUrl support (#7531)
PWyrembak Oct 4, 2021
41be379
SSpBc Bid Adapter: utils import fix (#7532)
ChrisHuie Oct 4, 2021
bc95618
Update glimpse adapter and test spec (#7476)
samueldobbie Oct 5, 2021
73615a3
fix(vidoomyBidAdapter): ensure cookie sync is triggered once (#7534)
SasanFarrokh Oct 5, 2021
ae55944
Sharethrough Bid Adapter: bugfixes, removed unused methods, and one H…
epechuzal Oct 5, 2021
846bc8d
Kargo Bid Adapter: Support video mediaType (#7428)
jsadwith Oct 6, 2021
718c94c
Adkernel Bid Adapter: add ergadx alias (#7544)
ckbo3hrk Oct 6, 2021
22ca1d8
Support Spread Operator for spec files (#7542)
osazos Oct 6, 2021
1acfbe3
NoBid Bid Adapter: add support for config.ortb2 (#7503)
redaguermas Oct 6, 2021
c2c9676
Nextroll Bid Adapter: update to comply with Prebid 5 (#7465)
abijr Oct 6, 2021
c223cdf
Adnuntius Bidder: Deal ID and domain change (#7540)
mikael-lundin Oct 6, 2021
b171f56
Prebid 5.17.0 Release
smenzer Oct 6, 2021
15c57b9
Increment pre version
smenzer Oct 6, 2021
893299a
Unicorn Bid Adapter: fix bid_request cur and site.publisher.id to com…
faithnh Oct 6, 2021
630b24e
Cwire bid adapter: initial release (#7421)
kodi Oct 7, 2021
88bbec1
PubMatic Bid Adapter: fix a typo in outstreamAU param name docs (#7547)
pm-harshad-mane Oct 7, 2021
9c35483
Ad Generation: adding new format and adomain support (#7533)
banakemi Oct 7, 2021
6d8a146
Ogury Bid Adapter: adding onTimeout support (#7535)
mbouallagui Oct 8, 2021
2e83adc
Dgkeeword RTD: add content type to request (#7550)
mediaconsortium-develop Oct 8, 2021
f72e63f
VIS.X: iframe sync support & optional video params (#7527)
mk0x9 Oct 9, 2021
a9e1060
Talkads Bid Adapter: add new bid adapter (#7546)
natexo-technical-team Oct 12, 2021
7123eae
Pubmatic Bid Adapter: video.placement param missing message in debug …
kapil-tuptewar Oct 12, 2021
b2fe194
replace Array.from function and use from core-js (#7562)
FilipStamenkovic Oct 12, 2021
b14589b
Adkernel Bid Adapter: add turktelekom alias (#7559)
ckbo3hrk Oct 12, 2021
74cd51a
Yahoo SSP Bid Adapter: Initial Release (#7522)
adam-browning Oct 12, 2021
9d9621d
Support yahoo.com eid source value (#7563)
slimkrazy Oct 12, 2021
e54ec61
Ogury Bid Adapter: Handle TTD as a new source (#7558)
AurelienMozoo Oct 12, 2021
424d9a0
Yieldlab Adapter: add support for iab content (#7413)
rey1128 Oct 12, 2021
a5ffc7f
Proxistore Bid Adapter: export vendor id in gvlid (#7553)
vincentproxistore Oct 12, 2021
e60d065
Yieldlab Bid Adapter: fix for utils root no longer (#7568)
ChrisHuie Oct 12, 2021
60672a5
Livewrapper Analytics Adapter: prioritize reporting Livewrapped floor…
bjorn-lw Oct 12, 2021
cf2395e
BLIINK Bid Adapter : Add new format, outstream, banner (#7529)
Kola-Kola Oct 13, 2021
c514d20
Nativo Bid Adapter : refresh increment logic change (#7569)
jsfledd Oct 13, 2021
719523b
add docReferrer (#7551)
AdmixerTech Oct 13, 2021
b8a7ee4
Yahoo SSP Bid Adapter: fix for adId (#7571)
adam-browning Oct 13, 2021
e20c46f
adding page URL to bid request (#7581)
mbouallagui Oct 14, 2021
8cb2250
Pixfuture Bid Adapter: updated the getUserSyncs method (#7456)
pixfuture-media Oct 14, 2021
7b6aad6
delete rogue yarn.lock (#7572)
ChrisHuie Oct 14, 2021
9ad4b84
Prebid Server Adapter: fix eid permissions for ie11 (#7583)
patmmccann Oct 14, 2021
8c62165
Prebid 5.18.0 Release
robertrmartinez Oct 14, 2021
0bbea5e
Increment pre version
robertrmartinez Oct 14, 2021
ff18876
Codefuel Bid Adapter: add new bid adapter (#7489)
tamirnPerion Oct 14, 2021
a8461eb
VideoByte Bid Adapter: added new params placementid & nid (#7578)
videobyte20 Oct 15, 2021
c5efe4c
InskinBidAdapter: add schain object from the schain module if used by…
cciocov Oct 15, 2021
38b9816
Yahoo user identity module - connectId: initial release (#7519)
slimkrazy Oct 15, 2021
0e50635
new BIDDER_ERROR event and new onBidderError function called when aja…
fasenderos Oct 18, 2021
7123fa2
Limelight Digital Bid Adapter: Add user sync (#7560)
imedvedko Oct 18, 2021
c225b87
OpenX Bid Adapter: Handle site.content.data & bug fixes (#7576)
luigi-sayson Oct 18, 2021
e59a314
Prebid Core: use gptSlot.updateTargetingFromMap than gptSlot.setTarge…
pm-harshad-mane Oct 18, 2021
92ba116
Triplelift Bid Adapter: Additional eid filtering and checks (#7565)
nllerandi3lift Oct 18, 2021
8fed466
Adding akamaiDapRtdProvider module (#7508)
amishra11j Oct 18, 2021
a68796a
PBJS IX adapter should signal 1PA (#7596)
shahinrahbariasl Oct 19, 2021
6895104
BetweenBidAdapter: add video support (#7594)
anastasya123 Oct 19, 2021
92b4367
Undertone Bid Adapter: add schain support (#7590)
tamarm-perion Oct 19, 2021
9b063c7
Support adomain (#7579)
mikomgk Oct 19, 2021
7dba619
Ogury Bid Adapter: use utils functions to get ad content (#7573)
AurelienMozoo Oct 19, 2021
ce28fe4
Adf adapter: new bidder params added, multiformat bids supported (#7570)
braizhas Oct 19, 2021
10f52a0
Publink Id System(Conversant) add support for nonjson cookie (#7575)
johnwier Oct 19, 2021
a32b39b
Add streamkey (#7580)
GeneGenie Oct 19, 2021
12a6c7f
Yieldmo Synthetic Inventory Module: add new module (#7537)
ym-abaranov Oct 20, 2021
f1c5abd
Prebid Core: native puc multiple events fix (#7543)
FilipStamenkovic Oct 20, 2021
f874aa4
Collect AD_RENDER_FAILED events (#7591)
bjorn-lw Oct 20, 2021
1693ed0
NextMillennium Bid Adapter: add gdpr support (#7593)
Oct 20, 2021
26599cf
DeepIntent Bid Adapter: instream video support added (#7494)
sourabhg Oct 20, 2021
fdfe85e
Gumgum Bid Adapter: add local time and timezone offset in requests (#…
lbenmore Oct 20, 2021
4ecaeb0
Prebid 5.19.0 Release
Oct 20, 2021
8ebafdc
Increment pre version
Oct 20, 2021
191a3cb
Ventes Bid Adapter: add new bid adapter (#7525)
jessoventes Oct 20, 2021
2a4f678
Jixiee Bid Adapter: add code to try get keywords from the page meta (…
jxdeveloper1 Oct 20, 2021
d61717b
multibid module: Use array instead of string template to allow . in a…
wallacebt Oct 21, 2021
a5282aa
Sortable Bid Adapter: Set gpid (#7608)
liliana-sortable Oct 21, 2021
1cd4eba
Teads adapter: global placement id support (#7588)
github-kylian-deau Oct 21, 2021
ba0b9e5
TheMediaGrid Bid Adapter: add playwire as alias (#7603)
TheMediaGrid Oct 21, 2021
7e67bbc
Update nativoBidAdapter.js
patmmccann Oct 22, 2021
9e6b054
Remove duplicate segment handling (#7622)
luigi-sayson Oct 22, 2021
2c0f9f7
appnexus bid adapter - update impression urls logic (#7618)
jsnellbaker Oct 25, 2021
efb81c1
Send info about original CPM bid (#7623)
bjorn-lw Oct 25, 2021
6729f8f
Ats Analytics Adapter: listen to bid won events (#7577)
mamatic Oct 25, 2021
be35c1c
Nativo Bid Adapter - Refactored spread adapter for IE11 support (#7625)
jsfledd Oct 25, 2021
aee5039
support eids in outbrain (#7567)
Oct 25, 2021
f54ccec
Send ortb2 object to sonobi bidding endpoint as fpd param (#7612)
JonGoSonobi Oct 25, 2021
4dc1a22
support for adserverTargeting in response (#7605)
nwlosinski Oct 25, 2021
df13627
Between Bid Adapter & Airgrid rtd module: fix support for ie11 (#7619)
patmmccann Oct 26, 2021
6c14892
Yahoo Bid Adapter: Support IE11 -> includes to indexOf (#7627)
robertrmartinez Oct 26, 2021
523a16c
TrustX Bid Adapter: fix for segments format (#7629)
PWyrembak Oct 26, 2021
d0605ae
Delta Projects bid adapter: add new bid adapter (#7564)
rikdru Oct 26, 2021
d4a5739
operaads bid adapter: register user sync function (#7613)
yuansi-piao Oct 26, 2021
7e4a7d6
clean.io RTD Provider (#7449)
nick-clean Oct 26, 2021
43e6aba
Added sizeId 92 (#7631)
hdeodhar Oct 26, 2021
36200d8
Browi RTD provider: code improvements (#7589)
omerDotan Oct 26, 2021
8203cc8
Revert "Added sizeId 92 (#7631)" (#7635)
bretg Oct 27, 2021
e38772a
move dfp_ad_unit_code to imp.ext (#7637)
umakajan Oct 27, 2021
213ef75
Prebid Core: Fix Media Type Price Granularity (#7607)
robertrmartinez Oct 27, 2021
55b9cfa
OTM Bid Adapter: Restore Adapter to pbjs 5 (#7616)
krecu Oct 27, 2021
d8697b3
Prebid 5.20.0 release
ChrisHuie Oct 27, 2021
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
11 changes: 11 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ARG VARIANT="12"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list
RUN apt update
RUN apt install -y google-chrome-stable xvfb
27 changes: 27 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/main/containers/javascript-node
{
"name": "Ubuntu",

"build": {
"dockerfile": "Dockerfile",
"args": { "VARIANT": "12" }
},

"postCreateCommand": "bash .devcontainer/postCreate.sh",

// Set *default* container specific settings.json values on container create.
"settings": {},


// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"nickdodd79.gulptasks"
],

// 9999 is web server, 9876 is karma
"forwardPorts": [9876, 9999],

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}
6 changes: 6 additions & 0 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
echo "Post Create Starting"

nvm install
nvm use
npm install gulp-cli -g
npm ci
1 change: 1 addition & 0 deletions browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,5 @@
"device": null,
"os": "OS X"
}

}
132 changes: 132 additions & 0 deletions integrationExamples/gpt/akamaidap_segments_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<html>
<head>
<script async src="../../build/dev/prebid.js"></script>
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script>
var FAILSAFE_TIMEOUT = 3300;
var PREBID_TIMEOUT = 2000;

var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
mediaTypes: {
banner: {
sizes: [[300, 250], [300,600]],
}
},
// Replace this object to test a new Adapter!
bids: [
{
bidder: 'appnexus',
params: {
placementId: 13144370
}
},
{
bidder: 'sovrn',
params: {
tagid: 1
}
}
]

}];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

</script>

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

pbjs.que.push(function() {
pbjs.setConfig({
debug: true,
ortb2: {
user: {
data: [
// DAP segment taxonomy inserted here
]
},
site: {
ext: {
data: {
// DAP SAID will be inserted here
}
}
},
imp: {
ext: {
data: {
// DAP SAID will be inserted here
}
}
}
},
realTimeData: {
dataProviders: [
{
name: "dap",
waitForIt: true,
params: {
apiHostname: "prebid.dap.akadns.net",
apiVersion: "x1",
domain: "prebid.org",
identityType: "dap-signature:1.0.0",
segtax: 503,
tokenTtl: 5,
}
}
]
}
});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest,
timeout: PREBID_TIMEOUT
});
});

function sendAdserverRequest() {
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>
googletag.cmd.push(function () {
googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>

<script>!function(a){var e="https://s.go-mpulse.net/boomerang/",t="addEventListener";if("False"=="True")a.BOOMR_config=a.BOOMR_config||{},a.BOOMR_config.PageParams=a.BOOMR_config.PageParams||{},a.BOOMR_config.PageParams.pci=!0,e="https://s2.go-mpulse.net/boomerang/";if(window.BOOMR_API_key="5G3ZS-8L7PG-U23WM-5CA4K-LQ3YP",function(){function n(e){a.BOOMR_onload=e&&e.timeStamp||(new Date).getTime()}if(!a.BOOMR||!a.BOOMR.version&&!a.BOOMR.snippetExecuted){a.BOOMR=a.BOOMR||{},a.BOOMR.snippetExecuted=!0;var i,_,o,r=document.createElement("iframe");if(a[t])a[t]("load",n,!1);else if(a.attachEvent)a.attachEvent("onload",n);r.src="javascript:void(0)",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="width:0;height:0;border:0;display:none;",o=document.getElementsByTagName("script")[0],o.parentNode.insertBefore(r,o);try{_=r.contentWindow.document}catch(O){i=document.domain,r.src="javascript:var d=document.open();d.domain='"+i+"';void(0);",_=r.contentWindow.document}_.open()._l=function(){var a=this.createElement("script");if(i)this.domain=i;a.id="boomr-if-as",a.src=e+"5G3ZS-8L7PG-U23WM-5CA4K-LQ3YP",BOOMR_lstart=(new Date).getTime(),this.body.appendChild(a)},_.write("<bo"+'dy onload="document._l();">'),_.close()}}(),"".length>0)if(a&&"performance"in a&&a.performance&&"function"==typeof a.performance.setResourceTimingBufferSize)a.performance.setResourceTimingBufferSize();!function(){if(BOOMR=a.BOOMR||{},BOOMR.plugins=BOOMR.plugins||{},!BOOMR.plugins.AK){var e=""=="true"?1:0,t="",n="ghh4w4yxem66iyi6ijxa-f-a8f1ed317-clientnsv4-s.akamaihd.net",i="false"=="true"?2:1,_={"ak.v":"32","ak.cp":"540505","ak.ai":parseInt("351538",10),"ak.ol":"0","ak.cr":17,"ak.ipv":4,"ak.proto":"http/1.1","ak.rid":"322de403","ak.r":36326,"ak.a2":e,"ak.m":"dscx","ak.n":"essl","ak.bpcip":"49.207.203.0","ak.cport":5172,"ak.gh":"23.47.149.85","ak.quicv":"","ak.tlsv":"tls1.2","ak.0rtt":"","ak.csrc":"-","ak.acc":"bbr","ak.t":"1629373038","ak.ak":"hOBiQwZUYzCg5VSAfCLimQ==admFPBlxVf0VKeanKFKUThzq+or23aIaVFP5DBXpeOGEuvD5mQz0UZbvK242Y8cupS91bsNaM7uJT3/O00EszGTxlFhkv439YkTWfyegvqVlJhcrZ7jcRkIoyrmjoBqDZoF0WaG4rhwmNzkKEv6T1noRYwEWwRHOG8p7osPXWy5as6KkmhOYUiYk8S5hQj+HFzhYI5YUTx+8urmHdpVIDBkramcrT2V89mb0cH5L2bSGS2hahAA3Kkf+0Dul7r5hDFQaVTf17e4oKdM1G8cKVF5LGRxRl3v4Rn6tBJ+fjrJ7XYQWV30w1LPwcAmSfRX8iTCK4xzHwG1fwDFHb5tWVsxHeEkRgNN3/KhnrCjxKtaROjJeWypJf/rjn1HWHwy7uVVsP9f/HRN3drCCkEvJBmu6yi0jzFFCoeEkbUEoq+8=","ak.pv":"396","ak.dpoabenc":"","ak.tf":i};if(""!==t)_["ak.ruds"]=t;var o={i:!1,av:function(e){var t="http.initiator";if(e&&(!e[t]||"spa_hard"===e[t]))_["ak.feo"]=void 0!==a.aFeoApplied?1:0,BOOMR.addVar(_)},rv:function(){var a=["ak.bpcip","ak.cport","ak.cr","ak.csrc","ak.gh","ak.ipv","ak.m","ak.n","ak.ol","ak.proto","ak.quicv","ak.tlsv","ak.0rtt","ak.r","ak.acc","ak.t","ak.tf"];BOOMR.removeVar(a)}};BOOMR.plugins.AK={akVars:_,akDNSPreFetchDomain:n,init:function(){if(!o.i){var a=BOOMR.subscribe;a("before_beacon",o.av,null,null),a("onbeacon",o.rv,null,null),o.i=!0}return this},is_complete:function(){return!0}}}}()}(window);</script></head>

<body>
<h2>Prebid.js Test</h2>
<h5>Div-1</h5>
<div id='div-gpt-ad-1460505748561-0'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1460505748561-0'); });
</script>
</div>
<h5>Segments Sent to Bidding Adapter</h5>
<div id="user-segments"></div>
</body>
</html>
1 change: 1 addition & 0 deletions modules/.submodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"akamaiDAPIdSystem",
"amxIdSystem",
"britepoolIdSystem",
"connectIdSystem",
"criteoIdSystem",
"deepintentDpesIdSystem",
"dmdIdSystem",
Expand Down
37 changes: 21 additions & 16 deletions modules/adfBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ export const spec = {
aliases: BIDDER_ALIAS,
gvlid: GVLID,
supportedMediaTypes: [ NATIVE, BANNER, VIDEO ],
isBidRequestValid: bid => !!bid.params.mid,
isBidRequestValid: (bid) => {
const params = bid.params || {};
const { mid, inv, mname } = params;
return !!(mid || (inv && mname));
},
buildRequests: (validBidRequests, bidderRequest) => {
let app, site;

Expand Down Expand Up @@ -104,12 +108,19 @@ export const spec = {
}) : {};
const bidfloor = floorInfo.floor;
const bidfloorcur = floorInfo.currency;
const { mid, inv, mname } = bid.params;

const imp = {
id: id + 1,
tagid: bid.params.mid,
tagid: mid,
bidfloor,
bidfloorcur
bidfloorcur,
ext: {
bidder: {
inv,
mname
}
}
};

const assets = _map(bid.nativeParams, (bidParams, key) => {
Expand Down Expand Up @@ -153,9 +164,6 @@ export const spec = {
assets
}
};

bid.mediaType = NATIVE;
return imp;
}

const bannerParams = deepAccess(bid, 'mediaTypes.banner');
Expand All @@ -172,18 +180,14 @@ export const spec = {
imp.banner = {
format
};
bid.mediaType = BANNER;

return imp;
}

const videoParams = deepAccess(bid, 'mediaTypes.video');
if (videoParams) {
imp.video = videoParams;
bid.mediaType = VIDEO;

return imp;
}

return imp;
});

const request = {
Expand Down Expand Up @@ -243,30 +247,31 @@ export const spec = {
return bids.map((bid, id) => {
const bidResponse = bidResponses[id];
if (bidResponse) {
const mediaType = deepAccess(bidResponse, 'ext.prebid.type');
const result = {
requestId: bid.bidId,
cpm: bidResponse.price,
creativeId: bidResponse.crid,
ttl: 360,
netRevenue: bid.netRevenue === 'net',
currency: cur,
mediaType: bid.mediaType,
mediaType,
width: bidResponse.w,
height: bidResponse.h,
dealId: bidResponse.dealid,
meta: {
mediaType: bid.mediaType,
mediaType,
advertiserDomains: bidResponse.adomain
}
};

if (bidResponse.native) {
result.native = parseNative(bidResponse);
} else {
result[ bid.mediaType === VIDEO ? 'vastXml' : 'ad' ] = bidResponse.adm;
result[ mediaType === VIDEO ? 'vastXml' : 'ad' ] = bidResponse.adm;
}

if (!bid.renderer && bid.mediaType === VIDEO && deepAccess(bid, 'mediaTypes.video.context') === 'outstream') {
if (!bid.renderer && mediaType === VIDEO && deepAccess(bid, 'mediaTypes.video.context') === 'outstream') {
result.renderer = Renderer.install({id: bid.bidId, url: OUTSTREAM_RENDERER_URL, adUnitCode: bid.adUnitCode});
result.renderer.setRender(renderer);
}
Expand Down
32 changes: 28 additions & 4 deletions modules/adgenerationBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { tryAppendQueryString, getBidIdParameter } from '../src/utils.js';
import {tryAppendQueryString, getBidIdParameter} from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER, NATIVE} from '../src/mediaTypes.js';
import {config} from '../src/config.js';
Expand All @@ -25,7 +25,7 @@ export const spec = {
* @return ServerRequest Info describing the request to the server.
*/
buildRequests: function (validBidRequests, bidderRequest) {
const ADGENE_PREBID_VERSION = '1.1.0';
const ADGENE_PREBID_VERSION = '1.2.0';
let serverRequests = [];
for (let i = 0, len = validBidRequests.length; i < len; i++) {
const validReq = validBidRequests[i];
Expand Down Expand Up @@ -118,13 +118,25 @@ export const spec = {
function createAd(body, bidRequest) {
let ad = body.ad;
if (body.vastxml && body.vastxml.length > 0) {
ad = `<body><div id="apvad-${bidRequest.bidId}"></div>${createAPVTag()}${insertVASTMethod(bidRequest.bidId, body.vastxml)}</body>`;
if (isUpperBillboard(body)) {
const marginTop = bidRequest.params.marginTop ? bidRequest.params.marginTop : '0';
ad = `<body>${createADGBrowserMTag()}${insertVASTMethodForADGBrowserM(body.vastxml, marginTop)}</body>`;
} else {
ad = `<body><div id="apvad-${bidRequest.bidId}"></div>${createAPVTag()}${insertVASTMethodForAPV(bidRequest.bidId, body.vastxml)}</body>`;
}
}
ad = appendChildToBody(ad, body.beacon);
if (removeWrapper(ad)) return removeWrapper(ad);
return ad;
}

function isUpperBillboard(body) {
if (body.location_params && body.location_params.option && body.location_params.option.ad_type) {
return body.location_params.option.ad_type === 'upper_billboard';
}
return false;
}

function isNative(body) {
if (!body) return false;
return body.native_ad && body.native_ad.assets.length > 0;
Expand Down Expand Up @@ -190,7 +202,12 @@ function createAPVTag() {
return apvScript.outerHTML;
}

function insertVASTMethod(targetId, vastXml) {
function createADGBrowserMTag() {
const ADGBrowserMURL = 'https://i.socdm.com/sdk/js/adg-browser-m.js';
return `<script type="text/javascript" src="${ADGBrowserMURL}"></script>`;
}

function insertVASTMethodForAPV(targetId, vastXml) {
let apvVideoAdParam = {
s: targetId
};
Expand All @@ -200,6 +217,13 @@ function insertVASTMethod(targetId, vastXml) {
return script.outerHTML;
}

function insertVASTMethodForADGBrowserM(vastXml, marginTop) {
const script = document.createElement(`script`);
script.type = 'text/javascript';
script.innerHTML = `window.ADGBrowserM.init({vastXml: '${vastXml.replace(/\r?\n/g, '')}', marginTop: '${marginTop}'});`;
return script.outerHTML;
}

/**
*
* @param ad
Expand Down
4 changes: 3 additions & 1 deletion modules/adkernelBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ export const spec = {
{code: 'adomega'},
{code: 'denakop'},
{code: 'rtbanalytica'},
{code: 'unibots'}
{code: 'unibots'},
{code: 'ergadx'},
{code: 'turktelekom'}
],
supportedMediaTypes: [BANNER, VIDEO, NATIVE],

Expand Down
11 changes: 11 additions & 0 deletions modules/admixerBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,20 @@ export const spec = {
* Make a server request from the list of BidRequests.
*/
buildRequests: function (validRequest, bidderRequest) {
let w;
let docRef;
do {
w = w ? w.parent : window;
try {
docRef = w.document.referrer;
} catch (e) {
break;
}
} while (w !== window.top);
const payload = {
imps: [],
ortb2: config.getConfig('ortb2'),
docReferrer: docRef,
};
let endpointUrl;
if (bidderRequest) {
Expand Down
Loading