Skip to content

Commit

Permalink
UOE-6319: Upgraded prebid-server to 0.157.0 (#156)
Browse files Browse the repository at this point in the history
* Default TCF1 GVL in anticipation of IAB no longer hosting the v1 GVL (prebid#1433)

* update to the latest go-gdpr release (prebid#1436)

* Video endpoint bid selection enhancements (prebid#1419)

Co-authored-by: Veronika Solovei <[email protected]>

* [WIP] Bid deduplication enhancement (prebid#1430)

Co-authored-by: Veronika Solovei <[email protected]>

* Refactor rate converter separating scheduler from converter logic to improve testability (prebid#1394)

* Fix TCF1 Fetcher Fallback (prebid#1438)

* Eplanning adapter: Get domain from page (prebid#1434)

* Fix no bid debug log (prebid#1375)

* Update the fallback GVL to last version (prebid#1440)

* Enable geo activation of GDPR flag (prebid#1427)

* Validate External Cache Host  (prebid#1422)

* first draft

* Little tweaks

* Scott's review part 1

* Scott's review corrections part 2

* Scotts refactor

* correction in config_test.go

* Correction and refactor

* Multiple return statements

* Test case refactor

Co-authored-by: Gus Carreon <[email protected]>
Co-authored-by: Gus Carreon <[email protected]>
Co-authored-by: Gus Carreon <[email protected]>

* Fixes bug (prebid#1448)

* Fixes bug

* shortens list

* Added adpod_id to request extension (prebid#1444)

* Added adpod_id to request -> ext -> appnexus and modified requests splitting based on pod

* Unit test fix

* Unit test fix

* Minor unit test fixes

* Code refactoring

* Minor code and unit tests refactoring

* Unit tests refactoring

Co-authored-by: Veronika Solovei <[email protected]>

* Adform adapter: additional targeting params added (prebid#1424)

* Fix minor error message spelling mistake "vastml" -> "vastxml" (prebid#1455)

* Fixing comment for usage of deal priority field (prebid#1451)

* moving docs to website repo (prebid#1443)

* Fix bid dedup (prebid#1456)

Co-authored-by: Veronika Solovei <[email protected]>

* consumable: Correct width and height reported in response. (prebid#1459)

Prebid Server now responds with the width and height specified in
the Bid Response from Consumable. Previously it would reuse the width
and height specified in the Bid Request. That older behaviour was
ported from an older version of the prebid.js adapter but is no longer
valid.

* Panics happen when left with zero length []Imp (prebid#1462)

* Add Scheme Option To External Cache URL (prebid#1460)

* Update gamma adapter (prebid#1447)

* Gamma SSP Adapter

* Add Gamma SSP server adapter

* increase coverage

* Fix conflict with base master

* Add check MediaType for Imp

* Implement  Multi Imps request

* Changes requested

* remove bad-request

* increase coverage

* Remove duplicate test file

* Update gamma.go

* Update gamma.go

* Update gamma.go

* Update config.go

Remove Gamma User Sync Url from config

* Gamma SSP Adapter

* Add Gamma SSP server adapter

* increase coverage

* Fix conflict with base master

* Add check MediaType for Imp

* Implement  Multi Imps request

* Changes requested

* remove bad-request

* increase coverage

* Remove duplicate test file

* Update gamma.go

* Update gamma.go

* update gamma adapter

* return nil when have No-Bid Signaling

* add missing-adm.json

* discard the bid that's missing adm

* discard the bid that's missing adm

* escape vast instead of encoded it

* expand test coverage

Co-authored-by: Easy Life <[email protected]>

* fix: avoid unexpected EOF on gz writer (prebid#1449)

* Smaato adapter: support for video mediaType (prebid#1463)

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

* Rubicon liveramp param (prebid#1466)

Add liveramp mapping to user.ext

should translate the "liveramp.com" id from the "user.ext.eids" array to "user.ext.liveramp_idl" as follows:

```
{
  "user": {
    "ext": {
      "eids": [{
        "source": 'liveramp.com',
        "uids": [{
          "id": "T7JiRRvsRAmh88"
        }]
      }]
    }
  }
}
```

 to XAPI:
```
{
  "user": {
    "ext": {
      "liveramp_idl": "T7JiRRvsRAmh88"
    }
  }
}
```

* Consolidate StoredRequest configs, add validation for all data types (prebid#1453)

* Fix Test TestEventChannel_OutputFormat (prebid#1468)

* Add ability to randomly generate source.TID if empty and set publisher.ID to resolved account ID (prebid#1439)

* Add support for Account configuration (PBID-727, prebid#1395) (prebid#1426)

* Minor changes to accounts test coverage (prebid#1475)

* Brightroll adapter - adding config support (prebid#1461)

* Refactor TCF 1/2 Vendor List Fetcher Tests (prebid#1441)

* Add validation checker for PRs and merges with github actions (prebid#1476)

* Cache refactor (prebid#1431)

Reason: Cache has Fetcher-like functionality to handle both requests and
imps at a time. Internally, it still uses two caches configured and searched
separately, causing some code repetition. Reusing this code to cache
other objects like accounts is not easy.

Keeping the req/imp repetition in fetcher and out of cache allows for a
reusable simpler cache, preserving existing fetcher functionality.

Changes in this set:

Cache is now a simple generic id->RawMessage store
fetcherWithCache handles the separate req and imp caches
ComposedCache handles single caches - but it does not appear to be used
Removed cache overlap tests since they do not apply now
Slightly less code

* Pass Through First Party Context Data (prebid#1479)

* Added new size 640x360 (Id: 198) (prebid#1490)

* Refactor: move getAccount to accounts package (from openrtb2) (prebid#1483)

* Fixed TCF2 Geo Only Enforcement (prebid#1492)

* New colossus adapter [Clean branch] (prebid#1495)

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

* New: InMobi Prebid Server Adapter (prebid#1489)

* Adding InMobi adapter

* code review feedback, also explicitly working with Imp[0], as we don't support multiple impressions

* less tolerant bidder params due to sneaky 1.13 -> 1.14+ change

* Revert "Added new size 640x360 (Id: 198) (prebid#1490)" (prebid#1501)

This reverts commit fa23f5c.

* CCPA Publisher No Sale Relationships (prebid#1465)

* Fix Merge Conflict (prebid#1502)

* Update conversant adapter for new prebid-server interface (prebid#1484)

* Implement returnCreative (prebid#1493)

* Working solution

* clean-up

* Test copy/paste error

Co-authored-by: Gus Carreon <[email protected]>
Co-authored-by: Gus Carreon <[email protected]>

* ConnectAd S2S Adapter (prebid#1505)

* between adapter (prebid#1437)

Co-authored-by: Alexey Elymanov <[email protected]>

* Invibes adapter (prebid#1469)

Co-authored-by: aurel.vasile <[email protected]>

* Refactor postgres event producer so it will run either the full or de… (prebid#1485)

* Refactor postgres event producer so it will run either the full or delta query periodically

* Minor cleanup, follow golang conventions, declare const slice, add test cases

* Remove comments

* Bidder Uniqueness Gatekeeping Test (prebid#1506)

* ucfunnel adapter update end point (prebid#1511)

* Refactor EEAC map to be more in line with the nonstandard publisher map (prebid#1514)

* Added bunch of new sizes (prebid#1516)

* New krushmedia bid adapter (prebid#1504)

* Invibes: Generic domainId parameter (prebid#1512)

* Smarty ads adapter (prebid#1500)

Co-authored-by: Kushneryk Pavlo <[email protected]>
Co-authored-by: user <[email protected]>

* Add vscode remote container development files (prebid#1481)

* First commit (prebid#1510)

Co-authored-by: Gus Carreon <[email protected]>

* Vtrack and event endpoints (prebid#1467)

* Rework pubstack module tests to remove race conditions (prebid#1522)

* Rework pubstack module tests to remove race conditions

* PR feedback

* Remove event count and add helper methods to assert events received on channel

* Updating smartadserver endpoint configuration. (prebid#1531)

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

* Add new size 500x1000 (ID: 548) (prebid#1536)

* Fix missing Request parameter for Adgeneration Adapter (prebid#1525)

* Fix endpoint url for TheMediaGrid Bid Adapter (prebid#1541)

* Add Account cache (prebid#1519)

* Add bidder name key support (prebid#1496)

* Simplifying exchange module: bidResponseExt gets built anyway (prebid#1518)

* first draft

* Scott's feedback

* stepping out real quick

* add cache errors to bidResponseExt before marshalling

* Removed vim's swp file

Co-authored-by: Gus Carreon <[email protected]>
Co-authored-by: Gus Carreon <[email protected]>
Co-authored-by: Gus Carreon <[email protected]>

* Correct GetCpmStringValue's second return value (prebid#1520)

* Add metrics to capture stored data fetch all/delta durations with fetch status (prebid#1515)

* Adds preferDeals support (prebid#1528)

* Emxd 3336 add app video ctv (prebid#1529)

* Adapter changes for app and video support

* adding ctv devicetype test case

* Adding whitespace

* Updates based on feedback from Prebid team

* protocol bug fix and testing

* Modifying test cases to accomodate new imp.ext field

* bidtype bug fix and additonal testcase for storeUrl

Co-authored-by: Rakesh Balakrishnan <[email protected]>
Co-authored-by: Dan Bogdan <[email protected]>

* Add http api for fetching accounts (prebid#1545)

* Add missing postgres cache init config validation

* Acuity ads adapter (prebid#1537)

Co-authored-by: Kushneryk Pavlo <[email protected]>

* Yieldmo app support in yaml file (prebid#1542)

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

* Add metrics for account cache (prebid#1543)

* [Invibes] remove user sync for invibes (prebid#1550)

* [invibes] new bidder stub

* [invibes] make request

* [invibes] bid request parameters

* [invibes] fix errors, add tests

* [invibes] new version of MakeBids

* cleaning code

* [invibes] production urls, isamp flag

* [invibes] fix parameters

* [invibes] new test parameter

* [invibes] change maintainer email

* [invibes] PR fixes

* [invibes] fix parameters test

* [invibes] refactor endpoint template and bidVersion

* [Invibes] fix tests

* [invibes] resolve PR

* [invibes] fix test

* [invibes] fix test

* [invibes] generic domainId parameter

* [invibes] remove invibes cookie sync

* [Invibes] comment missing Usersync

Co-authored-by: aurel.vasile <[email protected]>

* Add Support For imp.ext.prebid For DealTiers (prebid#1539)

* Add Support For imp.ext.prebid For DealTiers

* Remove Normalization

* Add Accounts to http cache events (prebid#1553)

* Fix JSON tests ignore expected message field (prebid#1450)

* NoBid version 1.0. Initial commit. (prebid#1547)

Co-authored-by: Reda Guermas <[email protected]>

* Added dealTierSatisfied parameters in exchange.pbsOrtbBid and openrtb_ext.ExtBidPrebid and dealPriority in openrtb_ext.ExtBidPrebid  (prebid#1558)

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

* Add client/AccountID support into Adoppler adapter. (prebid#1535)

* Optionally read IFA value and add it the the request url (Adhese) (prebid#1563)

* Add AMX RTB adapter (prebid#1549)

* update Datablocks usersync.go (prebid#1572)

* 33Across: Add video support in adapter (prebid#1557)

* SilverMob adapter (prebid#1561)

* SilverMob adapter

* Fixes andchanges according to notes in PR

* Remaining fixes:
multibids, expectedMakeRequestsErrors

* removed log

* removed log

* Multi-bid test

* Removed unnesesary block

Co-authored-by: Anton Nikityuk <[email protected]>

* Updated ePlanning GVL ID (prebid#1574)

* update adpone google vendor id (prebid#1577)

* ADtelligent gvlid (prebid#1581)

* Add account/ host GDPR enabled flags & account per request type GDPR enabled flags (prebid#1564)

* Add account level request type specific and general GDPR enabled flags

* Clean up test TestAccountLevelGDPREnabled

* Add host-level GDPR enabled flag

* Move account GDPR enable check as receiver method on accountGDPR

* Remove mapstructure annotations on account structs

* Minor test updates

* Re-add mapstructure annotations on account structs

* Change RequestType to IntegrationType and struct annotation formatting

* Update comment

* Update account IntegrationType comments

* Remove extra space in config/accounts.go via gofmt

* DMX Bidfloor fix (prebid#1579)

* adform bidder video bid response support (prebid#1573)

* Fix Beachfront JSON tests (prebid#1578)

* Add account CCPA enabled and per-request-type enabled flags (prebid#1566)

* Add account level request-type-specific and general CCPA enabled flags

* Remove mapstructure annotations on CCPA account structs and clean up CCPA tests

* Adjust account/host CCPA enabled flag logic to incorporate feedback on similar GDPR feature

* Add shared privacy policy account integration data structure

* Refactor EnabledForIntegrationType methods on account privacy objects

* Minor test refactor

* Simplify logic in EnabledForIntegrationType methods

* Refactored HoldAuction Arguments (prebid#1570)

* Fix bug in request.imp.ext Validation (prebid#1575)

* First draft

* Brian's reivew

* Removed leftover comments

Co-authored-by: Gus Carreon <[email protected]>

* Bugfix: default admin port is 6060 (prebid#1595)

* Add timestamp to analytics and response.ext.prebid.auctiontimestamp l… (prebid#1584)

* Added app capabilities to VerizonMedia adapter (prebid#1596)

Co-authored-by: oath-jac <[email protected]>

* New Adapter Initialization Framework (prebid#1532)

* Fix 33Across App Handling (prebid#1602)

* Fix adapter JSON tests to have the right test structure (prebid#1589)

* Fix JSON EMX Digital

* Fix JSON Brightroll

* Fix JSON Beintoo

* Fix JSON Gamoshi

* Fix JSON Kubient

* Fix JSON Marsmedia

* Fix JSON Nanointeractive

* Fix JSON Telaria

* Fix JSON valueimpression

* Fix JSON smartyads

* Fix JSON rhythmone

* Fix JSON krushmedia

* Fix JSON cpmstar

* Fix JSON acuityads

* Fix JSON avocet

* Rename wrongly named acuity ads test file

* Fix JSON gamma

* Add expected no bid responses

* Fixed indentation and asesome-markup

* Added usersync support to Between SSP adapter; Major fixes and refactor (prebid#1587)

Co-authored-by: Egor Skorokhodov <[email protected]>

* Removed Safari Metric (prebid#1571)

* Deepintent adapter (prebid#1524)

Co-authored-by: Sourabh Gandhe <[email protected]>

* update mobilefuse endpoint (prebid#1606)

Co-authored-by: Dan Barnett <[email protected]>

* Fix Missing Consumable Clock (prebid#1610)

* Remove Hook Scripts (prebid#1614)

* Add config gdpr.amp_exception deprecation warning (prebid#1612)

* Refactor Adapter Config To Its Own File (prebid#1608)

* RP adapter: use video placement parameter to set size ID (prebid#1607)

* Add a BidderRequest struct to hold bidder specific request info (prebid#1611)

* Add warning that gdpr checks will be skipped when gdpr.host_vendor_id… (prebid#1615)

* Add TLS Handshake connection metrics (prebid#1613)

* Improve GitHub Actions Validation (prebid#1590)

* Move SSL to Server directory (prebid#1625)

* Rename currencies to currency (prebid#1626)

* Deepintent: Params normalization (prebid#1617)

Co-authored-by: Sourabh Gandhe <[email protected]>

* Set Kubient email to [email protected] (prebid#1629)

* Rename pbsmetrics to metrics (prebid#1624)

* 33Across: Add support for multi-imp requests (prebid#1609)

* changed usersync endpoint (prebid#1631)

Co-authored-by: Sourabh Gandhe <[email protected]>

* Remove legacy GDPR AMP config flag used to prevent buyer ID scrub on AMP requests (prebid#1565)

* Updating contact info for adprime (prebid#1640)

* ucfunnel adapter update end point  (prebid#1639)

* New Adapter: Mobfox (prebid#1585)

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

* IX: Implement Bidder interface, update endpoint. (prebid#1569)

Co-authored-by: Index Exchange Prebid Team <[email protected]>

* Fix GDPR consent assumption when gdpr req signal is unambiguous and s… (prebid#1591)

* Fix GDPR consent assumption when gdpr req signal is unambiguous and set to 1 and consent string is blank

* Refactor TestAllowPersonalInfo to make it table-based and add empty consent string cases

* Update PersonalInfoAllowed to allow PI if the request indicates GDPR does not apply

* Update test descriptions

* Update default vendor permissions to only allow PI based on UserSyncIfAmbiguous if request GDPR signal is ambiguous

* Change GDPR request signal type name and other PR feedback code style changes

* Rename GDPR package signal constants and consolidate gdprEnforced and gdprEnabled variables

* Hoist GDPR signal/empty consent checks before vendor list check

* Rename gdpr to gdprSignal in Permissions interface and implementations

* Fix merge mistakes

* Update gdpr logic to set the gdpr signal when ambiguous according to the config flag

* Add userSyncIfAmbiguous to all test cases in TestAllowPersonalInfo

* Simplify TestAllowPersonalInfo

* Fix appnexus adapter not setting currency in the bid response (prebid#1642)

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

* Add Adot adapter (prebid#1605)

Co-authored-by: Aurélien Giudici <[email protected]>

* Refactor AMP Param Parsing (prebid#1627)

* Refactor AMP Param Parsing

* Added Tests

* Enforce GDPR privacy if there's an error parsing consent (prebid#1593)

* Enforce GDPR privacy if there's an error parsing consent

* Update test with consent string variables to improve readability

* Fix test typo

* Update test variable names to follow go conventions

* MediaFuse adapter (prebid#1635)

* MediaFuse alias

* Syncer and tests

* gvlid

* gvlid

* new mail

* New Adapter: Revcontent (prebid#1622)

* Fix Unruly Bidder Parmaters (prebid#1616)

* Implement EID Permissions (prebid#1633)

* Implement EID Permissions

* Idsync removal (prebid#1644)

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

* Audit beachfront tests and change some videoResponseType details (prebid#1638)

* Adding Events support in bid responses (prebid#1597)

* Fix Shared Memory Corruption In EMX_Digital (prebid#1646)

* Add gdpr.tcf1.fetch_gvl deprecation warning and update GVL subdomain (prebid#1660)

* Bubble up GDPR signal/consent errors while applying privacy policies (prebid#1651)

* Always sync when GDPR globally enabled and allow host cookie sync … (prebid#1656)

* Eplanning: new prioritization metric for adunit sizes (prebid#1648)

* Eplanning: new prioritization metric for adunit sizes

* removing IX's usersync default URL (prebid#1670)

Co-authored-by: Index Exchange Prebid Team <[email protected]>

* AMX Bid Adapter: Loop Variable Bug (prebid#1675)

* requestheaders: new parameter inside debug.httpcalls.<BIDDER> to log request header details (prebid#1659)

* Added support for logging requestheaders inside httpCalls.requestheaders

* Reverterd test case change

* Modified outgoing mock request for appnexus, to send some request header information.
Modified sample mock response such that ext.debug.httpcalls.appnexus.requestheaders will return the information of passed request headers

* Addressed code review comments given by SyntaxNode.
Also Moved RequestHeaders next to RequestBidy in openrtb_ext.ExtHttpCall

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

* Updating pulsepoint adapter (prebid#1663)

* Debug disable feature implementation: (prebid#1677)

Co-authored-by: Veronika Solovei <[email protected]>

* Always use fallback GVL for TCF1 (prebid#1657)

* Update TCF2 GVL subdomain and always use fallback GVL for TCF1

* Add config test coverage for invalid TCF1 FetchGVL and AMP Exception

* Delete obselete test

* Adform adapter: digitrust cleanup (prebid#1690)

* adform secure endpoint as default setting

* digitrust cleanup

* New Adapter: DecenterAds (prebid#1669)

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

* Handle empty consent string during cookie sync and setuid (prebid#1671)

* Handle empty consent string during cookie sync and setuid

* Remove todo comment

* Make auction test table driven and convert GDPR impl normalize method to pass by value

* Moved legacy auction endpoint signal parsing into its own method and removed unnecessary test cases

* Fix SignalParse method to return nil for error when raw signal is empty and other PR feedback

* Tappx User Syncer + Site Update (prebid#1674)

Co-authored-by: ubuntu <[email protected]>
Co-authored-by: Albert Grandes <[email protected]>

* Beachfront Additional tests (prebid#1679)

* added place holder files for all but a couple of the intended new tests. I need to grok what those couple mean before being able to name a file.

* This covers most of the suggested cases and a couple more that occured to me. I'll look at the couple that I held off on next.

* added the unmarshal tests and found a couple problems to address in the process.

* removed my __debug_bin. should be in gitignore.

* A bit of clean up and commenting. Bumped version number. Added __debug_bin to .gitignore. This is the debugging binary created by Visual Studio Code, or at least version 1.52.1.

* missed a bunch of version strings

* removed IP faker

* If IP is not included in an AdM request, an error is now thrown for the AdM imp instead of faking it. The AdM endpoint is the only one that requires an IP. Also, added several "no-ip" test cases.

* Whent back to the fake IP solution instead of the error. Removed most of the "no-ip" test cases, leaving one.

* changed ip in adm-video.json to not match the faker ip

* removed a debugging comment

* New Adapter: Onetag (prebid#1695)

* Pubmatic: Trimming publisher ID before passing (prebid#1685)

* Trimming publisher ID before passing

* Fix typos in nobid.json (prebid#1704)

* Fix Typo In Adform Bidder Params (prebid#1705)

* Don't Load GVL v1 for TCF2 (+ TCF1 Cleanup) (prebid#1693)

* Typo fix for connectad bidder params (prebid#1706)

* Typo fix for invibes bidder params (prebid#1707)

* Typo fix nanointeractive bidder params (prebid#1708)

* Isolate /info/bidders Data Model + Add Uses HTTPS Flag (prebid#1692)

* Initial Commit

* Merge Conflict Fixes

* Removed Unncessary JSON Attributes

* Removed Dev Notes

* Add Missing validateDefaultAliases Test

* Improved Reversed Test

* Remove Var Scope Confusion

* Proper Tests For Bidder Param Validator

* Removed Unused Test Setup

* New Adapter: Epom (prebid#1680)

Co-authored-by: Vasyl Zarva <[email protected]>

* New Adapter: Pangle (prebid#1697)

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

* Fix Merge Conflict (prebid#1714)

* GumGum: adds pubId and irisid properties/parameters (prebid#1664)

* adds pubId and irisid properties

* updates per naming convention & makes a video copy

* updates when to copy banner, adds Publisher fallback and multiformat request

* adds more json tests

* rename the json file to remove whitespaces

* Accommodate Apple iOS LMT bug (prebid#1718)

* New Adapter: jixie (prebid#1698)

* initial commit

* added notes file for temp use

* jixie adapter development work

* jixie adaptor development work: mainly the test json files but also the jixie usersync code

* added a test case with accountid. and cosmetic line changes in the banner*json test file

* updated the jixie user sync: the endpoint and some params stuf

* tks and fixing per comments on pull request 1698

* responding to guscarreon's comments:
-more checking in makerequest of the bidder params (added 2 more test jsons)
-removed blank lines, lines commented out
-test_params: a case with unit alone
-BadInput error

* responding to review. put condition on jixie unit string in the bidder-params/jixie.json file.
removed checking in jixie.go that has become unnecssary. removed unnec test cases.
updated params-test

* added one failed params test

* removed a function that I no longer call!

* renamed JixieAdapter to adapter

* removed bidfloor from jixie explicit ext params

* Fix Regs Nil Condition (prebid#1723)

* Mobfox: Add rout to adexcange (prebid#1702)

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

* New Adapter: TrustX (prebid#1726)

* New Adapter: UNICORN (prebid#1719)

* add bidder-info, bidder-params for UNICORN

* Add adapter

* Fixes GDPR bug about being overly strict on publisher restrictions (prebid#1730)

* 33Across: Updated exchange endpoint (prebid#1738)

* New Adapter: Adyoulike (prebid#1700)

Co-authored-by: Damien Dumas <[email protected]>

* Hoist GVL ID To Bidder Info (prebid#1721)

* Improve Digital adapter: add support for native ads (prebid#1746)

* Add Support For SkAdN + Refactor Split Imps (prebid#1741)

* No Longer Move bid.ext To bid.ext.bidder (prebid#1742)

* No Longer Move bid.ext To bid.ext.bidder

* Remove Similar Behavior From seatbid.ext

* Avoid Second Bid Copy

* Removed Unused seatbid.ext

* Typo fix: adyoulike bidder param debug description (prebid#1755)

* Aliases: Better Error Message For Disabled Bidder (prebid#1751)

* beachfront: Changes to support real 204 (prebid#1737)

* Fix race condition in 33across.go (prebid#1757)

Co-authored-by: Gus Carreon <[email protected]>

* Revert "Fix race condition in 33across.go (prebid#1757)" (prebid#1763)

This reverts commit bdf1e7b.

* Replace TravisCI With GitHub Actions (prebid#1754)

* Initial Commit

* Finished Configuration

* Remove TravisCI

* Remove TravisCI

* Fix Go Version Badge

* Correct Fix For Go Version Badge

* Removed Custom Config File Name

* Debug warnings (prebid#1724)

Co-authored-by: Veronika Solovei <[email protected]>

* Rubicon: Support sending segments to XAPI (prebid#1752)

Co-authored-by: Serhii Nahornyi <[email protected]>

* validateNativeContextTypes function test cases (prebid#1743)

* Applogy: Fix Shared Memory Overwriting (prebid#1758)

* Pubmatic: Fix Shared Memory Overwriting (prebid#1759)

* Beachfront: Fix Shared Memory Overwriting (prebid#1762)

* Fix race condition in Beachfront adapter

* Removed nil check and simplified

* FPD: Allow imp.ext.data To Passthrough To Adapters (prebid#1765)

* Smaato: Add support for app (prebid#1767)

Co-authored-by: Bernhard Pickenbrock <[email protected]>

* Update sync types (prebid#1770)

* 33across: Fix Shared Memory Overwriting (prebid#1764)

This reverts commit f7df258.

* Fix race condition in Yeahmobi adapter (prebid#1761)

Co-authored-by: Gus Carreon <[email protected]>

* Pubnative: Fix Shared Memory Overwriting (prebid#1760)

* Add request for registration (prebid#1780)

* Update OpenRTB Library (prebid#1733)

* Tappx changes - Backward compatible change of version (prebid#1777)

Co-authored-by: ubuntu <[email protected]>
Co-authored-by: Albert Grandes <[email protected]>

* DMX: Enforcing w and h in imp (prebid#1778)

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

* Remove Authorization Headers From Debug Response (prebid#1779)

* Hide Authorization Headers In Debug Response

* MakeExtHeaders Tests

* Add Empty Test

* Use http.Header Methods

* Updates From Code Review

* Fix Merge Conflict

* New Adapter: Bidmachine (prebid#1769)

* New Adapter: Criteo (prebid#1775)

* Fix shared memory issue when stripping authorization header from bid requests (prebid#1790)

* RTB House: update parameters (prebid#1785)

* update parameters required by RTB House adapter

* tabs to spaces

Co-authored-by: Przemyslaw Iwanczak <[email protected]>

* Generate seatbid[].bid[].ext.prebid.bidid (prebid#1772)

* Basic GDPR enforcement for specific publisher-vendors. (prebid#1782)

* New Adapter: Zemanta (prebid#1774)

* add zemanta adapter

* update openrtb package for zemanta

* fix loop iterator reference bug

* fix getMediaTypeForImp to match server behavior

* Zemanta: Rename Adapter To Outbrain (prebid#1797)

* Update openrtb library to v15 (prebid#1802)

* IX: Set bidVideo when category and duration is available (prebid#1794)

* Update IX defaults (prebid#1799)

Co-authored-by: Mike Burns <[email protected]>

* Update Adyoulike endpoint to hit production servers (prebid#1805)

* Openx: use bidfloor if set - prebid.js adapter behavior  (prebid#1795)

* [ORBIDDER] add gvlVendorID and set bid response currency (prebid#1798)

* New Adapter: ADXCG (prebid#1803)

* Update kidoz properties to type string (prebid#1808)

Remove definitions object from schema and define types and other parameters directly in properties objects to ensure compatibility with more downstream systems that use this schema.

* Update bidmachine properties to type string (prebid#1809)

Remove definitions object from schema and define types and other parameters directly in properties objects to ensure compatibility with more downstream systems that use this schema.

* transform native eventtrackers to imptrackers and jstracker (prebid#1811)

* TheMediaGrid: Added processing of imp[].ext.data (prebid#1807)

* Renaming package github.com/PubMatic-OpenWrap/openrtb to github.com/mxmCherry/openrtb

* Rename package github.com/PubMatic-OpenWrap/prebid-server to github.com/prebid/prebid-server

* UOE-6196: OpenWrap S2S: Remove adpod_id from AppNexus adapter

* Refactored code and fixed indentation

* Fixed indentation for json files

* Fixed indentation for json files

* Fixed import in adapters/gumgum/gumgum.go

* Reverted unwanted changes in test json files

* Fixed unwanted git merge changes

* Added missing field SkipDedup in ExtIncludeBrandCategory

* Added missing Bidder field in ExtBid type

* Exposing CookieSyncRequest for header-bidding

* Temporary path change for static folder

* Fixed static folder paths

* Fixed default value in config for usersync_if_ambiguous

* Fixed config after upgrade

* Updated router.go to uncomment defaultRequest validation

* Fixed path for accounts.filesystem.directorypath

* Fixed diff with OW

* Added DMX default usersync URL

* Adding changes missed for UOE-5114 during prebid-server upgrade

* Merged master

Co-authored-by: hhhjort <[email protected]>
Co-authored-by: Veronika Solovei <[email protected]>
Co-authored-by: Veronika Solovei <[email protected]>
Co-authored-by: Brian Sardo <[email protected]>
Co-authored-by: Scott Kay <[email protected]>
Co-authored-by: chino117 <[email protected]>
Co-authored-by: Cameron Rice <[email protected]>
Co-authored-by: guscarreon <[email protected]>
Co-authored-by: Gus Carreon <[email protected]>
Co-authored-by: Gus Carreon <[email protected]>
Co-authored-by: Gus Carreon <[email protected]>
Co-authored-by: Jurij Sinickij <[email protected]>
Co-authored-by: Rob Hazan <[email protected]>
Co-authored-by: bretg <[email protected]>
Co-authored-by: Daniel Cassidy <[email protected]>
Co-authored-by: GammaSSP <[email protected]>
Co-authored-by: Easy Life <[email protected]>
Co-authored-by: gpolaert <[email protected]>
Co-authored-by: Stephan Brosinski <[email protected]>
Co-authored-by: vikram <[email protected]>
Co-authored-by: Dmitriy <[email protected]>
Co-authored-by: Laurentiu Badea <[email protected]>
Co-authored-by: Mansi Nahar <[email protected]>
Co-authored-by: smithaammassamveettil <[email protected]>
Co-authored-by: hdeodhar <[email protected]>
Co-authored-by: Bill Newman <[email protected]>
Co-authored-by: Aiholkin <[email protected]>
Co-authored-by: Daniel Lawrence <[email protected]>
Co-authored-by: johnwier <[email protected]>
Co-authored-by: rtuschkany <[email protected]>
Co-authored-by: Alexey Elymanov <[email protected]>
Co-authored-by: Alexey Elymanov <[email protected]>
Co-authored-by: invibes <[email protected]>
Co-authored-by: aurel.vasile <[email protected]>
Co-authored-by: ucfunnel <[email protected]>
Co-authored-by: Krushmedia <[email protected]>
Co-authored-by: Kushneryk Pavel <[email protected]>
Co-authored-by: Kushneryk Pavlo <[email protected]>
Co-authored-by: user <[email protected]>
Co-authored-by: Gus Carreon <[email protected]>
Co-authored-by: Daniel Barrigas <[email protected]>
Co-authored-by: tadam75 <[email protected]>
Co-authored-by: tadam <[email protected]>
Co-authored-by: Andrea Cannuni <[email protected]>
Co-authored-by: Ad Generation <[email protected]>
Co-authored-by: TheMediaGrid <[email protected]>
Co-authored-by: Gus Carreon <[email protected]>
Co-authored-by: Dan Bogdan <[email protected]>
Co-authored-by: Rakesh Balakrishnan <[email protected]>
Co-authored-by: Dan Bogdan <[email protected]>
Co-authored-by: AcuityAdsIntegrations <[email protected]>
Co-authored-by: Winston-Yieldmo <[email protected]>
Co-authored-by: Winston <[email protected]>
Co-authored-by: redaguermas <[email protected]>
Co-authored-by: Reda Guermas <[email protected]>
Co-authored-by: ShriprasadM <[email protected]>
Co-authored-by: Shriprasad <[email protected]>
Co-authored-by: Viacheslav Chimishuk <[email protected]>
Co-authored-by: Sander <[email protected]>
Co-authored-by: Nick Jacob <[email protected]>
Co-authored-by: htang555 <[email protected]>
Co-authored-by: Aparna Rao <[email protected]>
Co-authored-by: silvermob <[email protected]>
Co-authored-by: Anton Nikityuk <[email protected]>
Co-authored-by: Seba Perez <[email protected]>
Co-authored-by: Sergio <[email protected]>
Co-authored-by: Gena <[email protected]>
Co-authored-by: Steve Alliance <[email protected]>
Co-authored-by: Peter Fröhlich <[email protected]>
Co-authored-by: oath-jac <[email protected]>
Co-authored-by: oath-jac <[email protected]>
Co-authored-by: egsk <[email protected]>
Co-authored-by: Egor Skorokhodov <[email protected]>
Co-authored-by: Sourabh Gandhe <[email protected]>
Co-authored-by: Sourabh Gandhe <[email protected]>
Co-authored-by: dtbarne <[email protected]>
Co-authored-by: Dan Barnett <[email protected]>
Co-authored-by: Serhii Nahornyi <[email protected]>
Co-authored-by: Marsel <[email protected]>
Co-authored-by: mobfxoHB <[email protected]>
Co-authored-by: Index Exchange 3 Prebid Team <[email protected]>
Co-authored-by: Index Exchange Prebid Team <[email protected]>
Co-authored-by: Giudici-a <[email protected]>
Co-authored-by: Aurélien Giudici <[email protected]>
Co-authored-by: jcamp-revc <[email protected]>
Co-authored-by: steve-a-districtm <[email protected]>
Co-authored-by: Steve Alliance <[email protected]>
Co-authored-by: Jim Naumann <[email protected]>
Co-authored-by: Anand Venkatraman <[email protected]>
Co-authored-by: Vladyslav Laktionov <[email protected]>
Co-authored-by: vlad <[email protected]>
Co-authored-by: prebidtappx <[email protected]>
Co-authored-by: ubuntu <[email protected]>
Co-authored-by: Albert Grandes <[email protected]>
Co-authored-by: onetag-dev <[email protected]>
Co-authored-by: agilfix <[email protected]>
Co-authored-by: epomrnd <[email protected]>
Co-authored-by: Vasyl Zarva <[email protected]>
Co-authored-by: Hengsheng Cai <[email protected]>
Co-authored-by: hcai <[email protected]>
Co-authored-by: susyt <[email protected]>
Co-authored-by: jxdeveloper1 <[email protected]>
Co-authored-by: faithnh <[email protected]>
Co-authored-by: guiann <[email protected]>
Co-authored-by: Damien Dumas <[email protected]>
Co-authored-by: Jozef Bartek <[email protected]>
Co-authored-by: Gus Carreon <[email protected]>
Co-authored-by: Serhii Nahornyi <[email protected]>
Co-authored-by: el-chuck <[email protected]>
Co-authored-by: Bernhard Pickenbrock <[email protected]>
Co-authored-by: Pavel Dunyashev <[email protected]>
Co-authored-by: Benjamin <[email protected]>
Co-authored-by: Przemysław Iwańczak <[email protected]>
Co-authored-by: Przemyslaw Iwanczak <[email protected]>
Co-authored-by: Rok Sušnik <[email protected]>
Co-authored-by: Rok Sušnik <[email protected]>
Co-authored-by: ixjohnny <[email protected]>
Co-authored-by: Michael Burns <[email protected]>
Co-authored-by: Mike Burns <[email protected]>
Co-authored-by: Arne Schulz <[email protected]>
Co-authored-by: adxcgcom <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 14 changed files with 291 additions and 116 deletions.
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ type Configuration struct {
// When true, PBS will assign a randomly generated UUID to req.Source.TID if it is empty
AutoGenSourceTID bool `mapstructure:"auto_gen_source_tid"`
//When true, new bid id will be generated in seatbid[].bid[].ext.prebid.bidid and used in event urls instead
GenerateBidID bool `mapstructure:"generate_bid_id"`
GenerateBidID bool `mapstructure:"generate_bid_id"`
TrackerURL string `mapstructure:"tracker_url"`
}

const MIN_COOKIE_SIZE_BYTES = 500
Expand Down
48 changes: 43 additions & 5 deletions endpoints/events/vtrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/PubMatic-OpenWrap/etree"
"github.com/mxmCherry/openrtb/v15/openrtb2"
"github.com/prebid/prebid-server/openrtb_ext"
"io"
"io/ioutil"
"net/http"
"net/url"
"strings"
"time"

Expand Down Expand Up @@ -54,6 +58,40 @@ type CacheObject struct {
UUID string `json:"uuid"`
}

// standard VAST macros
// https://interactiveadvertisingbureau.github.io/vast/vast4macros/vast4-macros-latest.html#macro-spec-adcount
const (
VASTAdTypeMacro = "[ADTYPE]"
VASTAppBundleMacro = "[APPBUNDLE]"
VASTDomainMacro = "[DOMAIN]"
VASTPageURLMacro = "[PAGEURL]"

// PBS specific macros
PBSEventIDMacro = "[EVENT_ID]" // macro for injecting PBS defined video event tracker id
//[PBS-ACCOUNT] represents publisher id / account id
PBSAccountMacro = "[PBS-ACCOUNT]"
// [PBS-BIDDER] represents bidder name
PBSBidderMacro = "[PBS-BIDDER]"
// [PBS-BIDID] represents bid id. If auction.generate-bid-id config is on, then resolve with response.seatbid.bid.ext.prebid.bidid. Else replace with response.seatbid.bid.id
PBSBidIDMacro = "[PBS-BIDID]"
// [ADERVERTISER_NAME] represents advertiser name
PBSAdvertiserNameMacro = "[ADVERTISER_NAME]"
// Pass imp.tagId using this macro
PBSAdUnitIDMacro = "[AD_UNIT]"
)

var trackingEvents = []string{"start", "firstQuartile", "midpoint", "thirdQuartile", "complete"}

// PubMatic specific event IDs
// This will go in event-config once PreBid modular design is in place
var eventIDMap = map[string]string{
"start": "2",
"firstQuartile": "4",
"midpoint": "3",
"thirdQuartile": "5",
"complete": "6",
}

func NewVTrackEndpoint(cfg *config.Configuration, accounts stored_requests.AccountFetcher, cache prebid_cache_client.Client, bidderInfos config.BidderInfos) httprouter.Handle {
vte := &vtrackEndpoint{
Cfg: cfg,
Expand Down Expand Up @@ -313,7 +351,7 @@ func ModifyVastXmlJSON(externalUrl string, data json.RawMessage, bidid, bidder,

//InjectVideoEventTrackers injects the video tracking events
//Returns VAST xml contains as first argument. Second argument indicates whether the trackers are injected and last argument indicates if there is any error in injecting the trackers
func InjectVideoEventTrackers(trackerURL, vastXML string, bid *openrtb.Bid, bidder, accountID string, timestamp int64, bidRequest *openrtb.BidRequest) ([]byte, bool, error) {
func InjectVideoEventTrackers(trackerURL, vastXML string, bid *openrtb2.Bid, bidder, accountID string, timestamp int64, bidRequest *openrtb2.BidRequest) ([]byte, bool, error) {
// parse VAST
doc := etree.NewDocument()
err := doc.ReadFromString(vastXML)
Expand All @@ -325,7 +363,7 @@ func InjectVideoEventTrackers(trackerURL, vastXML string, bid *openrtb.Bid, bidd

//Maintaining BidRequest Impression Map (Copied from exchange.go#applyCategoryMapping)
//TODO: It should be optimized by forming once and reusing
impMap := make(map[string]*openrtb.Imp)
impMap := make(map[string]*openrtb2.Imp)
for i := range bidRequest.Imp {
impMap[bidRequest.Imp[i].ID] = &bidRequest.Imp[i]
}
Expand Down Expand Up @@ -354,9 +392,9 @@ func InjectVideoEventTrackers(trackerURL, vastXML string, bid *openrtb.Bid, bidd
// }

switch imp.Video.Linearity {
case openrtb.VideoLinearityLinearInStream:
case openrtb2.VideoLinearityLinearInStream:
creative.AddChild(doc.CreateElement("Linear"))
case openrtb.VideoLinearityNonLinearOverlay:
case openrtb2.VideoLinearityNonLinearOverlay:
creative.AddChild(doc.CreateElement("NonLinearAds"))
default: // create both type of creatives
creative.AddChild(doc.CreateElement("Linear"))
Expand Down Expand Up @@ -398,7 +436,7 @@ func InjectVideoEventTrackers(trackerURL, vastXML string, bid *openrtb.Bid, bidd
// firstQuartile, midpoint, thirdQuartile, complete
// If your company can not use [EVENT_ID] and has its own macro. provide config.TrackerMacros implementation
// and ensure that your macro is part of trackerURL configuration
func GetVideoEventTracking(trackerURL string, bid *openrtb.Bid, bidder string, accountId string, timestamp int64, req *openrtb.BidRequest, doc *etree.Document, impMap map[string]*openrtb.Imp) map[string]string {
func GetVideoEventTracking(trackerURL string, bid *openrtb2.Bid, bidder string, accountId string, timestamp int64, req *openrtb2.BidRequest, doc *etree.Document, impMap map[string]*openrtb2.Imp) map[string]string {
eventURLMap := make(map[string]string)
if "" == strings.TrimSpace(trackerURL) {
return eventURLMap
Expand Down
Loading

0 comments on commit 55b05aa

Please sign in to comment.