Skip to content

Commit

Permalink
Add meta.advertiserDomains for Prebid 5.0 (prebid#6978)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkorean authored Jun 9, 2021
1 parent 0998fb4 commit 27e4541
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/yieldlabBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ export const spec = {
netRevenue: false,
ttl: BID_RESPONSE_TTL_SEC,
referrer: '',
ad: `<script src="${ENDPOINT}/d/${matchedBid.id}/${bidRequest.params.supplyId}/?ts=${timestamp}${extId}${gdprApplies}${gdprConsent}"></script>`
ad: `<script src="${ENDPOINT}/d/${matchedBid.id}/${bidRequest.params.supplyId}/?ts=${timestamp}${extId}${gdprApplies}${gdprConsent}"></script>`,
meta: {
advertiserDomains: (matchedBid.advertiser) ? matchedBid.advertiser : 'n/a'
}
}

if (isVideo(bidRequest, adType)) {
Expand Down
2 changes: 2 additions & 0 deletions test/spec/modules/yieldlabBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ describe('yieldlabBidAdapter', function () {
expect(result[0].netRevenue).to.equal(false)
expect(result[0].ttl).to.equal(300)
expect(result[0].referrer).to.equal('')
expect(result[0].meta.advertiserDomains).to.equal('yieldlab')
expect(result[0].ad).to.include('<script src="https://ad.yieldlab.net/d/1111/2222/?ts=')
expect(result[0].ad).to.include('&id=abc')
})
Expand Down Expand Up @@ -210,6 +211,7 @@ describe('yieldlabBidAdapter', function () {
expect(result[0].netRevenue).to.equal(false)
expect(result[0].ttl).to.equal(300)
expect(result[0].referrer).to.equal('')
expect(result[0].meta.advertiserDomains).to.equal('yieldlab')
expect(result[0].ad).to.include('<script src="https://ad.yieldlab.net/d/1111/2222/?ts=')
expect(result[0].ad).to.include('&id=abc')
})
Expand Down

0 comments on commit 27e4541

Please sign in to comment.