Closed
Description
Type of issue
Bug
Description
The pbjs.requestBids()
method can be called in two different ways.
In both examples I make use of the twin ad unit feature.
Add ad units and request adUnitCodes
// create ad units
pbjs.addAdUnits([
{ code: 'div-1', /* ... */ },
{ code: 'div-1', /* ... */ },
]);
// request bids for the created ad units
pbjs.requestBids({adUnitCodes: ['div-1']});
With this call structure, the adUnitCodes
array in the auctionEnd
event has only the ad unit codes from the array.
Ephemeral ad units
// request bids
pbjs.requestBids({
adUnits: [
{ code: 'div-1', /* ... */ },
{ code: 'div-1', /* ... */ },
]
});
With this call structure, the adUnitCodes
array in the auctionEnd
event has duplicated code
s .
Steps to reproduce
Use Ephemeral ad units variant from the description and
pbjs.getEvents().filter(event => event.eventType === 'auctionEnd')
and look the adUnitCodes
array.
Test page
Expected results
adUnitCodes
are always unique.
Actual results
adUnitCodes
are unique only if explicitly specified in the adUnitCodes
requestBids parameter.
Platform details
- prebid 8.52.1
- prebid 9.8.0
Other information
What is the behaviour if adUnitCodes
and adUnits
are provided as params?
Metadata
Metadata
Assignees
Type
Projects
Status
Done