Skip to content

Commit

Permalink
UOE-6240: Send gpt slot name in extension field (#151)
Browse files Browse the repository at this point in the history
* Tappx User Syncer + Site Update (prebid#1674)

Co-authored-by: ubuntu <ahernandez@tappx.com>
Co-authored-by: Albert Grandes <agrandes@tappx.com>

* 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 <vasyan.z@gmail.com>

* New Adapter: Pangle (prebid#1697)

Co-authored-by: hcai <caihengsheng@bytedance.com>

* 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 <artem.iholkin@smartyads.com>

* 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 <damien.dumas@adyoulike.com>

* 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 <gcarreongutierrez@vpn-10-75-11-243.nym2.appnexus.com>

* 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 <veronika.solovei@xandr.com>

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

Co-authored-by: Serhii Nahornyi <snahornyi@rubiconproject.com>

* 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 <bernhard.pickenbrock@smaato.com>

* 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 <gcarreongutierrez@Guss-MacBook-Pro.local>

* 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 <ahernandez@tappx.com>
Co-authored-by: Albert Grandes <agrandes@tappx.com>

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

Co-authored-by: steve-a-districtm <steve@districtm.net>

* 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 <przemyslaw.iwanczak@rtbhouse.com>

* 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 <mike.burns@indexexchange.com>

* 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

* Reverted Dmx default usersync url, Will add it in properties file

* Added DMX usersync url

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

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

* UOE-6240: Send gpt slot name in extension field

Co-authored-by: prebidtappx <77485538+prebidtappx@users.noreply.github.com>
Co-authored-by: ubuntu <ahernandez@tappx.com>
Co-authored-by: Albert Grandes <agrandes@tappx.com>
Co-authored-by: Jim Naumann <muncha@users.noreply.github.com>
Co-authored-by: onetag-dev <38786435+onetag-dev@users.noreply.github.com>
Co-authored-by: agilfix <agilfix@appnexus.com>
Co-authored-by: Scott Kay <noreply@syntaxnode.com>
Co-authored-by: epomrnd <epomrnd@users.noreply.github.com>
Co-authored-by: Vasyl Zarva <vasyan.z@gmail.com>
Co-authored-by: Hengsheng Cai <luke.hengshengcai@gmail.com>
Co-authored-by: hcai <caihengsheng@bytedance.com>
Co-authored-by: susyt <susan@fox.camp>
Co-authored-by: jxdeveloper1 <71084096+jxdeveloper1@users.noreply.github.com>
Co-authored-by: mobfxoHB <74364234+mobfxoHB@users.noreply.github.com>
Co-authored-by: mobfox <artem.iholkin@smartyads.com>
Co-authored-by: TheMediaGrid <44166371+TheMediaGrid@users.noreply.github.com>
Co-authored-by: faithnh <faithnh.stepmania.master@gmail.com>
Co-authored-by: hhhjort <31041505+hhhjort@users.noreply.github.com>
Co-authored-by: Aparna Rao <pr.aparna@gmail.com>
Co-authored-by: guiann <guillaume.andouard@adyoulike.com>
Co-authored-by: Damien Dumas <damien.dumas@adyoulike.com>
Co-authored-by: Jozef Bartek <31618107+jbartek25@users.noreply.github.com>
Co-authored-by: guscarreon <guscarreon@gmail.com>
Co-authored-by: Gus Carreon <gcarreongutierrez@vpn-10-75-11-243.nym2.appnexus.com>
Co-authored-by: Veronika Solovei <kalypsonika@gmail.com>
Co-authored-by: Veronika Solovei <veronika.solovei@xandr.com>
Co-authored-by: Serhii Nahornyi <sergiy3344@gmail.com>
Co-authored-by: Serhii Nahornyi <snahornyi@rubiconproject.com>
Co-authored-by: el-chuck <be.pickenbrock@gmail.com>
Co-authored-by: Bernhard Pickenbrock <bernhard.pickenbrock@smaato.com>
Co-authored-by: Gena <wertixvost@gmail.com>
Co-authored-by: Gus Carreon <gcarreongutierrez@Guss-MacBook-Pro.local>
Co-authored-by: bretg <bgorsline@gmail.com>
Co-authored-by: Steve Alliance <steve.alliance@gmail.com>
Co-authored-by: steve-a-districtm <steve@districtm.net>
Co-authored-by: Pavel Dunyashev <pasha.1992@mail.ru>
Co-authored-by: Benjamin <benjamin.chastanier@gmail.com>
Co-authored-by: Brian Sardo <1168933+bsardo@users.noreply.github.com>
Co-authored-by: Przemysław Iwańczak <36727380+piwanczak@users.noreply.github.com>
Co-authored-by: Przemyslaw Iwanczak <przemyslaw.iwanczak@rtbhouse.com>
Co-authored-by: Rok Sušnik <rokostik@gmail.com>
Co-authored-by: Rok Sušnik <rsusnik@outbrain.com>
Co-authored-by: ixjohnny <75964135+ixjohnny@users.noreply.github.com>
Co-authored-by: Michael Burns <mlb7687@users.noreply.github.com>
Co-authored-by: Mike Burns <mike.burns@indexexchange.com>
Co-authored-by: Laurentiu Badea <laurb9@users.noreply.github.com>
Co-authored-by: Arne Schulz <arne.schulz@otto.de>
Co-authored-by: adxcgcom <31470944+adxcgcom@users.noreply.github.com>
  • Loading branch information
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adapters/bidder.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ type ExtImpBidder struct {
//
// Bidder implementations may safely assume that this JSON has been validated by their
// static/bidder-params/{bidder}.json file.
Bidder json.RawMessage `json:"bidder"`
Bidder json.RawMessage `json:"bidder"`
Data *openrtb_ext.ExtData `json:"data,omitempty"`
}

func (r *RequestData) SetBasicAuth(username string, password string) {
Expand Down
7 changes: 7 additions & 0 deletions adapters/pubmatic/pubmatic.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const (
buyIdTargetingKey = "hb_buyid_pubmatic"
skAdnetworkKey = "skadn"
rewardKey = "reward"
ImpExtAdUnitKey = "dfp_ad_unit_code"
AdServerGAM = "gam"
)

type PubmaticAdapter struct {
Expand Down Expand Up @@ -631,6 +633,11 @@ func parseImpressionObject(imp *openrtb2.Imp, wrapExt *pubmaticWrapperExt, pubID
}
}

if bidderExt.Data != nil && bidderExt.Data.AdServer != nil &&
bidderExt.Data.AdServer.Name == AdServerGAM && bidderExt.Data.AdServer.AdSlot != "" {
impExtMap[ImpExtAdUnitKey] = bidderExt.Data.AdServer.AdSlot
}

if len(impExtMap) != 0 {
impExtBytes, err := json.Marshal(impExtMap)
if err == nil {
Expand Down
174 changes: 174 additions & 0 deletions adapters/pubmatic/pubmatictest/supplemental/gptSlotNameInImpExt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
{
"mockBidRequest": {
"id": "test-request-id",
"imp": [
{
"id": "test-imp-id",
"banner": {
"format": [
{
"w": 300,
"h": 250
}
]
},
"ext": {
"bidder": {
"adSlot": "AdTag_Div1@300x250",
"publisherId": "999",
"keywords": [
{
"key": "pmZoneID",
"value": [
"Zone1",
"Zone2"
]
},
{
"key": "preference",
"value": [
"sports",
"movies"
]
}
],
"wrapper": {
"version": 1,
"profile": 5123
}
},
"data": {
"adserver": {
"name": "gam",
"adslot": "/1111/home"
}
}
}
}
],
"device": {
"ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
},
"site": {
"id": "siteID",
"publisher": {
"id": "1234"
}
},
"ext": {
"prebid": {
"bidderparams": {
"wiid": "dwzafakjflan-tygannnvlla-mlljvj"
}
}
}
},
"httpCalls": [
{
"expectedRequest": {
"uri": "https://hbopenbid.pubmatic.com/translator?source=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
{
"id": "test-imp-id",
"tagid": "AdTag_Div1",
"banner": {
"format": [
{
"w": 300,
"h": 250
}
],
"h": 250,
"w": 300
},
"ext": {
"pmZoneID": "Zone1,Zone2",
"preference": "sports,movies",
"dfp_ad_unit_code": "/1111/home"
}
}
],
"device": {
"ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
},
"site": {
"id": "siteID",
"publisher": {
"id": "999"
}
},
"ext": {
"wrapper": {
"profile": 5123,
"version": 1,
"wiid": "dwzafakjflan-tygannnvlla-mlljvj"
}
}
}
},
"mockResponse": {
"status": 200,
"body": {
"id": "test-request-id",
"seatbid": [
{
"seat": "958",
"bid": [
{
"id": "7706636740145184841",
"impid": "test-imp-id",
"price": 0.500000,
"adid": "29681110",
"adm": "some-test-ad",
"adomain": [
"pubmatic.com"
],
"crid": "29681110",
"h": 250,
"w": 300,
"dealid": "test deal",
"ext": {
"dspid": 6,
"deal_channel": 1
}
}
]
}
],
"bidid": "5778926625248726496",
"cur": "USD"
}
}
}
],
"expectedBidResponses": [
{
"currency": "USD",
"bids": [
{
"bid": {
"id": "7706636740145184841",
"impid": "test-imp-id",
"price": 0.5,
"adid": "29681110",
"adm": "some-test-ad",
"adomain": [
"pubmatic.com"
],
"crid": "29681110",
"w": 300,
"h": 250,
"dealid": "test deal",
"ext": {
"dspid": 6,
"deal_channel": 1
}
},
"type": "banner"
}
]
}
]
}
9 changes: 9 additions & 0 deletions openrtb_ext/imp.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,12 @@ type ExtImpPrebid struct {
type ExtStoredRequest struct {
ID string `json:"id"`
}

type ExtData struct {
AdServer *ExtAdServer `json:"adserver"`
}

type ExtAdServer struct {
Name string `json:"name"`
AdSlot string `json:"adslot"`
}

0 comments on commit e400ec9

Please sign in to comment.