Skip to content

Commit 27e4541

Browse files
authored
Add meta.advertiserDomains for Prebid 5.0 (prebid#6978)
1 parent 0998fb4 commit 27e4541

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

modules/yieldlabBidAdapter.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ export const spec = {
114114
netRevenue: false,
115115
ttl: BID_RESPONSE_TTL_SEC,
116116
referrer: '',
117-
ad: `<script src="${ENDPOINT}/d/${matchedBid.id}/${bidRequest.params.supplyId}/?ts=${timestamp}${extId}${gdprApplies}${gdprConsent}"></script>`
117+
ad: `<script src="${ENDPOINT}/d/${matchedBid.id}/${bidRequest.params.supplyId}/?ts=${timestamp}${extId}${gdprApplies}${gdprConsent}"></script>`,
118+
meta: {
119+
advertiserDomains: (matchedBid.advertiser) ? matchedBid.advertiser : 'n/a'
120+
}
118121
}
119122

120123
if (isVideo(bidRequest, adType)) {

test/spec/modules/yieldlabBidAdapter_spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ describe('yieldlabBidAdapter', function () {
179179
expect(result[0].netRevenue).to.equal(false)
180180
expect(result[0].ttl).to.equal(300)
181181
expect(result[0].referrer).to.equal('')
182+
expect(result[0].meta.advertiserDomains).to.equal('yieldlab')
182183
expect(result[0].ad).to.include('<script src="https://ad.yieldlab.net/d/1111/2222/?ts=')
183184
expect(result[0].ad).to.include('&id=abc')
184185
})
@@ -210,6 +211,7 @@ describe('yieldlabBidAdapter', function () {
210211
expect(result[0].netRevenue).to.equal(false)
211212
expect(result[0].ttl).to.equal(300)
212213
expect(result[0].referrer).to.equal('')
214+
expect(result[0].meta.advertiserDomains).to.equal('yieldlab')
213215
expect(result[0].ad).to.include('<script src="https://ad.yieldlab.net/d/1111/2222/?ts=')
214216
expect(result[0].ad).to.include('&id=abc')
215217
})

0 commit comments

Comments
 (0)