Skip to content

Commit

Permalink
Eng 6525 update to 4.31.0 (#109)
Browse files Browse the repository at this point in the history
* Increment pre version

* Fix astraoneBidAdapter (prebid#6230)

* Fix astraoneBidAdapter

* Fix examples; update astraoneBidAdapter description

* Fix astraoneBidAdapter_spec

* Remove integration examples

* Rename gbt to gpt

* update banner ttl (prebid#6228)

* browsi: updating test parameters (prebid#6048)

* SpotX Bid Adapter: default to 4/3 aspect ratio when response doesn't contain w or h (prebid#6159)

* Default to 4/3 aspect ratio when response doesn't contain w or h

* SpotX bid adapter: reorder tests and remove extra assertions

* Extended ID permissions supported by bidder (prebid#6112)

* User id bidder permission scheme

* styling

* prebidServer support

* -

* fix

* prebidServerBidAdapter take eidPermissions directly from userId module

* -

* unit tests

* -

* -

* update

* -

* -

* changed pbjs_bidders to pbjsBidders

* changed pbjsBidders to bidders
ext.prebid.data.eidPermissions to ext.prebid.data.eidpermissions

* rerun circleci

* rerun circleci

* omitting eidPermission entry if 'bidders' is not configured

Co-authored-by: myerkovich <[email protected]>
Co-authored-by: Marko Yerkovich <[email protected]>

* Relevant Yield analytics adapter (prebid#6195)

* Pubmatic:  fix issue where using an adUnit outstream renderer throws an error (prebid#6152)

* Malltv Bid Adapter : added data object as a param (prebid#6232)

* Updated malltv adapter

* Updated markdown

* Added test for malltvBidAdapter

* support setting coopSync in s2sConfig (prebid#6213)

Co-authored-by: Mark Monday <[email protected]>

* Revert "support setting coopSync in s2sConfig (prebid#6213)" (prebid#6249)

This reverts commit 25dd35c.

* pbsBidAdapter: change order of client syncs (prebid#6248)

* pbsBidAdapter: change order cookie_syncs

Prebid Server places cookie-sync URLs in a specific order. PBJS was pulling them off in reverse order.

* moving comment

* reverting coopSync

* pass a flag back to ID5 servers if abTesting was enabled by the publisher for monitoring usage of the feature (prebid#6170)

* appneuxs Bid Adapter - add support for identitylink userId (prebid#6245)

* Update britepoolIdSystem.md (prebid#6254)

Eliot from Britepool says you can set just the api key without any params (eg ssid or hash)

* UNICORN Adapter - accept multiple formats (prebid#6255)

* enable multiple formats
add version

* add banner w/h

* fix w/h & spec

* ATS-analytics - add comment clarifying ownership of atsAnalytics (prebid#6257)

* [ParrableIdSystem] Ensure base64 payload is url-safe (prebid#6258)

* Added url safe base64 encoding

* Added url safe base64 encoding test

Co-authored-by: Victor <[email protected]>

* Keywords + Screen resolution + CPU Core (prebid#6259)

Co-authored-by: sgimenez <[email protected]>

* Rubicon Analytics: Fire event once gptSlots render (prebid#6241)

* Once all gam slots are back fire event

* push to cmd queue

* New dimension for tracking name of the matching adUnit pattern (prebid#6252)

* Adhese Bid Adapter: Per adunit targets (prebid#6256)

* adpod category support test

* Revert "adpod category support test"

* Gjirafa Bid Adapter: added data object as a param (prebid#6231)

* Added data parameter to gjirafaBidAdapter

* Updated gjirafaBidAdapter markdown

* Added test for gjirafaBidAdapter

* Fix a TypeError when message event source is not available (prebid#6224)

* fix broken tests due to "encoded" base64 logic (prebid#6268)

* Adkernel Bid Adapter: stringads alias added (prebid#6262)

* Adkernel: stringads alias

* Revert "Extended ID permissions supported by bidder (prebid#6112)" (prebid#6269)

This reverts commit a926dee.

* Prebid 4.25.0 Release

* Increment pre version

* smartxBidAdapter: new Feature - Made Out-Stream Player configurable (prebid#6239)

* Add smartclipBidAdapter

* smartxBidAdapter.js - removed unused variables, removed debug, added window before the outstream related functions

* - made outstream player configurable

* remove wrong named files

* camelcase

* fix

Co-authored-by: smartclip AdTechnology <[email protected]>
Co-authored-by: Gino Cirlini <[email protected]>

* Idl1 (prebid#6242)

* Renaming idLibrary to idImportLibrary

* Renaming idLibrary to idImportLibrary

Co-authored-by: skocheri <[email protected]>

* Add the trade desk gvlid (prebid#6263)

UnifiedId only works with a vendor exception in the gdpr enforcement module.
However this is not okay as the unifiedId matching endpoint doesn't take the consent into account and
cookies are being dropped even without consent.

* pick up wrapper family detail (prebid#6272)

* Add user sync (prebid#6244)

* initial

* fix

* remove redundant language mod, use player sizes in video traff

* test modify

* fix

* Adding Tests

* add keywords param

* log

* log

* log

* fix

* add idl

* add idl

* fix test

* lint

* lint

* fix

* lint

* lint

* lint

* lint

* add sync

* fix

Co-authored-by: Aigolkin1991 <[email protected]>
Co-authored-by: Aiholkin <[email protected]>

* Zeotap id plus gvlid (prebid#6260)

* Add gvlid for ZeotapIdPlus module

* Pass gvlid and module name to storage manager

* add testcases to zeotapIdPlusIdSystem

* remove unwanted code

* adWMG adapter: add new parameter, fix minor bugs (prebid#6265)

* Support floorCPM parameter, fix some minor bugs

* fix space-in-parens circleci error

* example fix

* clean usersync URL

* spaces

* spaces

* add new unit tests, compatibility with IE11

* remove logInfo

Co-authored-by: Mikhail Dykun <[email protected]>

* [ParrableIdSystem] Supply iframe state to backend (prebid#6278)

* Add iframe detection

* Remove forgotten .only

Co-authored-by: Victor <[email protected]>

* Bid Viewability Module (prebid#6206)

* introducing a new event, bidViewable

* new module: bidViewability

* details in bidViewability.md

* disable webdriver tests in trionBidAdapter spec (prebid#6280)

* [ParrableIdSystem] Supply Prebid library version to backend (prebid#6279)

* Add prebid version to data object

* Renamed prebid to prebidVersion

* Fix missing coma

Co-authored-by: Victor <[email protected]>

* [ParrableIdSystem] Accept list of partners as an array or string (prebid#6277)

* Accept partners as an array and fallthrough partner if no partners

* Ensure that Parrable data object decodes with urlsafe base64 in tests

* Fixed tests caused by typo in config property

* Fix failing test due to accessing unexisting property 'partner'

Co-authored-by: Victor <[email protected]>

* Rubicon Bid Adapter FPD Update (prebid#6122)

* Update to consolidate applying FPD to both banner and video requests. FPD will be merged using global defined FPD, ad unit FPD, and rubicon bidder param FPD. Validation logic with warning logs added

* Refectored last push to:
1) Correct keywords bug
2) Revise error which looked for FPD in (user/context).ext.data as opposed to (user/context).data
3) General code cleanup

* Consolidated other FPD data logic into new function

* 1. Update to move pbadslot and adserver data into imp[] as opposed to parent.
2. Update to convert keywords passed through RP params to string if array found

* Removed unnecessary conditional

* Changed conditional to check for undefined type

* Update to consolidate several lines of duplicate code into one location

* ID5 User Id Module: update a/b testing to be user based not request based (prebid#6281)

* convert A/B testing to be user-based, rather than request-based

* update docs to say a/b testing is user based, not request based

* Shared ID gdpr support (prebid#6275)

* SharedId gdpr support

* Reverted commented locally failing tests

* Lemma:set mediaType key value (prebid#6006)

* lemmaBidAdapter.js

Added lemma bid adapter file

* lemmaBidAdapter.md

Added lemma bid adapter md file

* lemmaBidAdapter_spec.js

Added lemma bid adapter test spec file

* Update lemmaBidAdapter.js

Fixed automated code review alert comparison between inconvertible types

* Update lemmaBidAdapter.js

Fixed review changes

* Update lemmaBidAdapter.md

Correct parameter value.

* Update lemmaBidAdapter.js

Lemma Bid Adapter - v3.0 compliance

* Update lemmaBidAdapter_spec.js

Lemma Bid Adapter - v3.0 compliance

* Update lemmaBidAdapter.md

Lemma Bid Adapter - v3.0 compliance

* Update lemmaBidAdapter.js

Added user sync support into bid adapter.

* updated include modules file extension.

updated include modules js file extension.

* Update lemmaBidAdapter_spec.js

Added unit test for user sync feature.

* Update lemmaBidAdapter.js

Fixed format error.

* Update lemmaBidAdapter_spec.js

Fixed format error and typo error.

* Set mediaType key value into bid object

Set mediaType key value into the bid object.

* Update lemmaBidAdapter.js

remove duplicate function

* Update lemmaBidAdapter.js

Remove non supported code.

* Update lemmaBidAdapter_spec.js

Remove GDPR test cases.

* added support for addtlConsent (prebid#6005)

Co-authored-by: Ix-Prebid-Support <[email protected]>

* Add bid adapter for Missena (prebid#6247)

* adds support for getFloor of video mediaTypes

* adds test for calling getFloor with correct mediaType

* checks that _getFloor converts string floors to float

* Add bid adapter for Missena

* Use publisher demo token in tests

* Add Missena global vendor ID to spec

* Use apiKey in the current bidRequest

* Add referer info to payload

Co-authored-by: Nick Llerandi <[email protected]>
Co-authored-by: Brandon Ling <[email protected]>
Co-authored-by: Brandon Ling <[email protected]>

* Gulp test file example added in readme (prebid#6287)

* Sharethrough: Add support for ID5, Shared ID, and Live Intent ID (prebid#6261)

* Update prebid adapter universal ids to include ID5, SharedID, and LiveIntent ID.

[#176447070](https://www.pivotaltracker.com/story/show/176447070)

Co-authored-by: Mathieu Pheulpin <[email protected]>

* Addressing review

[#176447070]

* Quick rewrite

[#176447070]

* Address ID5 review, forward linkType to adserver

* Reformatting SharedID to align with ID5

Co-authored-by: Mathieu Pheulpin <[email protected]>

* SmartAdServer Bid Adapter: image sync and noAd (prebid#6236)

* SIM-889 Now we have image based sync

* SIM-889 Added test to check noad and image sync

* SIM-889 Fixing indenting issues

* Add client Alias Adkernel (prebid#6291)

Adding "bcm" alias to Adkernel adapter

* [ParrableIdSystem] Add GVLID and handle TC Consent data (prebid#6283)

* Added GDPR support

* Remove forgotten .only

Co-authored-by: Victor <[email protected]>

* 4.26.0 release

* 4.27.0-pre

* Updated data mapping of winning bid and auction logs in pubxai analytics adapter (prebid#6285)

Co-authored-by: Phaneendra Hegde <[email protected]>

* Grid Bid Adapter: Added video protocols to the ad request (prebid#6299)

* Rubicon Bid Adapter: updated transactionId to auctionId for OpenRTB (prebid#6298)

* Fix for Issue 6117: Added Module Name in Build to Comments (prebid#6297)

* map tripleliftBidAdapter.js tl_source to bid.meta.mediaType (prebid#6303)

* Tappx Bid Adapter: new bidder adapter added (prebid#6233)

* ADD: tappx bid adapter

* FIX: replace .includes by .indexOf

* UPDATE: Expand the test coverage

* FIX: format spacing tests

* FIX: get auctionId from validBidRequests

* UPDATE: add bannerMediaType tablet sizes

* FIX: get timeout from bidderRequest.timeout

* UPDATE: replace the way to get the hostname

* UPDATE: adding  support multiple bid requests in a single call

* UPDATE: remove hardcoded test payload param

Co-authored-by: marc_tappx <[email protected]>

* Add Native ad capability to AdYouLike adapter (prebid#6198)

* Remove useless bidderCode in bid response

* send all the available sizes in the bid request

* Use the banner sizes if given

* avoid compatibility issue with old bid format

* ad iframe and publisher domain paramters to bid requests

* add publisher domain info in ad request

* add a check in unit tests for publisherDomain

* encode uri components

* add native assets support

* add native information to ad request

* fix native ad parsing

* fix nativ condition to set mediatype

* fix image access and add trackers

* fix and add unit test on native ad

* update md file

* remove usage of URLSearchParams

* allox pure native ad with no adm provided

Co-authored-by: Guillaume <[email protected]>

* Update targeting.js to fix TTL buffer arithmetic (prebid#6300)

* Permutive RTD submodule (prebid#6290)

* Add Permutive RTD module

* set demo data in LS for test page

* fix linter issues

* reduce timeout on example page

* decrease sample timeouts

* rename targeting to segments

* Adtelligent Bid Adapter: Add Navelix as alias (prebid#6306)

* Navelix bidder

* gvlID

* Pubmatic add warning for non-string adSlots (prebid#6304)

* add warning for non-string adSlots

- and update the markdown file to say they should be strings

* be more specific in explanatory comment

* Update ttl outstream (prebid#6253)

* adding DMX

test @97%, two files added one updated

* Update districtm_spec.js

* Update districtmDMX.js

* adding all districtm needed file

* remove legacy file

* remove typo || 0 in the test method

* force default to return a valid width and height

* update unit test code for failing test

* changed class for an object

* remove package-lock.json

* change file name for dmx adapter

* renamed files

* restaure package-lock.json

* update to last package-lock state

* update gdpr user consent

* fix sizes issue

* Documentation updates

Adding the readme.md info

* update file name and update unit testing import file location

* current machine state

* lint correction

* remove variable assigment duplicate

* adding CCPA support for DMX

* adding test for ccpa and gdpr

* districtm dmx adding deal id field

* idsync support ccpa & gdpr

* merge forked

* stop mediatype changing ttl

* remove lint error

* adding gvlid for dmx

* removing change

Removing change from on commit PR file package-lock.json

* update file 

Removing comments on DMX adapter

* Revert "removing change"

This reverts commit e4bbbe5

* adding aliases base on ticket prebid#6294

* update file 

Removing comments on DMX adapter

* fix error for issue prebid#6294

* file removal from PR

Co-authored-by: Steve Alliance <[email protected]>
Co-authored-by: Luis <[email protected]>
Co-authored-by: Steve Alliance <[email protected]>
Co-authored-by: Steve Alliance <[email protected]>
Co-authored-by: steve-a-districtm <[email protected]>
Co-authored-by: Steve Alliance <[email protected]>

* [ParrableIdSystem] Accept lowercase timezone names in timezone filter (prebid#6282)

* Add lower case comparison for allowedZones

* Lowercase blocked zones also

* Fixed timezone lowercase tests

* Handle IE missing timeZone field

* Improve lowercase timezone comparison

Co-authored-by: Victor <[email protected]>

* Added new size - Id 550 (980x480) (prebid#6311)

* Revert "Rubicon Bid Adapter: updated transactionId to auctionId for OpenRTB (prebid#6298)" (prebid#6314)

This reverts commit f672209.

* Rubicon: adding size 300x200 (prebid#6315)

* added prebid version support to ixdiag (prebid#6292)

* Extended ID permissions supported by bidder (prebid#6276)

* User id bidder permission scheme

* styling

* prebidServer support

* -

* fix

* prebidServerBidAdapter take eidPermissions directly from userId module

* -

* unit tests

* -

* -

* update

* -

* -

* changed pbjs_bidders to pbjsBidders

* changed pbjsBidders to bidders
ext.prebid.data.eidPermissions to ext.prebid.data.eidpermissions

* rerun circleci

* rerun circleci

* omitting eidPermission entry if 'bidders' is not configured

* fixed 'calling the PBS adapter without any defined userId modules causes an exception'

* proposal

* rerun circleci

* utils implementation

* comment

* revert import validation

Co-authored-by: myerkovich <[email protected]>
Co-authored-by: Marko Yerkovich <[email protected]>
Co-authored-by: Marko Yerkovich <[email protected]>

* new bid adapter: Logain (prebid#6312)

Co-authored-by: Aiholkin <[email protected]>

* Change URL in Tapad Id Submodule (prebid#6318)

* IndexExchange Bid Adapter: Added support for netID, ID+ and FabrickId userId (prebid#6286)

* added more userID partner support for IX adapter - TDID, LI, NetID, Neustar, Zeotap

* removed liveintent and adsrvr.org [DNA-5040]

* updated neustar id

* fixed fabrickid

* frabrickId instead of id

* added more userID partner support for IX adapter - NetID, Neustar, Zeotap (#1)

* added more userID partner support for IX adapter - TDID, LI, NetID, Neustar, Zeotap

* added tests

* added tests for new userinfo modules

* missed a few checks

* Dna 5040 ix userid support (#2)

* added more userID partner support for IX adapter - TDID, LI, NetID, Neustar, Zeotap

* removed liveintent and adsrvr.org [DNA-5040]

* updated neustar id

* fixed fabrickid

* frabrickId instead of id

* added tests

* added tests for new userinfo modules

* missed a few checks

Co-authored-by: Ran Li <[email protected]>

* added few missing checks in IX adapter

* Use userIdAsEids instead of userId (#3)

* use eids, revert package-lock
* test update

Co-authored-by: Ran Li <[email protected]>
Co-authored-by: amykwyang <[email protected]>

* Prebid 4.27.0 Release

* increment pre version

* mediasquare fix userId (prebid#6321)

* Change the EU consent string parameter name to the company-wide standard (prebid#6320)

* adding support in pbsAdapter for getFloor (prebid#6273)

* AdHash Bidder Adapter: initial prebid.js integration (prebid#6274)

* PBJS Video Cache Update (prebid#6295)

* Support bidder aliasing by not using bid.bidder to retrieve configs (which are static anyway) (prebid#6313)

* Fabrick ID System : updates to _setReferrer and appending urls (prebid#6322)

* fabrickId updates

 - encode all url params
 - dedupe w/out queryString and keep the longest
 - additionally truncate from % if that ends up being the last (or next to last) char after truncation
 - truncate 1k instead of 200
 - don't send functions along in query (only send strings and numbers)

* attempting to fix ie failure - https://app.circleci.com/pipelines/github/prebid/Prebid.js/3945/workflows/4929a5c0-9e57-49e3-a6d8-29691560ca31/jobs/12086

* re-attempting to fix ie failure - https://app.circleci.com/pipelines/github/prebid/Prebid.js/3945/workflows/4929a5c0-9e57-49e3-a6d8-29691560ca31/jobs/12086

* re-attempting to fix ie failure - https://app.circleci.com/pipelines/github/prebid/Prebid.js/3945/workflows/4929a5c0-9e57-49e3-a6d8-29691560ca31/jobs/12086

* re-attempting to fix ie failure - https://app.circleci.com/pipelines/github/prebid/Prebid.js/3945/workflows/4929a5c0-9e57-49e3-a6d8-29691560ca31/jobs/12086

* re-attempting to fix ie failure - https://app.circleci.com/pipelines/github/prebid/Prebid.js/3945/workflows/4929a5c0-9e57-49e3-a6d8-29691560ca31/jobs/12086

* re-attempting to fix ie failure - https://app.circleci.com/pipelines/github/prebid/Prebid.js/3945/workflows/4929a5c0-9e57-49e3-a6d8-29691560ca31/jobs/12086

- attempting to add debugging so I can know what exactly is failing in ie (since I don't have a windows machine)

* found the issue having debugged locally - stubbing my error message is what killed me!

* not the right way to loop through a map

Co-authored-by: Anderson, Ben <[email protected]>

* Configureable option to delay auction event + fix bug with googletag init (prebid#6344)

* Adhese Bid Adapter: replace id5 with eid (prebid#6339)

* FID-287: Update Reconciliation RTD delivery id format (prebid#6343)

* Inskin Bid Adapter: send screen size in the ad call (prebid#6316)

* Ozone Bid Adapter: added or updated support for multiple modules (prebid#6324)

* ozone 2.5.0 adapter updates

* ozone 2.5.0 adapter - fixup for prebidCircleCI tests to remove object values on user.eid

Co-authored-by: Afsheen Bigdeli <[email protected]>

* Triplelift Bid Adapter: add PubCommon ID support (prebid#6352)

* Prebid 4.28.0 Release

* Increment pre version

* GMOSSP Bid Adapter :  add refererInfo from bidderRequest  (prebid#6319)

* Axonix Bid Adapter: add new bid adapter (prebid#6341)

* Add Axonix bid adapter

* Fixed tests

* Documentation: Prebid Server and Postbid integration example ( ad server-less ) (prebid#6348)

* Native: add custom data assets capability (prebid#6220)

Use `mediaTypes.native.ext: {}` special object to add/allow custom data. assets.

* iPROM adapter upload - adapter (prebid#6334)

Co-authored-by: Gašper Žagar <[email protected]>

* Ucfunnel Bid Adapter: update currency parameter in ad response (prebid#6357)

* TheMediaGrid Bid Adapter: fix trouble with alias using (prebid#6363)

* Rubicon Analytics Adapter: pass along advertiserDomains (prebid#6356)

* Pass along advertiser domains!

* only send up to 10 adomains

* support setting coopSync in s2sConfig (prebid#6330)

* TrustX Bid Adapter: Fix alias error (prebid#6373)

* Adform Bid Adapter: add global targeting to the request query as parameter (prebid#6376)

Co-authored-by: Justas <[email protected]>

* Prebid 4.29.0 Release

* Increment pre version

* Gamoshi Bid Adapter: update adaptor aliases (prebid#6355)

* Marsmedia Bid Adapter: add support for viewability, floor price module, COPPA & CCPA (prebid#6337)

* Change publisherId to zoneId
Add gdpr
Add supply chain
Add video media type

* Remove comments

* Fix unit test coverage

* fix request id bug
add vastXml to video response

* Remove bid response default sizes

* Change endpoint url

* Add unit test for vastXml

* Change end point

* Remove trailing-space

* Add onBidWon function

* New adapter - videofy

* Marsmedia & Videofy - Add onTimeout onSetTargeting

* Create sendbeacon function

* - add viewability

* remove unnecessary utils.getWindowTop()

* fix bidderRequest matching for finding a renderer (prebid#6359)

* Seedtag Bid Adapter: add support for inArticle placement (prebid#6369)

* Fix: check mandatory video params

* Simplifying mediaType video existence check

* SQDTAR-42: onWonBid event (#2)

* Adding onBidWon handler.

* Adding nurl to bid.

* Adding nurl field to bid.

* Adding inArticle placement type to seedtag adapter. (#1)

Co-authored-by: Carlos Barreiro Mata <[email protected]>

* improve robustness on OnEvent fields (prebid#6384)

* oneVideo Bid Adapter: remove adapter adId because of conflict with pbjs core (prebid#6382)

* updated object,str,num validations using pbjs utils

* validation if statements for content object

* validation if statements for content object

* updated contetn object validations using utils

* refractoring clean if statement

* fixing typos

* added todos

* added category string & data object validations

* fixed esling ENDPOINT issue

* updated content obj unit tests

* fixed cat & data validation

* fixed producer as object

* revert .includes() to .indexof() for IE

* reduced content obj params accoriding to ad-server support

* fixed typeOf typo

* fixed episode to Number

* gitignore

* restore gitignore

* removed unsupported params from md file

* reverted package & pagkage-lock

* fixed incorrect episdoe from str to num

* removed bid.adid setting from L97

* removed bid.adId setting

* updated adId test

* updated version to 3.0.6

* PBS Bid Adapter: add dchain (demand chain object) to prebid server adapter (prebid#6383)


* Update prebidServerBidAdapter_spec.js

* Update index.js

* Gulp Build: fix to populate modules list when gulp bundle is executed (prebid#6331)

* added support for pubcommon, digitrust, id5id

* added support for IdentityLink

* changed the source for id5

* added unit test cases

* changed source param for identityLink

* need to update modules list when gulp bundle is called

* added a comment

* Smartx Bid Adapter: updated out-stream render to support smartPlay 5.2 (prebid#6370)

* Add smartclipBidAdapter

* smartxBidAdapter.js - removed unused variables, removed debug, added window before the outstream related functions

* - made outstream player configurable

* remove wrong named files

* camelcase

* fix

* Out-Stream render update to SmartPlay 5.2

* ESlint fix

* ESlint fix

* ESlint fix

* adjust tests, fixes

* ESlint

Co-authored-by: smartclip AdTechnology <[email protected]>
Co-authored-by: Gino Cirlini <[email protected]>

* Fpd 2.0 Update (prebid#6293)

* Update to consolidate applying FPD to both banner and video requests. FPD will be merged using global defined FPD, ad unit FPD, and rubicon bidder param FPD. Validation logic with warning logs added

* Refectored last push to:
1) Correct keywords bug
2) Revise error which looked for FPD in (user/context).ext.data as opposed to (user/context).data
3) General code cleanup

* Consolidated other FPD data logic into new function

* 1. Update to move pbadslot and adserver data into imp[] as opposed to parent.
2. Update to convert keywords passed through RP params to string if array found

* Removed unnecessary conditional

* Changed conditional to check for undefined type

* FPD 2.0 Update
1) The setConfig and setBidderConfig functions support a transition period where they map the original 'fpd' config:
   - fpd.context.ATTR --> ortb2.site.ATTR
   - fpd.context.data.ATTR --> ortb2.site.ext.data
   - fpd.user.ATTR --> ortb2.user.ATTR
   - fpd.user.data.ATTR --> ortb2.user.ext.data
2) gptPreAuction:
   a) move adunit.fpd to adunit.ortb2
   b) adUnit.ortb2Imp.ext.data.adserver.{name, adSlot}
   c) pbAdSlot moves to AdUnit.ortb2Imp.ext.data.pbAdSlot

3) pbsBidAdapter
   a) merge the new ortb2 and AdUnit.ortb2Imp.ext objects into the OpenRTB JSON.
   b) therefore imp[].ext.context.data.pbadslot is now changed to imp[].ext.data.pbadslot (no context)
   c) read adUnit.ortb2Imp.ext.data.adserver from the new location. Output location is moved to imp[].ext.data.adserver (no context)

* FPD 2.0 Update
Update to adrelevantis adapter to look at config.ortb2 instead of config.fpd

* FPD 2.0 Update
Update to amx adapter to look at config.ortb2 instead of config.fpd

* FPD 2.0 Update
Update to avocet adapter to look at config.ortb2 instead of config.fpd

* FPD 2.0 Update
Update to criteo adapter to look at config.ortb2 instead of config.fpd

* Update to correct imp fpd structure

* Update to s2s adapter to coincide with imp fpd alteration

* Update to consolidate several lines of duplicate code into one location

* Slight modification for ortb2Imp to use ortb2Imp.ext as opposed to ortb2Imp.ext.data

* FPD 2.0 Update
Update to grid adapter to look at config.ortb2 instead of config.fpd

* FPD 2.0 Update
Update to inmar adapter to look at config.ortb2 instead of config.fpd

* FPD 2.0 Update
Update to luponmedia adapter to look at config.ortb2 instead of config.fpd

* FPD 2.0 Update
Update to smaato adapter to look at config.ortb2 instead of config.fpd

* FPD 2.0 Update
Update to triplelift adapter to look at config.ortb2 instead of config.fpd

* Update to gptPreAuction to move over to imp level ortb2

* FPD 2.0 Update
Update to triplelift adapter to look at config.ortb2 instead of config.fpd

* FPD 2.0 Update

* FPD 2.0 Update
Update to jwplayerRtd adapter to look at config.ortb2 instead of config.fpd

* FPD 2.0 Update
Update to admixer adapter to look at config.ortb2 instead of config.fpd

* FPD 2.0 Update
Update to rubicon adapter to look at config.ortb2 instead of config.fpd

* Update to fix keyword bug

* Added backwards compatibility functions for FPD both global/bidder and adunit level data

* Update to utilize new backward functionality for fpd 2.0

* Removed extra new line

* Update to include new backward functionality for FPD 2.0 data

* Update to utilize new backward functionality to pass FPD 2.0 data

* Update to utilize backward functionality to pass FPD 2.0 data

* Update to utilize backward functionality to pass FPD 2.0 data

* Update to utilize backward functionality to pass FPD 2.0 data

* Update to utilize backward functionality to pass FPD 2.0 data

* Update to utilize backward functionality to pass FPD 2.0 data

* Fixed typo in fpd config object location

* Uodate to utilize backward functionality to pass FPD 2.0 data

* Update to change all ortb2Imp.ext.data.adserver.adSlot references to ortb2Imp.ext.data.adserver.adslot - all lowercase. Corresponding adapter and unit tests to adhere to these changes

* Fixed typo

* Fixed typo

* FPD 2.0 update to rubicon adapter to pass iab values

* Updates:
1) Change function name
2) addAdUnits always pass array
3) Remove unecessary comment
4) Bug fix for ortb2.user.data to be filtered on legacy fpd conversion

* PBS Bid Adapter: fix s2s alias collision with built-in adapter aliasing (prebid#6379)

* fixed overwriting of aliases for s2s

* made change

* added fix

* Clean side-effect when checking that local storage is enabled (prebid#6323)

* updates docs and demo for fpd changes (prebid#6302)

Co-authored-by: karimJWP <[email protected]>

* Changed net revenue to True (prebid#6387)

* adagioBidAdapter: add Native support (prebid#6368)

* EIDS Support Update (prebid#6394)

* TheMediaGridNM Bid Adapter: fix trouble with alias (prebid#6371)

* Added TheMediaGridNM Bid Adapter

* Updated required params for TheMediaGridNM Bid Adapter

* Update TheMediGridNM Bid Adapter

* Fix tests for TheMediaGridNM Bid Adapter

* Fixes after review for TheMediaGridNM Bid Adapter

* Add support of multi-format in TheMediaGrid Bid Adapter

* Update sync url for grid and gridNM Bid Adapters

* TheMediaGrid Bid Adapter: added keywords adUnit parameter

* Update TheMediaGrid Bid Adapter to support keywords from config

* Implement new request format for TheMediaGrid Bid Adapter

* Fix jwpseg params for TheMediaGrid Bid Adapter

* Update unit tests for The Media Grid Bid Adapter

* Fix typo in TheMediaGrid Bid Adapter

* Added test for jwTargeting in TheMediaGrid Bid Adapter

* The new request format was made by default in TheMediaGrid Bid Adapter

* Update userId format in ad request for TheMediaGrid Bid Adapter

* Added bidFloor parameter for TheMediaGrid Bid Adapter

* Fix for review TheMediaGrid Bid Adapter

* Support floorModule in TheMediaGrid Bid Adapter

* Fix empty bidfloor for TheMediaGrid Bid Adapter

* Some change to restart autotests

* Fix userIds format for TheMediaGrid Bid Adapter

* Remove digitrust userId from TheMediaGrid Bid Adapter

* Protocols was added in video section in ad request for TheMediaGrid Bid Adapter

* TheMediaGrid: fix trouble with alias using

* TheMediaGridNM: fix trouble with alias

* Grab sourceAgnostic IDs first, then fallback to regular IDs (prebid#6400)

* Permutive - add AC support for TrustX (prebid#6393)

* SmartRTB Bid Adapter: add alias and update valid opts (prebid#6365)

* Add alias, update valid opts

* Update bidder tests

* Prebid 4.30.0 Release

* Increment pre version

* Sonobi Bid Adapter: send eids in bid request. (prebid#6364)

* unwrapping id5id uid. Added new eid param for user id modules

* set userid to new variable

* fixed spelling mistake in unit test

Co-authored-by: Scott Menzer <[email protected]>

* copying userid object so the referenced object does not get updated.

* using deepClone instead of spreading the top userId object

Co-authored-by: Scott Menzer <[email protected]>

* Apacdex Bid Adapter: userId module support, show demo ads in debug mode & other maintenance (prebid#6378)

* Upgrade and maintenance apacdexBidAdapter

* fix error and add unit test

* Novatiq ID System: add snowflake userId submodule (prebid#6350)

* Novatiq snowflake userId submodule

Novatiq snowflake userId submodule initial release

* change request updates

added novatiq info /modules/userId/userId.md
added novatiq info /modules/userId/eids.md
added novatiq eids /modules/userId/eids.js
added novatiq module in /modules/.submodules.json
removed unnecessary value from getId response

* Update novatiqIdSystem_spec.js

removed unnecessary srcid value

* Update novatiqIdSystem.md

Novatiq ID System: updated novatiq snowflake ID description

* Rise Bid Adapter: add session_id & is_wrapper params to adapter (prebid#6407)

* add new params to rise adapter

* add unit tests for isWrapper and sessionId adapter params

* IronSource Bid Adapter: add session_id & is_wrapper params to adapter (prebid#6408)

* add new params

* add unit tests for isWrapper and sessionId adapter params

* AMX Bid Adapter: add or update general adapter support and code refactoring (prebid#6403)

* AMX Bid adapter improvements

* fix eslint issues (breaking CI)

* VOX Bid adapter, Hybrid Bid adapter: fix global var name to avoid conflicts with astraOne adapter. (prebid#6416)

Co-authored-by: Petrov Denis <[email protected]>

* LiveIntent Id System: fix for parsing response twice  (prebid#6418)

* Don't parse response twice in LiveIntent Id submodule

* Update the liveintent module test to have the 204 response

* PBJS Core: use mediaType renderer when backupOnly and no bid.renderer (prebid#6419)

* use mediaType renderer when backupOnly and no bid.renderer

* check if necessary renderer properties are defined

* GumGum Bid Adapter: pass bidfloor currency in bidrequest (prebid#6391)

* adds support for zone and pubId params

* adds support for iriscat field

* sets mediatype depending on product id

* Update doc for mediaType needed for video products

* makes slot and invideo products avail for pubId

* updates gumgum doc

* lint

* adds missing comma in gumgum doc

* adds currency in ad request, adds unit test

* readd the previous irisid changes

* remove the only in testing

* Documentation: fixed a typo and sentence structure (prebid#6421)

* Bid Glass Bid Adapter: pass options in bid request (prebid#6424)

* Added bidglass adapter + test

* PR Review Updates:

- Added formal params to getUserSyncs function definition
- getUserSyncs now always returns an array
- Improved unit test coverage

* PR Review Updates:

- Removed unused methods: getUserSyncs, onTimeout, onBidWon,
onSetTargeting
- Removed getUserSyncs unit test
- Removed "dead code"
- Removed some unnecessary comments
- Fixed usage of parseInt

* Bid Glass Bid Adapter: pass options in bid request

* Spotx Bid Adapter: add publisher support for cache.ignoreBidderCacheKey (prebid#6413)

* Support ignoreBidderCacheKey in spotxBidAdapter

* Update spotxBidAdapter_spec.js

* Update spotxBidAdapter_spec.js

Co-authored-by: Nick Peceniak <[email protected]>

* update prebid adapter. Add at, ccpa, gdpr and coppa support (prebid#6405)

* Qwarry Bid Adapter: add referer detection  (prebid#6412)

* qwarry bid adapter

* formatting fixes

* fix tests for qwarry

* qwarry bid adapter

* add header for qwarry bid adapter

* bid requests fix

* fix tests

* response fix

* fix tests for Qwarry bid adapter

* add pos parameter to qwarry bid adapter

* qwarryBidAdapter onBidWon hotfix

* Change bidder endpoint url for Qwarry adapter

* add referer JS detection

* use bidderRequest.refererInfo

* fix tests

Co-authored-by: Artem Kostritsa <[email protected]>
Co-authored-by: Alexander Kascheev <[email protected]>

* Smartyads Bid Adapter: add coppa field from config (prebid#6402)

* update adapter. Add coppa field from config

* move stubs and restores for coppa tests

* PBS Bid Adapter: Fpd2.0 bug fix for first party data issue (prebid#6428)

* Bug fix for PBS data from FPD2.0 update: Merging request.site and request.user with site and user object in FPD.

* Prebid 4.31.0 Release

Co-authored-by: robertrmartinez <[email protected]>
Co-authored-by: Liza Kobrazova <[email protected]>
Co-authored-by: Steve Alliance <[email protected]>
Co-authored-by: bretg <[email protected]>
Co-authored-by: Amanda Dillon <[email protected]>
Co-authored-by: YerkovichM <[email protected]>
Co-authored-by: myerkovich <[email protected]>
Co-authored-by: Marko Yerkovich <[email protected]>
Co-authored-by: samuel-palmer-relevant-digital <[email protected]>
Co-authored-by: pm-shashank-jain <[email protected]>
Co-authored-by: ardit-baloku <[email protected]>
Co-authored-by: msm0504 <[email protected]>
Co-authored-by: Mark Monday <[email protected]>
Co-authored-by: Scott Menzer <[email protected]>
Co-authored-by: jsnellbaker <[email protected]>
Co-authored-by: Patrick McCann <[email protected]>
Co-authored-by: Kotaro Shikata <[email protected]>
Co-authored-by: mamatic <[email protected]>
Co-authored-by: Ian Flournoy <[email protected]>
Co-authored-by: Victor <[email protected]>
Co-authored-by: Rich Audience <[email protected]>
Co-authored-by: sgimenez <[email protected]>
Co-authored-by: mefjush <[email protected]>
Co-authored-by: Catalin Ciocov <[email protected]>
Co-authored-by: harpere <[email protected]>
Co-authored-by: Denis Logachov <[email protected]>
Co-authored-by: Eric Harper <[email protected]>
Co-authored-by: Skylinar <[email protected]>
Co-authored-by: smartclip AdTechnology <[email protected]>
Co-authored-by: Gino Cirlini <[email protected]>
Co-authored-by: SKOCHERI <[email protected]>
Co-authored-by: skocheri <[email protected]>
Co-authored-by: Nepomuk Seiler <[email protected]>
Co-authored-by: Adprime <[email protected]>
Co-authored-by: Aigolkin1991 <[email protected]>
Co-authored-by: Aiholkin <[email protected]>
Co-authored-by: shikharsharma-zeotap <[email protected]>
Co-authored-by: nyakove <[email protected]>
Co-authored-by: Mikhail Dykun <[email protected]>
Co-authored-by: Ian Flournoy <[email protected]>
Co-authored-by: Harshad Mane <[email protected]>
Co-authored-by: mmoschovas <[email protected]>
Co-authored-by: bjorn-lw <[email protected]>
Co-authored-by: Lemma Dev <[email protected]>
Co-authored-by: ix-certification <[email protected]>
Co-authored-by: Ix-Prebid-Support <[email protected]>
Co-authored-by: Missena <[email protected]>
Co-authored-by: Nick Llerandi <[email protected]>
Co-authored-by: Brandon Ling <[email protected]>
Co-authored-by: Brandon Ling <[email protected]>
Co-authored-by: Pooja Pasawala <[email protected]>
Co-authored-by: Mathieu Pheulpin <[email protected]>
Co-authored-by: lowendavid <[email protected]>
Co-authored-by: iskmerof <[email protected]>
Co-authored-by: Matt Kendall <[email protected]>
Co-authored-by: pnh-pubx <[email protected]>
Co-authored-by: Phaneendra Hegde <[email protected]>
Co-authored-by: TheMediaGrid <[email protected]>
Co-authored-by: prebidtappx <[email protected]>
Co-authored-by: marc_tappx <[email protected]>
Co-authored-by: guiann <[email protected]>
Co-authored-by: Guillaume <[email protected]>
Co-authored-by: David Reischer <[email protected]>
Co-authored-by: Gena <[email protected]>
Co-authored-by: jsut <[email protected]>
Co-authored-by: Steve Alliance <[email protected]>
Co-authored-by: Luis <[email protected]>
Co-authored-by: Steve Alliance <[email protected]>
Co-authored-by: Steve Alliance <[email protected]>
Co-authored-by: steve-a-districtm <[email protected]>
Co-authored-by: Steve Alliance <[email protected]>
Co-authored-by: Thomas Skaarnes Nikitin <[email protected]>
Co-authored-by: lksharma <[email protected]>
Co-authored-by: Marko Yerkovich <[email protected]>
Co-authored-by: WlsLogan <[email protected]>
Co-authored-by: Paweł Cejrowski <[email protected]>
Co-authored-by: li-ran <[email protected]>
Co-authored-by: Ran Li <[email protected]>
Co-authored-by: amykwyang <[email protected]>
Co-authored-by: Jason Snellbaker <[email protected]>
Co-authored-by: matthieularere-msq <[email protected]>
Co-authored-by: Samuel Adu <[email protected]>
Co-authored-by: Damyan <[email protected]>
Co-authored-by: Ben Anderson <[email protected]>
Co-authored-by: Anderson, Ben <[email protected]>
Co-authored-by: Vladimir Fedoseev <[email protected]>
Co-authored-by: afsheenb <[email protected]>
Co-authored-by: Afsheen Bigdeli <[email protected]>
Co-authored-by: nllerandi3lift <[email protected]>
Co-authored-by: Mike Chowla <[email protected]>
Co-authored-by: KazuakiM <[email protected]>
Co-authored-by: César Fernández <[email protected]>
Co-authored-by: ysfbsf <[email protected]>
Co-authored-by: Olivier <[email protected]>
Co-authored-by: iprom-adserver <[email protected]>
Co-authored-by: Gašper Žagar <[email protected]>
Co-authored-by: jackhsiehucf <[email protected]>
Co-authored-by: PWyrembak <[email protected]>
Co-authored-by: Justas Pupelis <[email protected]>
Co-authored-by: Justas <[email protected]>
Co-authored-by: Salomon Rada <[email protected]>
Co-authored-by: vladi-mmg <[email protected]>
Co-authored-by: JulieLorin <[email protected]>
Co-authored-by: Laura Morillo-Velarde <[email protected]>
Co-authored-by: Carlos Barreiro Mata <[email protected]>
Co-authored-by: Adam Browning <[email protected]>
Co-authored-by: Ryan Schweitzer <[email protected]>
Co-authored-by: Pierre Turpin <[email protected]>
Co-authored-by: Karim Mourra <[email protected]>
Co-authored-by: karimJWP <[email protected]>
Co-authored-by: pm-azhar-mulla <[email protected]>
Co-authored-by: rtuschkany <[email protected]>
Co-authored-by: evanmsmrtb <[email protected]>
Co-authored-by: JonGoSonobi <[email protected]>
Co-authored-by: Scott Menzer <[email protected]>
Co-authored-by: thuyhq <[email protected]>
Co-authored-by: novatiq <[email protected]>
Co-authored-by: lasloche <[email protected]>
Co-authored-by: Nick Jacob <[email protected]>
Co-authored-by: hybrid-ai <[email protected]>
Co-authored-by: Petrov Denis <[email protected]>
Co-authored-by: Yevhenii Melnyk <[email protected]>
Co-authored-by: Aleksa Trajkovic <[email protected]>
Co-authored-by: susyt <[email protected]>
Co-authored-by: Chris Huie <[email protected]>
Co-authored-by: Daniel Liebner <[email protected]>
Co-authored-by: Nick Peceniak <[email protected]>
Co-authored-by: Nick Peceniak <[email protected]>
Co-authored-by: BizzClick <[email protected]>
Co-authored-by: pro-nsk <[email protected]>
Co-authored-by: Artem Kostritsa <[email protected]>
Co-authored-by: Alexander Kascheev <[email protected]>
Co-authored-by: SmartyAdsSSP <[email protected]>
Co-authored-by: Alejandro Villanueva <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 94 changed files with 2,484 additions and 816 deletions.
8 changes: 7 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function makeWebpackPkg() {

const analyticsSources = helpers.getAnalyticsSources();
const moduleSources = helpers.getModulePaths(externalModules);
const modulesString = (externalModules.length > 0) ? externalModules.join(', ') : 'All available modules in current version.';
const modulesString = getModulesListToAddInBanner(externalModules);

return gulp.src([].concat(moduleSources, analyticsSources, 'src/prebid.js'))
.pipe(helpers.nameModules(externalModules))
Expand All @@ -167,6 +167,10 @@ function makeWebpackPkg() {
.pipe(gulp.dest('build/dist'));
}

function getModulesListToAddInBanner(modules){
return (modules.length > 0) ? modules.join(', ') : 'All available modules in current version.';
}

function gulpBundle(dev) {
return bundle(dev).pipe(gulp.dest('build/' + (dev ? 'dev' : 'dist')));
}
Expand Down Expand Up @@ -216,6 +220,8 @@ function bundle(dev, moduleArr) {
return gulp.src(
entries
)
// Need to uodate the "Modules: ..." section in comment with the current modules list
.pipe(replace(/(Modules: )(.*?)(\*\/)/, ('$1' + getModulesListToAddInBanner(helpers.getArgModules()) + ' $3')))
.pipe(gulpif(dev, sourcemaps.init({ loadMaps: true })))
.pipe(concat(outputFileName))
.pipe(gulpif(!argv.manualEnable, footer('\n<%= global %>.processQueue();', {
Expand Down
48 changes: 23 additions & 25 deletions integrationExamples/gpt/jwplayerRtdProvider_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,30 @@
var PREBID_TIMEOUT = 1000;

var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
fpd: {
context: {
data: {
jwTargeting: {
// Note: the following Ids are placeholders and should be replaced with your Ids.
playerID: '123',
mediaID: 'abc'
code: 'div-gpt-ad-1460505748561-0',
ortb2Imp: {
ext: {
data: {
jwTargeting: {
// Note: the following Ids are placeholders and should be replaced with your Ids.
playerID: '123',
mediaID: 'abc'
}
}
}
},
}
},

mediaTypes: {
banner: {
sizes: [[300, 250], [300,600]],
}
},
// Replace this object to test a new Adapter!
bids: [{
bidder: 'appnexus',
params: {
placementId: 13144370
}
}]

},
mediaTypes: {
banner: {
sizes: [[300, 250], [300,600]],
}
},
// Replace this object to test a new Adapter!
bids: [{
bidder: 'appnexus',
params: {
placementId: 13144370
}
}]
}];

var pbjs = pbjs || {};
Expand Down
19 changes: 14 additions & 5 deletions integrationExamples/gpt/permutiveRtdProvider_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
params: {
placementId: 13144370,
keywords: {
inline_kvs: ['1']
test_kv: ['true']
}
}
},
Expand All @@ -64,7 +64,7 @@
area: ['home']
},
visitor: {
inline_kvs: ['1']
test_kv: ['true']
}
}
},
Expand All @@ -78,12 +78,21 @@
{
settings: {},
targeting: {
inline_kvs: ['1', '2', '3', '4']
test_kv: ['true']
}
}
],
ozoneData: {}
}
},
{
bidder: 'trustx',
params: {
uid: 45,
keywords: {
test_kv: ['true']
}
}
}
]
},
Expand Down Expand Up @@ -127,13 +136,13 @@
pbjs.setConfig({
debug: true,
realTimeData: {
auctionDelay: 50, // maximum time for RTD modules to respond
auctionDelay: 80, // maximum time for RTD modules to respond
dataProviders: [
{
name: 'permutive',
waitForIt: true,
params: {
acBidders: ['appnexus', 'rubicon', 'ozone'],
acBidders: ['appnexus', 'rubicon', 'ozone', 'trustx'],
maxSegs: 500,
overwrites: {
rubicon: function (bid, data, acEnabled, utils, defaultFn) {
Expand Down
3 changes: 2 additions & 1 deletion modules/.submodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"fabrickIdSystem",
"verizonMediaIdSystem",
"pubProvidedIdSystem",
"tapadIdSystem"
"tapadIdSystem",
"novatiqIdSystem"
],
"adpod": [
"freeWheelAdserverVideo",
Expand Down
116 changes: 113 additions & 3 deletions modules/adagioBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import sha256 from 'crypto-js/sha256.js';
import { getStorageManager } from '../src/storageManager.js';
import { getRefererInfo } from '../src/refererDetection.js';
import { createEidsArray } from './userId/eids.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
import { Renderer } from '../src/Renderer.js';
import { OUTSTREAM } from '../src/video.js';

export const BIDDER_CODE = 'adagio';
export const LOG_PREFIX = 'Adagio:';
export const VERSION = '2.6.0';
export const VERSION = '2.7.0';
export const FEATURES_VERSION = '1';
export const ENDPOINT = 'https://mp.4dex.io/prebid';
export const SUPPORTED_MEDIA_TYPES = [BANNER, VIDEO];
export const SUPPORTED_MEDIA_TYPES = [BANNER, NATIVE, VIDEO];
export const ADAGIO_TAG_URL = 'https://script.4dex.io/localstore.js';
export const ADAGIO_LOCALSTORAGE_KEY = 'adagioScript';
export const GVLID = 617;
Expand Down Expand Up @@ -687,6 +687,112 @@ function _renderer(bid) {
});
}

function _parseNativeBidResponse(bid) {
if (!bid.admNative || !Array.isArray(bid.admNative.assets)) {
utils.logError(`${LOG_PREFIX} Invalid native response`);
return;
}

const native = {}

function addAssetDataValue(data) {
const map = {
1: 'sponsoredBy', // sponsored
2: 'body', // desc
3: 'rating',
4: 'likes',
5: 'downloads',
6: 'price',
7: 'salePrice',
8: 'phone',
9: 'address',
10: 'body2', // desc2
11: 'displayUrl',
12: 'cta'
}
if (map.hasOwnProperty(data.type) && typeof data.value === 'string') {
native[map[data.type]] = data.value;
}
}

// assets
bid.admNative.assets.forEach(asset => {
if (asset.title) {
native.title = asset.title.text
} else if (asset.data) {
addAssetDataValue(asset.data)
} else if (asset.img) {
switch (asset.img.type) {
case 1:
native.icon = {
url: asset.img.url,
width: asset.img.w,
height: asset.img.h
};
break;
default:
native.image = {
url: asset.img.url,
width: asset.img.w,
height: asset.img.h
};
break;
}
}
});

if (bid.admNative.link) {
if (bid.admNative.link.url) {
native.clickUrl = bid.admNative.link.url;
}
if (Array.isArray(bid.admNative.link.clickTrackers)) {
native.clickTrackers = bid.admNative.link.clickTrackers
}
}

if (Array.isArray(bid.admNative.eventtrackers)) {
native.impressionTrackers = [];
bid.admNative.eventtrackers.forEach(tracker => {
// Only Impression events are supported. Prebid does not support Viewability events yet.
if (tracker.event !== 1) {
return;
}

// methods:
// 1: image
// 2: js
// note: javascriptTrackers is a string. If there's more than one JS tracker in bid response, the last script will be used.
switch (tracker.method) {
case 1:
native.impressionTrackers.push(tracker.url);
break;
case 2:
native.javascriptTrackers = `<script src=\"${tracker.url}\"></script>`;
break;
}
});
} else {
native.impressionTrackers = Array.isArray(bid.admNative.imptrackers) ? bid.admNative.imptrackers : [];
if (bid.admNative.jstracker) {
native.javascriptTrackers = bid.admNative.jstracker;
}
}

if (bid.admNative.privacy) {
native.privacyLink = bid.admNative.privacy;
}

if (bid.admNative.ext) {
native.ext = {}

if (bid.admNative.ext.bvw) {
native.ext.adagio_bvw = bid.admNative.ext.bvw;
}
}

bid.native = native
}

export const spec = {
code: BIDDER_CODE,
gvlid: GVLID,
Expand Down Expand Up @@ -873,6 +979,10 @@ export const spec = {
}
}

if (bidObj.mediaType === NATIVE) {
_parseNativeBidResponse(bidObj);
}

bidObj.site = bidReq.params.site;
bidObj.placement = bidReq.params.placement;
bidObj.pagetype = bidReq.params.pagetype;
Expand Down
60 changes: 56 additions & 4 deletions modules/adagioBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Connects to Adagio demand source to fetch bids.
category: 'sport', // Recommended. Category of the content displayed in the page.
subcategory: 'handball', // Optional. Subcategory of the content displayed in the page.
postBid: false, // Optional. Use it in case of Post-bid integration only.
useAdUnitCodeAsAdUnitElementId: false // Optional. Use it by-pass adUnitElementId and use the adUnit code as value
useAdUnitCodeAsPlacement: false // Optional. Use it to by-pass placement and use the adUnit code as value
useAdUnitCodeAsAdUnitElementId: false, // Optional. Use it by-pass adUnitElementId and use the adUnit code as value
useAdUnitCodeAsPlacement: false, // Optional. Use it to by-pass placement and use the adUnit code as value
// Optional debug mode, used to get a bid response with expected cpm.
debug: {
enabled: true,
Expand Down Expand Up @@ -78,8 +78,8 @@ Connects to Adagio demand source to fetch bids.
category: 'sport', // Recommended. Category of the content displayed in the page.
subcategory: 'handball', // Optional. Subcategory of the content displayed in the page.
postBid: false, // Optional. Use it in case of Post-bid integration only.
useAdUnitCodeAsAdUnitElementId: false // Optional. Use it by-pass adUnitElementId and use the adUnit code as value
useAdUnitCodeAsPlacement: false // Optional. Use it to by-pass placement and use the adUnit code as value
useAdUnitCodeAsAdUnitElementId: false, // Optional. Use it by-pass adUnitElementId and use the adUnit code as value
useAdUnitCodeAsPlacement: false, // Optional. Use it to by-pass placement and use the adUnit code as value
video: {
skip: 0
// OpenRTB 2.5 video options defined here override ones defined in mediaTypes.
Expand All @@ -91,6 +91,58 @@ Connects to Adagio demand source to fetch bids.
}
}
}]
},
{
code: 'article_native',
mediaTypes: {
native: {
// generic Prebid options
title: {
required: true,
len: 80
},
//
// Custom Adagio data assets
ext: {
adagio_bvw: {
required: false
}
}
}
},
bids: [{
bidder: 'adagio', // Required
params: {
organizationId: '1002', // Required - Organization ID provided by Adagio.
site: 'adagio-io', // Required - Site Name provided by Adagio.
placement: 'in_article', // Required. Refers to the placement of an adunit in a page. Must not contain any information about the type of device. Other example: `mpu_btf'.
adUnitElementId: 'article_native', // Required - AdUnit element id. Refers to the adunit id in a page. Usually equals to the adunit code above.

// The following params are limited to 30 characters,
// and can only contain the following characters:
// - alphanumeric (A-Z+a-z+0-9, case-insensitive)
// - dashes `-`
// - underscores `_`
// Also, each param can have at most 50 unique active values (case-insensitive).
pagetype: 'article', // Highly recommended. The pagetype describes what kind of content will be present in the page.
environment: 'mobile', // Recommended. Environment where the page is displayed.
category: 'sport', // Recommended. Category of the content displayed in the page.
subcategory: 'handball', // Optional. Subcategory of the content displayed in the page.
postBid: false, // Optional. Use it in case of Post-bid integration only.
useAdUnitCodeAsAdUnitElementId: false, // Optional. Use it by-pass adUnitElementId and use the adUnit code as value
useAdUnitCodeAsPlacement: false, // Optional. Use it to by-pass placement and use the adUnit code as value
// Optional OpenRTB Native 1.2 request object. Only `context`, `plcmttype` fields are supported.
native: {
context: 1,
plcmttype: 2
},
// Optional debug mode, used to get a bid response with expected cpm.
debug: {
enabled: true,
cpm: 3.00 // default to 1.00
}
}
}]
}
];

Expand Down
8 changes: 6 additions & 2 deletions modules/admixerBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const spec = {
buildRequests: function (validRequest, bidderRequest) {
const payload = {
imps: [],
fpd: config.getConfig('fpd')
fpd: config.getLegacyFpd(config.getConfig('ortb2'))
};
let endpointUrl;
if (bidderRequest) {
Expand All @@ -42,7 +42,11 @@ export const spec = {
}
}
validRequest.forEach((bid) => {
payload.imps.push(bid);
let imp = {};
Object.keys(bid).forEach(key => {
(key === 'ortb2Imp') ? imp.fpd = config.getLegacyImpFpd(bid[key]) : imp[key] = bid[key];
});
payload.imps.push(imp);
});
const payloadString = JSON.stringify(payload);
return {
Expand Down
Loading

0 comments on commit ff04e08

Please sign in to comment.