prebid.js 7.23.0 → 7.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/admaticBidAdapter.js +1 -0
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/audiencerunBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bluebillywigBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/growthCodeIdSystem.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/impactifyBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -0
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/mgidRtdProvider.js +1 -0
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +122 -119
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pbsExtensions.js +1 -1
- package/dist/permutiveRtdProvider.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/gpt/mgidRtdProvider_example.html +143 -0
- package/modules/.submodules.json +1 -0
- package/modules/admaticBidAdapter.js +147 -0
- package/modules/admaticBidAdapter.md +48 -0
- package/modules/amxBidAdapter.js +1 -0
- package/modules/connectIdSystem.js +36 -23
- package/modules/connectIdSystem.md +3 -2
- package/modules/growthCodeIdSystem.js +9 -5
- package/modules/gumgumBidAdapter.js +4 -0
- package/modules/ixBidAdapter.js +30 -7
- package/modules/kueezRtbBidAdapter.js +278 -0
- package/modules/kueezRtbBidAdapter.md +35 -0
- package/modules/magniteAnalyticsAdapter.js +6 -1
- package/modules/mgidRtdProvider.js +190 -0
- package/modules/mgidRtdProvider.md +51 -0
- package/modules/permutiveRtdProvider.js +2 -1
- package/modules/permutiveRtdProvider.md +36 -1
- package/modules/pubmaticBidAdapter.js +21 -29
- package/modules/tripleliftBidAdapter.js +1 -1
- package/modules/userId/eids.js +3 -10
- package/package.json +8 -8
- package/src/adRendering.js +1 -1
- package/src/adloader.js +1 -0
- package/src/auction.js +1 -1
- package/src/prebid.js +83 -79
- package/test/spec/auctionmanager_spec.js +9 -0
- package/test/spec/modules/admaticBidAdapter_spec.js +46 -0
- package/test/spec/modules/connectIdSystem_spec.js +175 -5
- package/test/spec/modules/eids_spec.js +10 -7
- package/test/spec/modules/ftrackIdSystem_spec.js +34 -22
- package/test/spec/modules/gumgumBidAdapter_spec.js +15 -0
- package/test/spec/modules/ixBidAdapter_spec.js +203 -0
- package/test/spec/modules/kueezRtbBidAdapter_spec.js +396 -0
- package/test/spec/modules/magniteAnalyticsAdapter_spec.js +26 -0
- package/test/spec/modules/mgidRtdProvider_spec.js +366 -0
- package/test/spec/modules/permutiveRtdProvider_spec.js +64 -5
- package/test/spec/modules/tripleliftBidAdapter_spec.js +14 -0
- package/test/spec/unit/pbjs_api_spec.js +17 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.pbjsChunk=self.pbjsChunk||[]).push([[5337],{4192:function(e,t,r){r.d(t,{HQ:function(){return c},Pv:function(){return u},UR:function(){return a}});var n=r(64358),i=r(20265),a={growthCodeId:{getValue:function(e){return e.gc_id},source:"growthcode.io",atype:1,getUidExt:function(e){var t=(0,n.pick)(e,["h1","h2","h3"]);if(Object.keys(t).length)return t}},trustpid:{source:"trustpid.com",atype:1,getValue:function(e){return e}},intentIqId:{source:"intentiq.com",atype:1},naveggId:{source:"navegg.com",atype:1},justId:{source:"justtag.com",atype:1},pubcid:{source:"pubcid.org",atype:1},tdid:{source:"adserver.org",atype:1,getUidExt:function(){return{rtiPartner:"TDID"}}},id5id:{getValue:function(e){return e.uid},source:"id5-sync.com",atype:1,getUidExt:function(e){if(e.ext)return e.ext}},ftrackId:{source:"flashtalking.com",atype:1,getValue:function(e){var t="";return e.DeviceID&&(t=e.DeviceID.join(",")),t},getUidExt:function(e){return"DeviceID"}},parrableId:{source:"parrable.com",atype:1,getValue:function(e){return e.eid?e.eid:e.ccpaOptout?"":null},getUidExt:function(e){var t=(0,n.pick)(e,["ibaOptout","ccpaOptout"]);if(Object.keys(t).length)return t}},idl_env:{source:"liveramp.com",atype:3},lipb:{getValue:function(e){return e.lipbid},source:"liveintent.com",atype:3,getEidExt:function(e){if(Array.isArray(e.segments)&&e.segments.length)return{segments:e.segments}}},britepoolid:{source:"britepool.com",atype:3},dmdId:{source:"hcn.health",atype:3},lotamePanoramaId:{source:"crwdcntrl.net",atype:1},criteoId:{source:"criteo.com",atype:1},merkleId:{atype:3,getSource:function(e){var t;return null!=e&&null!==(t=e.ext)&&void 0!==t&&t.ssp?"".concat(e.ext.ssp,".merkleinc.com"):"merkleinc.com"},getValue:function(e){return e.id},getUidExt:function(e){return e.keyID?{keyID:e.keyID}:e.ext?e.ext:void 0}},netId:{source:"netid.de",atype:1},IDP:{source:"zeotap.com",atype:1},hadronId:{source:"audigent.com",atype:1},quantcastId:{source:"quantcast.com",atype:1},idx:{source:"idx.lat",atype:1},connectid:{source:"verizonmedia.com",atype:3},fabrickId:{source:"neustar.biz",atype:1},mwOpenLinkId:{source:"mediawallahscript.com",atype:1},tapadId:{source:"tapad.com",atype:1},novatiq:{getValue:function(e){return e.snowflake},source:"novatiq.com",atype:1},uid2:{source:"uidapi.com",atype:3,getValue:function(e){return e.id}},deepintentId:{source:"deepintent.com",atype:3},admixerId:{source:"admixer.net",atype:3},adtelligentId:{source:"adtelligent.com",atype:3},amxId:{source:"amxrtb.com",atype:1},publinkId:{source:"epsilon.com",atype:3},kpuid:{source:"kpuid.com",atype:3},imppid:{source:"ppid.intimatemerger.com",atype:1},imuid:{source:"intimatemerger.com",atype:1},connectId:{source:"yahoo.com",atype:3},qid:{source:"adquery.io",atype:1},dacId:{source:"impact-ad.jp",atype:1},"33acrossId":{source:"33across.com",atype:1,getValue:function(e){return e.envelope}},tncid:{source:"thenewco.it",atype:3},gravitompId:{source:"gravito.net",atype:1},cpexId:{source:"czechadid.cz",atype:1},oneKeyData:{getValue:function(e){if(e&&Array.isArray(e.identifiers)&&e.identifiers[0])return e.identifiers[0].value},source:"paf",atype:1,getEidExt:function(e){if(e&&e.preferences)return{preferences:e.preferences}},getUidExt:function(e){if(e&&Array.isArray(e.identifiers)&&e.identifiers[0]){var t=e.identifiers[0];return{version:t.version,type:t.type,source:t.source}}}}};function o(e,t){var r=a[t];if(r&&e){var i={};i.source=(0,n.isFn)(r.getSource)?r.getSource(e):r.source;var o=(0,n.isFn)(r.getValue)?r.getValue(e):e;if((0,n.isStr)(o)){var c={id:o,atype:r.atype};if((0,n.isFn)(r.getUidExt)){var u=r.getUidExt(e);u&&(c.ext=u)}if(i.uids=[c],(0,n.isFn)(r.getEidExt)){var d=r.getEidExt(e);d&&(i.ext=d)}return i}}return null}function c(e){var t=[],r=function(r){if(e.hasOwnProperty(r))if("pubProvidedId"===r)t=t.concat(e.pubProvidedId);else if("ftrackId"===r)t.push({atype:1,ext:e.ftrackId.ext,id:e.ftrackId.uid});else if(Array.isArray(e[r]))e[r].forEach((function(e,n,i){var a=o(e,r);a&&t.push(a)}));else{var n=o(e[r],r);n&&t.push(n)}};for(var n in e)r(n);return t}function u(e){var t=[];return e.filter((function(e){return(0,n.isPlainObject)(e.idObj)&&Object.keys(e.idObj).length})).forEach((function(e){Object.keys(e.idObj).forEach((function(r){(0,i.Z)(e,"config.bidders")&&Array.isArray(e.config.bidders)&&(0,i.Z)(a,r+".source")&&t.push({source:a[r].source,bidders:e.config.bidders})}))})),t}},55511:function(e,t,r){var n=r(71002),i=r(64358),a=r(20265),o=r(96475),c=r(24679),u=r(14699),d=r(35706),s=r(34614),p=r(4192),f="USD",m=300,l=!0,y="https://ads.yieldmo.com/exchange/prebid",v="https://ads.yieldmo.com/pbcas",g="https://prebid-outstream.yieldmo.com/bundle.js",h=["mimes","startdelay","placement","startdelay","skipafter","protocols","api","playbackmethod","maxduration","minduration","pos","skip","skippable"],b=["name","domain","cat","keywords"],I=(0,i.getWindowTop)(),x=["description","title","pr","page_url"],k={code:"yieldmo",supportedMediaTypes:[c.Mk,c.pX],isBidRequestValid:function(e){return!!(e&&e.adUnitCode&&e.bidId&&(w(e)||E(e))&&function(e){if(!E(e))return!0;var t=function(e,t,r){var n='"'.concat(e,'" is required');throw r&&(n+=" when "+r),new Error(n)},r=function(e,t,r){throw r=r?", expected: "+r:"",t=JSON.stringify(t),new Error('"'.concat(e,'"=').concat(t," is invalid").concat(r))},n=function(e){return void 0!==e},o=function(t,r,n,i){if(0===t.indexOf("video")){var o="params."+t,c="mediaTypes."+t,u=(0,a.Z)(e,o),d=(0,a.Z)(e,c),s=r(u),p=r(d);return s?u:p||(s?p||n(c,d,i):n(o,u,i),u||d)}var f=(0,a.Z)(e,t);return r(f)||n(t,f,i),f};try{o("video.context",(function(e){return!(0,i.isEmpty)(e)}),t),o("params.placementId",(function(e){return!(0,i.isEmpty)(e)}),t),o("video.playerSize",(function(e){return(0,i.isArrayOfNums)(e,2)||(0,i.isArray)(e)&&e.every((function(e){return(0,i.isArrayOfNums)(e,2)}))}),r,"array of 2 integers, ex: [640,480] or [[640,480]]"),o("video.mimes",(function(e){return n(e)}),t),o("video.mimes",(function(e){return(0,i.isArray)(e)&&e.every((function(e){return(0,i.isStr)(e)}))}),r,'array of strings, ex: ["video/mp4"]');var c=o("video.placement",(function(e){return n(e)}),t);return o("video.placement",(function(e){return e>=1&&e<=5}),r),1===c&&(o("video.startdelay",(function(e){return n(e)}),(function(e,r){return t(e,r,"placement == 1")})),o("video.startdelay",(function(e){return(0,i.isNumber)(e)}),r,"number, ex: 5")),o("video.protocols",(function(e){return n(e)}),t),o("video.protocols",(function(e){return(0,i.isArrayOfNums)(e)&&e.every((function(e){return e>=1&&e<=6}))}),r,"array of numbers, ex: [2,3]"),o("video.api",(function(e){return n(e)}),t),o("video.api",(function(e){return(0,i.isArrayOfNums)(e)&&e.every((function(e){return e>=1&&e<=6}))}),r,"array of numbers, ex: [2,3]"),o("video.playbackmethod",(function(e){return!n(e)||(0,i.isArrayOfNums)(e)}),r,"array of integers, ex: [2,6]"),o("video.maxduration",(function(e){return n(e)}),t),o("video.maxduration",(function(e){return(0,i.isInteger)(e)}),r),o("video.minduration",(function(e){return!n(e)||(0,i.isNumber)(e)}),r),o("video.skippable",(function(e){return!n(e)||(0,i.isBoolean)(e)}),r),o("video.skipafter",(function(e){return!n(e)||(0,i.isNumber)(e)}),r),o("video.pos",(function(e){return!n(e)||(0,i.isNumber)(e)}),r),o("params.badv",(function(e){return!n(e)||(0,i.isArray)(e)}),r,'array of strings, ex: ["ford.com","pepsi.com"]'),o("params.bcat",(function(e){return!n(e)||(0,i.isArray)(e)}),r,'array of strings, ex: ["IAB1-5","IAB1-6"]'),!0}catch(e){return(0,i.logError)(e.message),!1}}(e))},buildRequests:function(e,t){var r=e.filter((function(e){return w(e)})),n=e.filter((function(e){return E(e)})),u=[],d=function(e){if((0,a.Z)(e,"userId"))return(0,p.HQ)(e.userId)||[]}(e[0])||[];if(r.length>0){var f={pbav:"7.23.0",p:[],page_url:t.refererInfo.page,bust:(new Date).getTime().toString(),dnt:"1"===window.doNotTrack||"1"===window.navigator.doNotTrack||!1,description:A(),userConsent:JSON.stringify({gdprApplies:(0,a.Z)(t,"gdprConsent.gdprApplies")||"",cmp:(0,a.Z)(t,"gdprConsent.consentString")||""}),us_privacy:(0,a.Z)(t,"uspConsent")||""};(function(){try{if((0,i.getWindowTop)().location.href)return!0}catch(e){return!1}})()&&(f.pr=I.document&&I.document.referrer||"",f.scrd=I.devicePixelRatio||0,f.title=I.document.title||"",f.w=I.innerWidth,f.h=I.innerHeight);var m=window.navigator.maxTouchPoints;m&&(f.mtp=m),r.forEach((function(e){f.p.push(function(e){var t=(0,a.Z)(e,"ortb2Imp.ext.data.pbadslot"),r={placement_id:e.adUnitCode,callback_id:e.bidId,sizes:e.mediaTypes.banner.sizes};if(e.params){e.params.placementId&&(r.ym_placement_id=e.params.placementId);var n=Z(e,c.Mk);n&&(r.bidFloor=n)}t&&(r.gpid=t);var i=(0,a.Z)(e,"ortb2Imp.ext.tid");i&&(r.tid=i);e.auctionId&&(r.auctionId=e.auctionId);return JSON.stringify(r)}(e));var t=O(e,"pubcid");t?f.pubcid=t:e.crumbs&&e.crumbs.pubcid&&(f.pubcid=e.crumbs.pubcid);var r=O(e,"tdid");r&&(f.tdid=r);var n=O(e,"criteoId");n&&(f.cri_prebid=n),e.schain&&(f.schain=JSON.stringify(e.schain)),(0,a.Z)(e,"params.lr_env")&&(f.ats_envelope=e.params.lr_env)})),f.p="["+f.p.toString()+"]",d.length&&(f.eids=JSON.stringify(d));var l="".concat(y,"?").concat((0,i.parseQueryStringParameters)(f)).length-8e3;if(l>0)for(var v=0;v<x.length&&!((l=N(l,f,x[v]))<=0);v++);u.push({method:"GET",url:y,data:f})}if(n.length>0){var g=function(e,t){var r=e[0].schain,n={id:e[0].bidderRequestId,at:1,imp:e.map((function(e){return function(e){var t=(0,a.Z)(e,"ortb2Imp.ext.data.pbadslot"),r=function(e){var t=(0,a.Z)(e,"mediaTypes.video.playerSize");if((0,i.isArrayOfNums)(t,2))return t;if((0,i.isArray)(t)&&(0,i.isArrayOfNums)(t[0],2))return t[0];return null}(e),n={id:e.bidId,tagid:e.adUnitCode,bidfloor:Z(e,c.pX),ext:{placement_id:e.params.placementId,tid:(0,a.Z)(e,"ortb2Imp.ext.tid")},video:{w:r[0],h:r[1],linearity:1}},o=(0,a.Z)(e,"mediaTypes.video");Object.keys(o).filter((function(e){return(0,s.q9)(h,e)})).forEach((function(e){return n.video[e]=o[e]}));var u=(0,a.Z)(e,"params.video");Object.keys(u).filter((function(e){return(0,s.q9)(h,e)})).forEach((function(e){return n.video[e]=u[e]})),n.video.skippable&&(n.video.skip=1,delete n.video.skippable);1!==n.video.placement&&(n.video.startdelay=0,n.video.playbackmethod=[2]);t&&(n.ext.gpid=t);return n}(e)})),site:T(e[0],t),device:S(e[0]),badv:e[0].params.badv||[],bcat:(0,a.Z)(t,"bcat")||e[0].params.bcat||[],ext:{prebid:"7.23.0"},ats_envelope:e[0].params.lr_env};r&&(n.schain=r);e[0].auctionId&&(n.auctionId=e[0].auctionId);return function(e,t){var r=t.gdprConsent;r&&"gdprApplies"in r&&((0,o.N)(e,"regs.ext.gdpr",r.gdprApplies?1:0),(0,o.N)(e,"user.ext.consent",r.consentString));var n=(0,a.Z)(t,"uspConsent");n&&(0,o.N)(e,"regs.ext.us_privacy",n)}(n,t),n}(n,t);d.length&&(g.user={eids:d}),u.push({method:"POST",url:"https://ads.yieldmo.com/exchange/prebidvideo",data:g})}return u},interpretResponse:function(e,t){var r=[],n=e.body;(n.length>0&&n.forEach((function(e){e.cpm>0&&r.push(function(e){return{dealId:e.publisherDealId,requestId:e.callback_id,cpm:e.cpm,width:e.width,height:e.height,creativeId:e.creative_id,currency:f,netRevenue:l,ttl:300,ad:e.ad,meta:{advertiserDomains:e.adomain||[],mediaType:c.Mk}}}(e))})),n.seatbid)&&n.seatbid.reduce((function(e,t){return e.concat(t.bid)}),[]).forEach((function(e){return r.push(function(e,t){var r=(0,s.sE)((0,a.Z)(t,"data.imp")||[],(function(t){return t.id===e.impid})),n={dealId:e.dealid,requestId:r.id,cpm:e.price,width:r.video.w,height:r.video.h,creativeId:e.crid||e.adid,currency:f,netRevenue:l,mediaType:c.pX,ttl:m,vastXml:e.adm,meta:{advertiserDomains:e.adomain||[],mediaType:c.pX}};if(r.video.placement&&1!==r.video.placement){var i=d.Th.install({url:g,config:{width:n.width,height:n.height,vastTimeout:15e3,maxAllowedVastTagRedirects:5,allowVpaid:!0,autoPlay:!0,preload:!0,mute:!0},id:r.tagid,loaded:!1});i.setRender((function(e){e.renderer.push((function(){var t=e.renderer,r=t.id,n=t.config;window.YMoutstreamPlayer(e,r,n)}))})),n.renderer=i}return n}(e,t))}));return r},getUserSyncs:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=[],a="&gdpr=".concat(r.gdprApplies?1:0),o="&gdpr_consent=".concat(encodeURIComponent(r.consentString||"")),c="us_privacy=".concat(encodeURIComponent(n)),u="".concat(v,"?").concat(c).concat(a).concat(o);return e.iframeEnabled?i.push({type:"iframe",url:u+"&type=iframe"}):e.pixelEnabled&&i.push({type:"image",url:u+"&type=image"}),i}};function w(e){return!!(0,a.Z)(e,"mediaTypes.banner")}function E(e){return!!(0,a.Z)(e,"mediaTypes.video")}function A(){return document.querySelector('meta[name="description"]')&&document.querySelector('meta[name="description"]').getAttribute("content")||""}function O(e,t){return"object"===(0,n.Z)((0,a.Z)(e,"userId"))?e.userId[t]:void 0}function Z(e,t){var r={};return"function"==typeof e.getFloor&&(r=e.getFloor({currency:f,mediaType:t,size:"*"})),r.floor||e.params.bidfloor||e.params.bidFloor||0}function T(e,t){var r,n={},o=(0,i.parseUrl)((0,a.Z)(t,"refererInfo.page"));(0,i.isEmpty)(o)||(n.page="".concat(o.protocol,"://").concat(o.hostname).concat(o.pathname)),null!==(r=t.refererInfo)&&void 0!==r&&r.ref&&(n.ref=t.refererInfo.ref);var c=document.getElementsByTagName("meta").keywords;c&&c.content&&(n.keywords=c.content);var u=(0,a.Z)(e,"params.site");return u&&Object.keys(u).filter((function(e){return(0,s.q9)(b,e)})).forEach((function(e){return n[e]=u[e]})),n}function S(e){return{ua:navigator.userAgent,language:navigator.language||navigator.browserLanguage||navigator.userLanguage||navigator.systemLanguage}}function N(e,t,r){if(t[r].length>e)return t[r]=t[r].substring(0,t[r].length-e),0;var n=e-t[r].length;return t[r]="",n}(0,u.dX)(k),window.pbjs.installedModules.push("yieldmoBidAdapter")}},function(e){var t;t=55511,e(e.s=t)}]);
|
|
1
|
+
(self.pbjsChunk=self.pbjsChunk||[]).push([[5337],{4192:function(e,t,r){r.d(t,{HQ:function(){return u},Pv:function(){return c},UR:function(){return a}});var n=r(64358),i=r(20265),a={growthCodeId:{getValue:function(e){return e.gc_id},source:"growthcode.io",atype:1,getUidExt:function(e){var t=(0,n.pick)(e,["h1","h2","h3"]);if(Object.keys(t).length)return t}},trustpid:{source:"trustpid.com",atype:1,getValue:function(e){return e}},intentIqId:{source:"intentiq.com",atype:1},naveggId:{source:"navegg.com",atype:1},justId:{source:"justtag.com",atype:1},pubcid:{source:"pubcid.org",atype:1},tdid:{source:"adserver.org",atype:1,getUidExt:function(){return{rtiPartner:"TDID"}}},id5id:{getValue:function(e){return e.uid},source:"id5-sync.com",atype:1,getUidExt:function(e){if(e.ext)return e.ext}},ftrackId:{source:"flashtalking.com",atype:1,getValue:function(e){var t="";return e&&e.ext&&e.ext.DeviceID&&(t=e.ext.DeviceID),t},getUidExt:function(e){return e&&e.ext}},parrableId:{source:"parrable.com",atype:1,getValue:function(e){return e.eid?e.eid:e.ccpaOptout?"":null},getUidExt:function(e){var t=(0,n.pick)(e,["ibaOptout","ccpaOptout"]);if(Object.keys(t).length)return t}},idl_env:{source:"liveramp.com",atype:3},lipb:{getValue:function(e){return e.lipbid},source:"liveintent.com",atype:3,getEidExt:function(e){if(Array.isArray(e.segments)&&e.segments.length)return{segments:e.segments}}},britepoolid:{source:"britepool.com",atype:3},dmdId:{source:"hcn.health",atype:3},lotamePanoramaId:{source:"crwdcntrl.net",atype:1},criteoId:{source:"criteo.com",atype:1},merkleId:{atype:3,getSource:function(e){var t;return null!=e&&null!==(t=e.ext)&&void 0!==t&&t.ssp?"".concat(e.ext.ssp,".merkleinc.com"):"merkleinc.com"},getValue:function(e){return e.id},getUidExt:function(e){return e.keyID?{keyID:e.keyID}:e.ext?e.ext:void 0}},netId:{source:"netid.de",atype:1},IDP:{source:"zeotap.com",atype:1},hadronId:{source:"audigent.com",atype:1},quantcastId:{source:"quantcast.com",atype:1},idx:{source:"idx.lat",atype:1},connectid:{source:"verizonmedia.com",atype:3},fabrickId:{source:"neustar.biz",atype:1},mwOpenLinkId:{source:"mediawallahscript.com",atype:1},tapadId:{source:"tapad.com",atype:1},novatiq:{getValue:function(e){return e.snowflake},source:"novatiq.com",atype:1},uid2:{source:"uidapi.com",atype:3,getValue:function(e){return e.id}},deepintentId:{source:"deepintent.com",atype:3},admixerId:{source:"admixer.net",atype:3},adtelligentId:{source:"adtelligent.com",atype:3},amxId:{source:"amxrtb.com",atype:1},publinkId:{source:"epsilon.com",atype:3},kpuid:{source:"kpuid.com",atype:3},imppid:{source:"ppid.intimatemerger.com",atype:1},imuid:{source:"intimatemerger.com",atype:1},connectId:{source:"yahoo.com",atype:3},qid:{source:"adquery.io",atype:1},dacId:{source:"impact-ad.jp",atype:1},"33acrossId":{source:"33across.com",atype:1,getValue:function(e){return e.envelope}},tncid:{source:"thenewco.it",atype:3},gravitompId:{source:"gravito.net",atype:1},cpexId:{source:"czechadid.cz",atype:1},oneKeyData:{getValue:function(e){if(e&&Array.isArray(e.identifiers)&&e.identifiers[0])return e.identifiers[0].value},source:"paf",atype:1,getEidExt:function(e){if(e&&e.preferences)return{preferences:e.preferences}},getUidExt:function(e){if(e&&Array.isArray(e.identifiers)&&e.identifiers[0]){var t=e.identifiers[0];return{version:t.version,type:t.type,source:t.source}}}}};function o(e,t){var r=a[t];if(r&&e){var i={};i.source=(0,n.isFn)(r.getSource)?r.getSource(e):r.source;var o=(0,n.isFn)(r.getValue)?r.getValue(e):e;if((0,n.isStr)(o)){var u={id:o,atype:r.atype};if((0,n.isFn)(r.getUidExt)){var c=r.getUidExt(e);c&&(u.ext=c)}if(i.uids=[u],(0,n.isFn)(r.getEidExt)){var d=r.getEidExt(e);d&&(i.ext=d)}return i}}return null}function u(e){var t=[],r=function(r){if(e.hasOwnProperty(r))if("pubProvidedId"===r)t=t.concat(e.pubProvidedId);else if(Array.isArray(e[r]))e[r].forEach((function(e,n,i){var a=o(e,r);a&&t.push(a)}));else{var n=o(e[r],r);n&&t.push(n)}};for(var n in e)r(n);return t}function c(e){var t=[];return e.filter((function(e){return(0,n.isPlainObject)(e.idObj)&&Object.keys(e.idObj).length})).forEach((function(e){Object.keys(e.idObj).forEach((function(r){(0,i.Z)(e,"config.bidders")&&Array.isArray(e.config.bidders)&&(0,i.Z)(a,r+".source")&&t.push({source:a[r].source,bidders:e.config.bidders})}))})),t}},55511:function(e,t,r){var n=r(71002),i=r(64358),a=r(20265),o=r(96475),u=r(24679),c=r(14699),d=r(35706),s=r(34614),p=r(4192),f="USD",m=300,l=!0,y="https://ads.yieldmo.com/exchange/prebid",v="https://ads.yieldmo.com/pbcas",g="https://prebid-outstream.yieldmo.com/bundle.js",h=["mimes","startdelay","placement","startdelay","skipafter","protocols","api","playbackmethod","maxduration","minduration","pos","skip","skippable"],b=["name","domain","cat","keywords"],I=(0,i.getWindowTop)(),x=["description","title","pr","page_url"],k={code:"yieldmo",supportedMediaTypes:[u.Mk,u.pX],isBidRequestValid:function(e){return!!(e&&e.adUnitCode&&e.bidId&&(w(e)||E(e))&&function(e){if(!E(e))return!0;var t=function(e,t,r){var n='"'.concat(e,'" is required');throw r&&(n+=" when "+r),new Error(n)},r=function(e,t,r){throw r=r?", expected: "+r:"",t=JSON.stringify(t),new Error('"'.concat(e,'"=').concat(t," is invalid").concat(r))},n=function(e){return void 0!==e},o=function(t,r,n,i){if(0===t.indexOf("video")){var o="params."+t,u="mediaTypes."+t,c=(0,a.Z)(e,o),d=(0,a.Z)(e,u),s=r(c),p=r(d);return s?c:p||(s?p||n(u,d,i):n(o,c,i),c||d)}var f=(0,a.Z)(e,t);return r(f)||n(t,f,i),f};try{o("video.context",(function(e){return!(0,i.isEmpty)(e)}),t),o("params.placementId",(function(e){return!(0,i.isEmpty)(e)}),t),o("video.playerSize",(function(e){return(0,i.isArrayOfNums)(e,2)||(0,i.isArray)(e)&&e.every((function(e){return(0,i.isArrayOfNums)(e,2)}))}),r,"array of 2 integers, ex: [640,480] or [[640,480]]"),o("video.mimes",(function(e){return n(e)}),t),o("video.mimes",(function(e){return(0,i.isArray)(e)&&e.every((function(e){return(0,i.isStr)(e)}))}),r,'array of strings, ex: ["video/mp4"]');var u=o("video.placement",(function(e){return n(e)}),t);return o("video.placement",(function(e){return e>=1&&e<=5}),r),1===u&&(o("video.startdelay",(function(e){return n(e)}),(function(e,r){return t(e,r,"placement == 1")})),o("video.startdelay",(function(e){return(0,i.isNumber)(e)}),r,"number, ex: 5")),o("video.protocols",(function(e){return n(e)}),t),o("video.protocols",(function(e){return(0,i.isArrayOfNums)(e)&&e.every((function(e){return e>=1&&e<=6}))}),r,"array of numbers, ex: [2,3]"),o("video.api",(function(e){return n(e)}),t),o("video.api",(function(e){return(0,i.isArrayOfNums)(e)&&e.every((function(e){return e>=1&&e<=6}))}),r,"array of numbers, ex: [2,3]"),o("video.playbackmethod",(function(e){return!n(e)||(0,i.isArrayOfNums)(e)}),r,"array of integers, ex: [2,6]"),o("video.maxduration",(function(e){return n(e)}),t),o("video.maxduration",(function(e){return(0,i.isInteger)(e)}),r),o("video.minduration",(function(e){return!n(e)||(0,i.isNumber)(e)}),r),o("video.skippable",(function(e){return!n(e)||(0,i.isBoolean)(e)}),r),o("video.skipafter",(function(e){return!n(e)||(0,i.isNumber)(e)}),r),o("video.pos",(function(e){return!n(e)||(0,i.isNumber)(e)}),r),o("params.badv",(function(e){return!n(e)||(0,i.isArray)(e)}),r,'array of strings, ex: ["ford.com","pepsi.com"]'),o("params.bcat",(function(e){return!n(e)||(0,i.isArray)(e)}),r,'array of strings, ex: ["IAB1-5","IAB1-6"]'),!0}catch(e){return(0,i.logError)(e.message),!1}}(e))},buildRequests:function(e,t){var r=e.filter((function(e){return w(e)})),n=e.filter((function(e){return E(e)})),c=[],d=function(e){if((0,a.Z)(e,"userId"))return(0,p.HQ)(e.userId)||[]}(e[0])||[];if(r.length>0){var f={pbav:"7.24.0",p:[],page_url:t.refererInfo.page,bust:(new Date).getTime().toString(),dnt:"1"===window.doNotTrack||"1"===window.navigator.doNotTrack||!1,description:A(),userConsent:JSON.stringify({gdprApplies:(0,a.Z)(t,"gdprConsent.gdprApplies")||"",cmp:(0,a.Z)(t,"gdprConsent.consentString")||""}),us_privacy:(0,a.Z)(t,"uspConsent")||""};(function(){try{if((0,i.getWindowTop)().location.href)return!0}catch(e){return!1}})()&&(f.pr=I.document&&I.document.referrer||"",f.scrd=I.devicePixelRatio||0,f.title=I.document.title||"",f.w=I.innerWidth,f.h=I.innerHeight);var m=window.navigator.maxTouchPoints;m&&(f.mtp=m),r.forEach((function(e){f.p.push(function(e){var t=(0,a.Z)(e,"ortb2Imp.ext.data.pbadslot"),r={placement_id:e.adUnitCode,callback_id:e.bidId,sizes:e.mediaTypes.banner.sizes};if(e.params){e.params.placementId&&(r.ym_placement_id=e.params.placementId);var n=Z(e,u.Mk);n&&(r.bidFloor=n)}t&&(r.gpid=t);var i=(0,a.Z)(e,"ortb2Imp.ext.tid");i&&(r.tid=i);e.auctionId&&(r.auctionId=e.auctionId);return JSON.stringify(r)}(e));var t=O(e,"pubcid");t?f.pubcid=t:e.crumbs&&e.crumbs.pubcid&&(f.pubcid=e.crumbs.pubcid);var r=O(e,"tdid");r&&(f.tdid=r);var n=O(e,"criteoId");n&&(f.cri_prebid=n),e.schain&&(f.schain=JSON.stringify(e.schain)),(0,a.Z)(e,"params.lr_env")&&(f.ats_envelope=e.params.lr_env)})),f.p="["+f.p.toString()+"]",d.length&&(f.eids=JSON.stringify(d));var l="".concat(y,"?").concat((0,i.parseQueryStringParameters)(f)).length-8e3;if(l>0)for(var v=0;v<x.length&&!((l=N(l,f,x[v]))<=0);v++);c.push({method:"GET",url:y,data:f})}if(n.length>0){var g=function(e,t){var r=e[0].schain,n={id:e[0].bidderRequestId,at:1,imp:e.map((function(e){return function(e){var t=(0,a.Z)(e,"ortb2Imp.ext.data.pbadslot"),r=function(e){var t=(0,a.Z)(e,"mediaTypes.video.playerSize");if((0,i.isArrayOfNums)(t,2))return t;if((0,i.isArray)(t)&&(0,i.isArrayOfNums)(t[0],2))return t[0];return null}(e),n={id:e.bidId,tagid:e.adUnitCode,bidfloor:Z(e,u.pX),ext:{placement_id:e.params.placementId,tid:(0,a.Z)(e,"ortb2Imp.ext.tid")},video:{w:r[0],h:r[1],linearity:1}},o=(0,a.Z)(e,"mediaTypes.video");Object.keys(o).filter((function(e){return(0,s.q9)(h,e)})).forEach((function(e){return n.video[e]=o[e]}));var c=(0,a.Z)(e,"params.video");Object.keys(c).filter((function(e){return(0,s.q9)(h,e)})).forEach((function(e){return n.video[e]=c[e]})),n.video.skippable&&(n.video.skip=1,delete n.video.skippable);1!==n.video.placement&&(n.video.startdelay=0,n.video.playbackmethod=[2]);t&&(n.ext.gpid=t);return n}(e)})),site:T(e[0],t),device:S(e[0]),badv:e[0].params.badv||[],bcat:(0,a.Z)(t,"bcat")||e[0].params.bcat||[],ext:{prebid:"7.24.0"},ats_envelope:e[0].params.lr_env};r&&(n.schain=r);e[0].auctionId&&(n.auctionId=e[0].auctionId);return function(e,t){var r=t.gdprConsent;r&&"gdprApplies"in r&&((0,o.N)(e,"regs.ext.gdpr",r.gdprApplies?1:0),(0,o.N)(e,"user.ext.consent",r.consentString));var n=(0,a.Z)(t,"uspConsent");n&&(0,o.N)(e,"regs.ext.us_privacy",n)}(n,t),n}(n,t);d.length&&(g.user={eids:d}),c.push({method:"POST",url:"https://ads.yieldmo.com/exchange/prebidvideo",data:g})}return c},interpretResponse:function(e,t){var r=[],n=e.body;(n.length>0&&n.forEach((function(e){e.cpm>0&&r.push(function(e){return{dealId:e.publisherDealId,requestId:e.callback_id,cpm:e.cpm,width:e.width,height:e.height,creativeId:e.creative_id,currency:f,netRevenue:l,ttl:300,ad:e.ad,meta:{advertiserDomains:e.adomain||[],mediaType:u.Mk}}}(e))})),n.seatbid)&&n.seatbid.reduce((function(e,t){return e.concat(t.bid)}),[]).forEach((function(e){return r.push(function(e,t){var r=(0,s.sE)((0,a.Z)(t,"data.imp")||[],(function(t){return t.id===e.impid})),n={dealId:e.dealid,requestId:r.id,cpm:e.price,width:r.video.w,height:r.video.h,creativeId:e.crid||e.adid,currency:f,netRevenue:l,mediaType:u.pX,ttl:m,vastXml:e.adm,meta:{advertiserDomains:e.adomain||[],mediaType:u.pX}};if(r.video.placement&&1!==r.video.placement){var i=d.Th.install({url:g,config:{width:n.width,height:n.height,vastTimeout:15e3,maxAllowedVastTagRedirects:5,allowVpaid:!0,autoPlay:!0,preload:!0,mute:!0},id:r.tagid,loaded:!1});i.setRender((function(e){e.renderer.push((function(){var t=e.renderer,r=t.id,n=t.config;window.YMoutstreamPlayer(e,r,n)}))})),n.renderer=i}return n}(e,t))}));return r},getUserSyncs:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=[],a="&gdpr=".concat(r.gdprApplies?1:0),o="&gdpr_consent=".concat(encodeURIComponent(r.consentString||"")),u="us_privacy=".concat(encodeURIComponent(n)),c="".concat(v,"?").concat(u).concat(a).concat(o);return e.iframeEnabled?i.push({type:"iframe",url:c+"&type=iframe"}):e.pixelEnabled&&i.push({type:"image",url:c+"&type=image"}),i}};function w(e){return!!(0,a.Z)(e,"mediaTypes.banner")}function E(e){return!!(0,a.Z)(e,"mediaTypes.video")}function A(){return document.querySelector('meta[name="description"]')&&document.querySelector('meta[name="description"]').getAttribute("content")||""}function O(e,t){return"object"===(0,n.Z)((0,a.Z)(e,"userId"))?e.userId[t]:void 0}function Z(e,t){var r={};return"function"==typeof e.getFloor&&(r=e.getFloor({currency:f,mediaType:t,size:"*"})),r.floor||e.params.bidfloor||e.params.bidFloor||0}function T(e,t){var r,n={},o=(0,i.parseUrl)((0,a.Z)(t,"refererInfo.page"));(0,i.isEmpty)(o)||(n.page="".concat(o.protocol,"://").concat(o.hostname).concat(o.pathname)),null!==(r=t.refererInfo)&&void 0!==r&&r.ref&&(n.ref=t.refererInfo.ref);var u=document.getElementsByTagName("meta").keywords;u&&u.content&&(n.keywords=u.content);var c=(0,a.Z)(e,"params.site");return c&&Object.keys(c).filter((function(e){return(0,s.q9)(b,e)})).forEach((function(e){return n[e]=c[e]})),n}function S(e){return{ua:navigator.userAgent,language:navigator.language||navigator.browserLanguage||navigator.userLanguage||navigator.systemLanguage}}function N(e,t,r){if(t[r].length>e)return t[r]=t[r].substring(0,t[r].length-e),0;var n=e-t[r].length;return t[r]="",n}(0,c.dX)(k),window.pbjs.installedModules.push("yieldmoBidAdapter")}},function(e){var t;t=55511,e(e.s=t)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.pbjsChunk=self.pbjsChunk||[]).push([[4572],{83519:function(e,t,n){var a=n(64358),i=n(48928),o=n(64563),r=n(5644),d=n(93092),s=n(18621),c=n(78653),u={},v={},g={},f={};f[r.FP.BID_ADJUSTMENT]=!0,f[r.FP.BIDDER_DONE]=!0,f[r.FP.AUCTION_END]=!0;var l="",p="https://pool.tsukiji.iponweb.net/hba",b="";function I(e,t){e.adUnitCode&&t[e.adUnitCode]&&(e.adUnitName=t[e.adUnitCode]),(0,a.isArray)(e.adUnits)&&e.adUnits.forEach((function(e){e.code&&t[e.code]&&(e.name=t[e.code])})),(0,a.isArray)(e.adUnitCodes)&&(e.adUnitNames=e.adUnitCodes.map((function(e){return t[e]}))),["bids","bidderRequests","bidsReceived","noBids"].forEach((function(n){!function(e,t){(0,a.isArray)(e)&&e.forEach((function(e){I(e,t)}))}(e[n],t)}))}var h=Object.assign((0,o.Z)({analyticsType:"endpoint"}),{getUrl:function(){return p},track:function(e){var t=e.eventType,n=e.args,i=void 0===n?{}:n;if(t===r.FP.BID_REQUESTED){var o="".concat(i.bidderCode,"_").concat(i.auctionId);u[o]=(0,a.deepClone)(i),u[o].bids=[],i.bids.forEach((function(e){v["".concat(e.bidId,"_").concat(e.auctionId)]=e}))}if(t===r.FP.BID_TIMEOUT&&(0,a.isArray)(i)){var d=h.eventsStorage,p={};i.forEach((function(e){var n="".concat(e.bidId,"_").concat(e.auctionId),a="".concat(e.bidder,"_").concat(e.auctionId);d[e.auctionId]||(d[e.auctionId]={events:[]}),(u[a]||p[e.bidder])&&v[n]&&(p[e.bidder]||(p[e.bidder]=u[a],d[e.auctionId].events.push({eventType:t,params:p[e.bidder]}),delete u[a]),p[e.bidder].bids.push(v[n]),delete v[n])}))}else if(l=i.auctionId||l){var S=h.eventsStorage;S[l]||(S[l]={events:[]});var y=i.refererInfo&&i.refererInfo.page;y&&g[l]!==y&&(g[l]=y);var E=Object.assign({},i);if(delete E.ad,E.bidsReceived&&(E.bidsReceived=E.bidsReceived.map((function(e){var t=Object.assign({},e);return delete t.ad,t}))),f[t]||S[l].events.push({eventType:t,params:E}),t===r.FP.AUCTION_END||t===r.FP.BID_WON){if(E.adServerTargeting=s.q0.getAllTargeting(c.K.getAdUnitCodes(),c.K.getBidsReceived()),h.eventsStorage[l]&&h.eventsStorage[l].events.length){h.eventsStorage[l].page={url:g[l]},h.eventsStorage[l].pubId=b,h.eventsStorage[l].wrapper_version="7.
|
|
1
|
+
(self.pbjsChunk=self.pbjsChunk||[]).push([[4572],{83519:function(e,t,n){var a=n(64358),i=n(48928),o=n(64563),r=n(5644),d=n(93092),s=n(18621),c=n(78653),u={},v={},g={},f={};f[r.FP.BID_ADJUSTMENT]=!0,f[r.FP.BIDDER_DONE]=!0,f[r.FP.AUCTION_END]=!0;var l="",p="https://pool.tsukiji.iponweb.net/hba",b="";function I(e,t){e.adUnitCode&&t[e.adUnitCode]&&(e.adUnitName=t[e.adUnitCode]),(0,a.isArray)(e.adUnits)&&e.adUnits.forEach((function(e){e.code&&t[e.code]&&(e.name=t[e.code])})),(0,a.isArray)(e.adUnitCodes)&&(e.adUnitNames=e.adUnitCodes.map((function(e){return t[e]}))),["bids","bidderRequests","bidsReceived","noBids"].forEach((function(n){!function(e,t){(0,a.isArray)(e)&&e.forEach((function(e){I(e,t)}))}(e[n],t)}))}var h=Object.assign((0,o.Z)({analyticsType:"endpoint"}),{getUrl:function(){return p},track:function(e){var t=e.eventType,n=e.args,i=void 0===n?{}:n;if(t===r.FP.BID_REQUESTED){var o="".concat(i.bidderCode,"_").concat(i.auctionId);u[o]=(0,a.deepClone)(i),u[o].bids=[],i.bids.forEach((function(e){v["".concat(e.bidId,"_").concat(e.auctionId)]=e}))}if(t===r.FP.BID_TIMEOUT&&(0,a.isArray)(i)){var d=h.eventsStorage,p={};i.forEach((function(e){var n="".concat(e.bidId,"_").concat(e.auctionId),a="".concat(e.bidder,"_").concat(e.auctionId);d[e.auctionId]||(d[e.auctionId]={events:[]}),(u[a]||p[e.bidder])&&v[n]&&(p[e.bidder]||(p[e.bidder]=u[a],d[e.auctionId].events.push({eventType:t,params:p[e.bidder]}),delete u[a]),p[e.bidder].bids.push(v[n]),delete v[n])}))}else if(l=i.auctionId||l){var S=h.eventsStorage;S[l]||(S[l]={events:[]});var y=i.refererInfo&&i.refererInfo.page;y&&g[l]!==y&&(g[l]=y);var E=Object.assign({},i);if(delete E.ad,E.bidsReceived&&(E.bidsReceived=E.bidsReceived.map((function(e){var t=Object.assign({},e);return delete t.ad,t}))),f[t]||S[l].events.push({eventType:t,params:E}),t===r.FP.AUCTION_END||t===r.FP.BID_WON){if(E.adServerTargeting=s.q0.getAllTargeting(c.K.getAdUnitCodes(),c.K.getBidsReceived()),h.eventsStorage[l]&&h.eventsStorage[l].events.length){h.eventsStorage[l].page={url:g[l]},h.eventsStorage[l].pubId=b,h.eventsStorage[l].wrapper_version="7.24.0";var A=function(){if(window.googletag&&window.googletag.pubads){var e=googletag.pubads();if(e&&e.getSlots){var t=e.getSlots();if(t&&t.length){var n={};return t.forEach((function(e){var t=e.getSlotElementId(),a=(e.getAdUnitPath()||"").split("/").pop();n[t]=a})),n}}}}();A&&h.eventsStorage[l].events.forEach((function(e){I(e.params,A)}))}h.sendStat(h.eventsStorage[l],l)}}},sendStat:function(e,t){e&&e.events&&e.events.length&&(delete h.eventsStorage[t],(0,i.h)(p,{success:function(){},error:function(){}},JSON.stringify(e),{method:"POST"}))}});h.eventsStorage={},h.originEnableAnalytics=h.enableAnalytics,h.enableAnalytics=function(e){var t=e&&e.options;t&&("string"==typeof t.url&&(p=t.url),t.pubId&&(b=t.pubId.toString())),h.originEnableAnalytics(e)},d.ZP.registerAnalyticsAdapter({adapter:h,code:"yieldone"});window.pbjs.installedModules.push("yieldoneAnalyticsAdapter")}},function(e){e.O(0,[4861],(function(){return t=83519,e(e.s=t);var t}));e.O()}]);
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
|
|
5
|
+
<script>
|
|
6
|
+
window.googletag = window.googletag || { cmd: [] };
|
|
7
|
+
googletag.cmd.push(function () {
|
|
8
|
+
googletag.defineSlot('/46380388/herbeauty_prebid', [[320, 100], [950, 90], [1024, 768], [120, 600], [300, 75], [970, 66], [300, 50], [300, 31], [320, 480], [750, 200], 'fluid', [250, 250], [250, 360], [120, 90], [1, 1], [292, 30], [300, 100], [768, 1024], [88, 31], [200, 200], [300, 600], [300, 1050], [960, 90], [125, 125], [180, 150], [970, 250], [168, 28], [980, 120], [120, 20], [120, 240], [480, 320], [468, 60], [120, 30], [120, 60], [750, 300], [930, 180], [728, 90], [168, 42], [980, 90], [320, 50], [750, 100], [200, 446], [336, 280], [300, 250], [580, 400], [970, 90], [160, 600]], 'div-gpt-ad-1660208650016-0').addService(googletag.pubads());
|
|
9
|
+
googletag.pubads().enableSingleRequest();
|
|
10
|
+
googletag.enableServices();
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
<link rel="icon" type="image/png" href="/favicon.png">
|
|
14
|
+
<script src="../../build/dev/prebid.js" async></script>
|
|
15
|
+
<script>
|
|
16
|
+
var sizes = [
|
|
17
|
+
[300, 250]
|
|
18
|
+
];
|
|
19
|
+
var PREBID_TIMEOUT = 1000;
|
|
20
|
+
var FAILSAFE_TIMEOUT = 3000;
|
|
21
|
+
var adUnits = [{
|
|
22
|
+
code: '/46380388/herbeauty_prebid',
|
|
23
|
+
mediaTypes: {
|
|
24
|
+
banner: {
|
|
25
|
+
sizes: [[320, 100], [950, 90], [1024, 768], [120, 600], [300, 75], [970, 66], [300, 50], [300, 31], [320, 480], [750, 200], [250, 250], [250, 360], [120, 90], [1, 1], [292, 30], [300, 100], [768, 1024], [88, 31], [200, 200], [300, 600], [300, 1050], [960, 90], [125, 125], [180, 150], [970, 250], [168, 28], [980, 120], [120, 20], [120, 240], [480, 320], [468, 60], [120, 30], [120, 60], [750, 300], [930, 180], [728, 90], [168, 42], [980, 90], [320, 50], [750, 100], [200, 446], [336, 280], [300, 250], [580, 400], [970, 90], [160, 600]]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
bids: [{
|
|
29
|
+
bidder: 'mgid',
|
|
30
|
+
params: {
|
|
31
|
+
accountId: '219'
|
|
32
|
+
}
|
|
33
|
+
}]
|
|
34
|
+
}];
|
|
35
|
+
// ======== DO NOT EDIT BELOW THIS LINE =========== //
|
|
36
|
+
var googletag = googletag || {};
|
|
37
|
+
googletag.cmd = googletag.cmd || [];
|
|
38
|
+
googletag.cmd.push(function () {
|
|
39
|
+
googletag.pubads().disableInitialLoad();
|
|
40
|
+
});
|
|
41
|
+
var pbjs = pbjs || {};
|
|
42
|
+
pbjs.que = pbjs.que || [];
|
|
43
|
+
pbjs.que.push(function () {
|
|
44
|
+
pbjs.setConfig({ priceGranularity: 'high' })
|
|
45
|
+
pbjs.setConfig({
|
|
46
|
+
debug: true,
|
|
47
|
+
realTimeData: {
|
|
48
|
+
auctionDelay: 1000,
|
|
49
|
+
dataProviders: [{
|
|
50
|
+
name: 'mgid',
|
|
51
|
+
waitForIt: true,
|
|
52
|
+
params: {
|
|
53
|
+
clientSiteId: 1
|
|
54
|
+
}
|
|
55
|
+
}]
|
|
56
|
+
},
|
|
57
|
+
/*consentManagement: {
|
|
58
|
+
gdpr: {
|
|
59
|
+
cmpApi: 'iab',
|
|
60
|
+
timeout: 8000,
|
|
61
|
+
defaultGdprScope: true
|
|
62
|
+
}
|
|
63
|
+
}*/
|
|
64
|
+
// static data for consent management is only for test purpose - with this data we didn't get ads at the auction
|
|
65
|
+
/*consentManagement: {
|
|
66
|
+
usp: {
|
|
67
|
+
cmpApi: 'static',
|
|
68
|
+
consentData: {
|
|
69
|
+
getUSPData: {
|
|
70
|
+
uspString: '1YNY',
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
gdpr: {
|
|
75
|
+
cmpApi: 'static',
|
|
76
|
+
consentData: {
|
|
77
|
+
getTCData: {
|
|
78
|
+
tcString: 'COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw',
|
|
79
|
+
gdprApplies: true,
|
|
80
|
+
purpose: {
|
|
81
|
+
consents: {
|
|
82
|
+
1: true,
|
|
83
|
+
2: true,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
vendor: {
|
|
87
|
+
consents: {
|
|
88
|
+
358: true,
|
|
89
|
+
},
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}*/
|
|
95
|
+
});
|
|
96
|
+
pbjs.addAdUnits(adUnits);
|
|
97
|
+
pbjs.requestBids({
|
|
98
|
+
bidsBackHandler: initAdserver,
|
|
99
|
+
timeout: PREBID_TIMEOUT,
|
|
100
|
+
ortb2: {
|
|
101
|
+
site: {
|
|
102
|
+
content: {
|
|
103
|
+
language: 'en',
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
function initAdserver() {
|
|
111
|
+
if (pbjs.initAdserverSet) return;
|
|
112
|
+
pbjs.initAdserverSet = true;
|
|
113
|
+
googletag.cmd.push(function () {
|
|
114
|
+
pbjs.setTargetingForGPTAsync && pbjs.setTargetingForGPTAsync();
|
|
115
|
+
googletag.pubads().refresh();
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// in case PBJS doesn't load
|
|
120
|
+
setTimeout(function () {
|
|
121
|
+
initAdserver();
|
|
122
|
+
}, FAILSAFE_TIMEOUT);
|
|
123
|
+
|
|
124
|
+
</script>
|
|
125
|
+
<meta charset="utf-8">
|
|
126
|
+
<meta name="viewport" content="width=device-width">
|
|
127
|
+
<title>JS Bin</title>
|
|
128
|
+
</head>
|
|
129
|
+
<body>
|
|
130
|
+
|
|
131
|
+
<h2>Basic Prebid.js Example</h2>
|
|
132
|
+
<h5>Div-1</h5>
|
|
133
|
+
|
|
134
|
+
<div id='div-gpt-ad-1660208650016-0' style='min-width: 88px; min-height: 20px;'>
|
|
135
|
+
<script>
|
|
136
|
+
googletag.cmd.push(function () {
|
|
137
|
+
googletag.display('div-gpt-ad-1660208650016-0');
|
|
138
|
+
});
|
|
139
|
+
</script>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
</body>
|
|
143
|
+
</html>
|
package/modules/.submodules.json
CHANGED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { getValue, logError, deepAccess, getBidIdParameter, isArray } from '../src/utils.js';
|
|
2
|
+
import { loadExternalScript } from '../src/adloader.js';
|
|
3
|
+
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
4
|
+
|
|
5
|
+
const ENDPOINT_URL = 'https://layer.serve.admatic.com.tr/pb';
|
|
6
|
+
const SYNC_URL = 'https://cdn.serve.admatic.com.tr/showad/sync.js';
|
|
7
|
+
const BIDDER_CODE = 'admatic';
|
|
8
|
+
|
|
9
|
+
export const spec = {
|
|
10
|
+
code: 'admatic',
|
|
11
|
+
supportedMediaTypes: ['video', 'banner'],
|
|
12
|
+
/**
|
|
13
|
+
* Determines whether or not the given bid request is valid.
|
|
14
|
+
*
|
|
15
|
+
* @param {BidRequest} bid The bid params to validate.
|
|
16
|
+
* @return boolean True if this is a valid bid, and false otherwise.
|
|
17
|
+
*/
|
|
18
|
+
isBidRequestValid: function(bid) {
|
|
19
|
+
let isValid = false;
|
|
20
|
+
if (typeof bid.params !== 'undefined') {
|
|
21
|
+
let isValidNetworkId = _validateId(getValue(bid.params, 'networkId'));
|
|
22
|
+
isValid = isValidNetworkId;// && isValidTypeId;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (!isValid) {
|
|
26
|
+
logError('AdMatic networkId parameters are required. Bid aborted.');
|
|
27
|
+
}
|
|
28
|
+
return isValid;
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* Make a server request from the list of BidRequests.
|
|
32
|
+
*
|
|
33
|
+
* @param {validBidRequests[]} an array of bids
|
|
34
|
+
* @return ServerRequest Info describing the request to the server.
|
|
35
|
+
*/
|
|
36
|
+
buildRequests: function(validBidRequests, bidderRequest) {
|
|
37
|
+
const bids = validBidRequests.map(buildRequestObject);
|
|
38
|
+
const networkId = getValue(validBidRequests[0].params, 'networkId');
|
|
39
|
+
const currency = getValue(validBidRequests[0].params, 'currency') || 'TRY';
|
|
40
|
+
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
loadExternalScript(SYNC_URL, BIDDER_CODE);
|
|
43
|
+
}, bidderRequest.timeout);
|
|
44
|
+
|
|
45
|
+
const payload = {
|
|
46
|
+
'user': {
|
|
47
|
+
'ua': navigator.userAgent
|
|
48
|
+
},
|
|
49
|
+
'blacklist': [],
|
|
50
|
+
'site': {
|
|
51
|
+
'page': location.href,
|
|
52
|
+
'ref': location.origin,
|
|
53
|
+
'publisher': {
|
|
54
|
+
'name': location.hostname,
|
|
55
|
+
'publisherId': networkId
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
imp: bids,
|
|
59
|
+
ext: {
|
|
60
|
+
'cur': currency,
|
|
61
|
+
'type': 'admatic'
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const payloadString = JSON.stringify(payload);
|
|
66
|
+
return {
|
|
67
|
+
method: 'POST',
|
|
68
|
+
url: ENDPOINT_URL,
|
|
69
|
+
data: payloadString,
|
|
70
|
+
options: {
|
|
71
|
+
contentType: 'application/json'
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
/**
|
|
76
|
+
* Unpack the response from the server into a list of bids.
|
|
77
|
+
*
|
|
78
|
+
* @param {*} serverResponse A successful response from the server.
|
|
79
|
+
* @return {Bid[]} An array of bids which were nested inside the server.
|
|
80
|
+
*/
|
|
81
|
+
interpretResponse: (response, request) => {
|
|
82
|
+
const body = response.body || response;
|
|
83
|
+
const bidResponses = [];
|
|
84
|
+
if (body.data.length > 0) {
|
|
85
|
+
body.data.forEach(function (bid) {
|
|
86
|
+
const resbid = {
|
|
87
|
+
requestId: bid.id,
|
|
88
|
+
cpm: bid.price,
|
|
89
|
+
width: bid.width,
|
|
90
|
+
height: bid.height,
|
|
91
|
+
currency: body.cur,
|
|
92
|
+
netRevenue: true,
|
|
93
|
+
ad: bid.party_tag,
|
|
94
|
+
creativeId: bid.creative_id,
|
|
95
|
+
meta: {
|
|
96
|
+
advertiserDomains: bid && bid.adomain ? bid.adomain : []
|
|
97
|
+
},
|
|
98
|
+
ttl: 360,
|
|
99
|
+
bidder: 'admatic',
|
|
100
|
+
timeToRespond: 1,
|
|
101
|
+
requestTimestamp: 1
|
|
102
|
+
};
|
|
103
|
+
bidResponses.push(resbid);
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
return bidResponses;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
function buildRequestObject(bid) {
|
|
111
|
+
const reqObj = {};
|
|
112
|
+
reqObj.size = getSizes(bid);
|
|
113
|
+
reqObj.id = getBidIdParameter('bidId', bid);
|
|
114
|
+
reqObj.floor = getValue(bid.params, 'floor') || 0.01;
|
|
115
|
+
return reqObj;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function getSizes(bid) {
|
|
119
|
+
return concatSizes(bid);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function concatSizes(bid) {
|
|
123
|
+
let playerSize = deepAccess(bid, 'mediaTypes.video.playerSize');
|
|
124
|
+
let videoSizes = deepAccess(bid, 'mediaTypes.video.sizes');
|
|
125
|
+
let bannerSizes = deepAccess(bid, 'mediaTypes.banner.sizes');
|
|
126
|
+
|
|
127
|
+
if (isArray(bannerSizes) || isArray(playerSize) || isArray(videoSizes)) {
|
|
128
|
+
let mediaTypesSizes = [bannerSizes, videoSizes, playerSize];
|
|
129
|
+
return mediaTypesSizes
|
|
130
|
+
.reduce(function(acc, currSize) {
|
|
131
|
+
if (isArray(currSize)) {
|
|
132
|
+
if (isArray(currSize[0])) {
|
|
133
|
+
currSize.forEach(function (childSize) {
|
|
134
|
+
acc.push({ w: childSize[0], h: childSize[1] });
|
|
135
|
+
})
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return acc;
|
|
139
|
+
}, []);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function _validateId(id) {
|
|
144
|
+
return (parseInt(id) > 0);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
registerBidder(spec);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
**Module Name**: Admatic Bidder Adapter
|
|
4
|
+
**Module Type**: Bidder Adapter
|
|
5
|
+
**Maintainer**: prebid@admatic.com.tr
|
|
6
|
+
|
|
7
|
+
# Description
|
|
8
|
+
|
|
9
|
+
Use `admatic` as bidder.
|
|
10
|
+
|
|
11
|
+
`networkId` is required and must be integer.
|
|
12
|
+
|
|
13
|
+
## AdUnits configuration example
|
|
14
|
+
```
|
|
15
|
+
var adUnits = [{
|
|
16
|
+
code: 'your-slot_1-div', //use exactly the same code as your slot div id.
|
|
17
|
+
sizes: [[300, 250]],
|
|
18
|
+
bids: [{
|
|
19
|
+
bidder: 'admatic',
|
|
20
|
+
params: {
|
|
21
|
+
networkId: 12345,
|
|
22
|
+
floor: 0.5
|
|
23
|
+
}
|
|
24
|
+
}]
|
|
25
|
+
},{
|
|
26
|
+
code: 'your-slot_2-div', //use exactly the same code as your slot div id.
|
|
27
|
+
sizes: [[600, 800]],
|
|
28
|
+
bids: [{
|
|
29
|
+
bidder: 'admatic',
|
|
30
|
+
params: {
|
|
31
|
+
networkId: 12345,
|
|
32
|
+
floor: 0.5
|
|
33
|
+
}
|
|
34
|
+
}]
|
|
35
|
+
}];
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## UserSync example
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
pbjs.setConfig({
|
|
42
|
+
userSync: {
|
|
43
|
+
iframeEnabled: true,
|
|
44
|
+
syncEnabled: true,
|
|
45
|
+
syncDelay: 1
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
```
|
package/modules/amxBidAdapter.js
CHANGED
|
@@ -15,18 +15,7 @@ const VENDOR_ID = 25;
|
|
|
15
15
|
const PLACEHOLDER = '__PIXEL_ID__';
|
|
16
16
|
const UPS_ENDPOINT = `https://ups.analytics.yahoo.com/ups/${PLACEHOLDER}/fed`;
|
|
17
17
|
const OVERRIDE_OPT_OUT_KEY = 'connectIdOptOut';
|
|
18
|
-
|
|
19
|
-
function isEUConsentRequired(consentData) {
|
|
20
|
-
return !!(consentData && consentData.gdpr && consentData.gdpr.gdprApplies);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function userHasOptedOut() {
|
|
24
|
-
try {
|
|
25
|
-
return localStorage.getItem(OVERRIDE_OPT_OUT_KEY) === '1';
|
|
26
|
-
} catch {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
18
|
+
const INPUT_PARAM_KEYS = ['pixelId', 'he', 'puid'];
|
|
30
19
|
|
|
31
20
|
/** @type {Submodule} */
|
|
32
21
|
export const connectIdSubmodule = {
|
|
@@ -45,7 +34,7 @@ export const connectIdSubmodule = {
|
|
|
45
34
|
* @returns {{connectId: string} | undefined}
|
|
46
35
|
*/
|
|
47
36
|
decode(value) {
|
|
48
|
-
if (userHasOptedOut()) {
|
|
37
|
+
if (connectIdSubmodule.userHasOptedOut()) {
|
|
49
38
|
return undefined;
|
|
50
39
|
}
|
|
51
40
|
return (typeof value === 'object' && value.connectid)
|
|
@@ -59,27 +48,29 @@ export const connectIdSubmodule = {
|
|
|
59
48
|
* @returns {IdResponse|undefined}
|
|
60
49
|
*/
|
|
61
50
|
getId(config, consentData) {
|
|
62
|
-
if (userHasOptedOut()) {
|
|
51
|
+
if (connectIdSubmodule.userHasOptedOut()) {
|
|
63
52
|
return;
|
|
64
53
|
}
|
|
65
54
|
const params = config.params || {};
|
|
66
|
-
if (!params || typeof params.he !== 'string' ||
|
|
67
|
-
|
|
68
|
-
logError('The connectId submodule requires the \'
|
|
55
|
+
if (!params || (typeof params.he !== 'string' && typeof params.puid !== 'string') ||
|
|
56
|
+
(typeof params.pixelId === 'undefined' && typeof params.endpoint === 'undefined')) {
|
|
57
|
+
logError('The connectId submodule requires the \'pixelId\' and at least one of the \'he\' ' +
|
|
58
|
+
'or \'puid\' parameters to be defined.');
|
|
69
59
|
return;
|
|
70
60
|
}
|
|
71
61
|
|
|
72
62
|
const data = {
|
|
73
63
|
'1p': includes([1, '1', true], params['1p']) ? '1' : '0',
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
gdpr_consent: isEUConsentRequired(consentData) ? consentData.gdpr.consentString : '',
|
|
64
|
+
gdpr: connectIdSubmodule.isEUConsentRequired(consentData) ? '1' : '0',
|
|
65
|
+
gdpr_consent: connectIdSubmodule.isEUConsentRequired(consentData) ? consentData.gdpr.consentString : '',
|
|
77
66
|
us_privacy: consentData && consentData.uspConsent ? consentData.uspConsent : ''
|
|
78
67
|
};
|
|
79
68
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
69
|
+
INPUT_PARAM_KEYS.forEach(key => {
|
|
70
|
+
if (typeof params[key] != 'undefined') {
|
|
71
|
+
data[key] = params[key];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
83
74
|
|
|
84
75
|
const resp = function (callback) {
|
|
85
76
|
const callbacks = {
|
|
@@ -106,6 +97,28 @@ export const connectIdSubmodule = {
|
|
|
106
97
|
return {callback: resp};
|
|
107
98
|
},
|
|
108
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Utility function that returns a boolean flag indicating if the opporunity
|
|
102
|
+
* is subject to GDPR
|
|
103
|
+
* @returns {Boolean}
|
|
104
|
+
*/
|
|
105
|
+
isEUConsentRequired(consentData) {
|
|
106
|
+
return !!(consentData && consentData.gdpr && consentData.gdpr.gdprApplies);
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Utility function that returns a boolean flag indicating if the user
|
|
111
|
+
* has opeted out via the Yahoo easy-opt-out mechanism.
|
|
112
|
+
* @returns {Boolean}
|
|
113
|
+
*/
|
|
114
|
+
userHasOptedOut() {
|
|
115
|
+
try {
|
|
116
|
+
return localStorage.getItem(OVERRIDE_OPT_OUT_KEY) === '1';
|
|
117
|
+
} catch {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
|
|
109
122
|
/**
|
|
110
123
|
* Return the function used to perform XHR calls.
|
|
111
124
|
* Utilised for each of testing.
|
|
@@ -29,5 +29,6 @@ The below parameters apply only to the Yahoo ConnectID user ID Module.
|
|
|
29
29
|
| --- | --- | --- | --- | --- |
|
|
30
30
|
| name | Required | String | ID value for the Yahoo ConnectID module - `"connectId"` | `"connectId"` |
|
|
31
31
|
| params | Required | Object | Data for Yahoo ConnectID initialization. | |
|
|
32
|
-
| params.pixelId | Required | Number | The Yahoo supplied publisher specific pixel Id | `8976` |
|
|
33
|
-
| params.he |
|
|
32
|
+
| params.pixelId | Required | Number | The Yahoo supplied publisher specific pixel Id. | `8976` |
|
|
33
|
+
| params.he | Optional | String | The SHA-256 hashed user email address. One of either the `he` parameter or the `puid` parameter must be supplied. | `"529cb86de31e9547a712d9f380146e98bbd39beec"` |
|
|
34
|
+
| params.puid | Optional | String | The publisher-supplied user identifier. One of either the `he` parameter or the `puid` parameter must be supplied. | `"P-975484817"` |
|
|
@@ -10,7 +10,7 @@ import {ajax} from '../src/ajax.js';
|
|
|
10
10
|
import { submodule } from '../src/hook.js'
|
|
11
11
|
import { getStorageManager } from '../src/storageManager.js';
|
|
12
12
|
|
|
13
|
-
const GCID_EXPIRY =
|
|
13
|
+
const GCID_EXPIRY = 7;
|
|
14
14
|
const MODULE_NAME = 'growthCodeId';
|
|
15
15
|
const GC_DATA_KEY = '_gc_data';
|
|
16
16
|
const ENDPOINT_URL = 'https://p2.gcprivacy.com/v1/pb?'
|
|
@@ -24,11 +24,15 @@ export const storage = getStorageManager({ gvlid: undefined, moduleName: MODULE_
|
|
|
24
24
|
*/
|
|
25
25
|
export function readData(key) {
|
|
26
26
|
try {
|
|
27
|
+
let payload
|
|
28
|
+
if (storage.cookiesAreEnabled()) {
|
|
29
|
+
payload = tryParse(storage.getCookie(key))
|
|
30
|
+
}
|
|
27
31
|
if (storage.hasLocalStorage()) {
|
|
28
|
-
|
|
32
|
+
payload = tryParse(storage.getDataFromLocalStorage(key))
|
|
29
33
|
}
|
|
30
|
-
if (
|
|
31
|
-
return
|
|
34
|
+
if ((payload.expire_at !== undefined) && (payload.expire_at > (Date.now() / 1000))) {
|
|
35
|
+
return payload
|
|
32
36
|
}
|
|
33
37
|
} catch (error) {
|
|
34
38
|
logError(error);
|
|
@@ -122,7 +126,7 @@ export const growthCodeIdSubmodule = {
|
|
|
122
126
|
}
|
|
123
127
|
|
|
124
128
|
const resp = function(callback) {
|
|
125
|
-
let gcData =
|
|
129
|
+
let gcData = readData(GC_DATA_KEY);
|
|
126
130
|
if (gcData) {
|
|
127
131
|
callback(gcData);
|
|
128
132
|
} else {
|
|
@@ -294,6 +294,7 @@ function buildRequests(validBidRequests, bidderRequest) {
|
|
|
294
294
|
const gdprConsent = bidderRequest && bidderRequest.gdprConsent;
|
|
295
295
|
const uspConsent = bidderRequest && bidderRequest.uspConsent;
|
|
296
296
|
const timeout = config.getConfig('bidderTimeout');
|
|
297
|
+
const coppa = config.getConfig('coppa') === true ? 1 : 0;
|
|
297
298
|
const topWindowUrl = bidderRequest && bidderRequest.refererInfo && bidderRequest.refererInfo.page;
|
|
298
299
|
_each(validBidRequests, bidRequest => {
|
|
299
300
|
const {
|
|
@@ -386,6 +387,9 @@ function buildRequests(validBidRequests, bidderRequest) {
|
|
|
386
387
|
if (uspConsent) {
|
|
387
388
|
data.uspConsent = uspConsent;
|
|
388
389
|
}
|
|
390
|
+
if (coppa) {
|
|
391
|
+
data.coppa = coppa;
|
|
392
|
+
}
|
|
389
393
|
if (schain && schain.nodes) {
|
|
390
394
|
data.schain = _serializeSupplyChainObj(schain);
|
|
391
395
|
}
|