Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions adapters/insticator/insticator.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,8 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.R
b := &adapters.TypedBid{
Bid: &seatBid.Bid[i],
BidType: bidType,
BidMeta: getBidMeta(bid, bidType),
BidMeta: getBidMeta(bid, bidType, seatBid.Seat),
BidVideo: getBidVideo(bid, bidType),
Seat: openrtb_ext.BidderName(seatBid.Seat),
}
bidResponse.Bids = append(bidResponse.Bids, b)
}
Expand All @@ -251,9 +250,10 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.R
}

// getBidMeta extracts metadata from the bid for brand safety and reporting
func getBidMeta(bid *openrtb2.Bid, bidType openrtb_ext.BidType) *openrtb_ext.ExtBidPrebidMeta {
func getBidMeta(bid *openrtb2.Bid, bidType openrtb_ext.BidType, seat string) *openrtb_ext.ExtBidPrebidMeta {
meta := &openrtb_ext.ExtBidPrebidMeta{
MediaType: string(bidType),
Seat: seat,
}

if len(bid.ADomain) > 0 {
Expand Down
25 changes: 17 additions & 8 deletions adapters/insticator/insticatortest/exemplary/app-banner.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-ad",
"adomain": ["insticator.com"],
"cat": ["IAB1"],
"adomain": [
"insticator.com"
],
"cat": [
"IAB1"
],
"crid": "crid_10",
"h": 90,
"w": 728,
Expand Down Expand Up @@ -122,8 +126,12 @@
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-ad",
"adomain": ["insticator.com"],
"cat": ["IAB1"],
"adomain": [
"insticator.com"
],
"cat": [
"IAB1"
],
"crid": "crid_10",
"w": 728,
"h": 90,
Expand All @@ -135,14 +143,15 @@
}
},
"BidMeta": {
"advertiserDomains": ["insticator.com"],
"advertiserDomains": [
"insticator.com"
],
"mediaType": "banner",
"primaryCatId": "IAB1"
},
"type": "banner",
"seat": "insticator"
"type": "banner"
}
]
}
]
}
}
25 changes: 17 additions & 8 deletions adapters/insticator/insticatortest/exemplary/app-video.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,12 @@
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-vast-ad",
"adomain": ["insticator.com"],
"cat": ["IAB1-1"],
"adomain": [
"insticator.com"
],
"cat": [
"IAB1-1"
],
"dur": 30,
"mtype": 2,
"crid": "crid_10",
Expand Down Expand Up @@ -158,8 +162,12 @@
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-vast-ad",
"adomain": ["insticator.com"],
"cat": ["IAB1-1"],
"adomain": [
"insticator.com"
],
"cat": [
"IAB1-1"
],
"dur": 30,
"crid": "crid_10",
"w": 728,
Expand All @@ -172,18 +180,19 @@
}
},
"BidMeta": {
"advertiserDomains": ["insticator.com"],
"advertiserDomains": [
"insticator.com"
],
"mediaType": "video",
"primaryCatId": "IAB1-1"
},
"BidVideo": {
"duration": 30,
"primary_category": "IAB1-1"
},
"type": "video",
"seat": "insticator"
"type": "video"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,9 @@
"w": 728,
"h": 90
},
"type": "banner",
"seat": "insticator"
"type": "banner"
}
]
}
]
}
}
14 changes: 5 additions & 9 deletions adapters/insticator/insticatortest/exemplary/multi-imps.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@
}
}
},
"type": "banner",
"seat": "insticator"
"type": "banner"
},
{
"bid": {
Expand All @@ -326,8 +325,7 @@
}
}
},
"type": "banner",
"seat": "insticator"
"type": "banner"
},
{
"bid": {
Expand All @@ -344,8 +342,7 @@
}
}
},
"type": "banner",
"seat": "insticator"
"type": "banner"
}
]
},
Expand All @@ -367,10 +364,9 @@
}
}
},
"type": "banner",
"seat": "insticator"
"type": "banner"
}
]
}
]
}
}
25 changes: 17 additions & 8 deletions adapters/insticator/insticatortest/exemplary/site-banner.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-ad",
"adomain": ["insticator.com"],
"cat": ["IAB1"],
"adomain": [
"insticator.com"
],
"cat": [
"IAB1"
],
"crid": "crid_10",
"h": 90,
"w": 728,
Expand Down Expand Up @@ -136,8 +140,12 @@
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-ad",
"adomain": ["insticator.com"],
"cat": ["IAB1"],
"adomain": [
"insticator.com"
],
"cat": [
"IAB1"
],
"crid": "crid_10",
"w": 728,
"h": 90,
Expand All @@ -149,14 +157,15 @@
}
},
"BidMeta": {
"advertiserDomains": ["insticator.com"],
"advertiserDomains": [
"insticator.com"
],
"mediaType": "banner",
"primaryCatId": "IAB1"
},
"type": "banner",
"seat": "insticator"
"type": "banner"
}
]
}
]
}
}
25 changes: 17 additions & 8 deletions adapters/insticator/insticatortest/exemplary/site-video.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-vast-ad",
"adomain": ["insticator.com"],
"cat": ["IAB1-1"],
"adomain": [
"insticator.com"
],
"cat": [
"IAB1-1"
],
"dur": 30,
"mtype": 2,
"crid": "crid_10",
Expand Down Expand Up @@ -131,8 +135,12 @@
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-vast-ad",
"adomain": ["insticator.com"],
"cat": ["IAB1-1"],
"adomain": [
"insticator.com"
],
"cat": [
"IAB1-1"
],
"dur": 30,
"crid": "crid_10",
"w": 728,
Expand All @@ -145,18 +153,19 @@
}
},
"BidMeta": {
"advertiserDomains": ["insticator.com"],
"advertiserDomains": [
"insticator.com"
],
"mediaType": "video",
"primaryCatId": "IAB1-1"
},
"BidVideo": {
"duration": 30,
"primary_category": "IAB1-1"
},
"type": "video",
"seat": "insticator"
"type": "video"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,9 @@
}
}
},
"type": "banner",
"seat": "insticator"
"type": "banner"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,9 @@
}
}
},
"type": "banner",
"seat": "insticator"
"type": "banner"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,9 @@
}
}
},
"type": "video",
"seat": "insticator"
"type": "video"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,9 @@
}
}
},
"type": "banner",
"seat": "insticator"
"type": "banner"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,9 @@
}
}
},
"type": "banner",
"seat": "insticator"
"type": "banner"
}
]
}
]
}
}
Loading