Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adUnitCodes in auctionEnd event are duplicated for ephemeral #12125

Closed
muuki88 opened this issue Aug 14, 2024 · 1 comment · Fixed by #12127
Closed

adUnitCodes in auctionEnd event are duplicated for ephemeral #12125

muuki88 opened this issue Aug 14, 2024 · 1 comment · Fixed by #12127
Labels

Comments

@muuki88
Copy link
Collaborator

muuki88 commented Aug 14, 2024

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?

@patmmccann
Copy link
Collaborator

With this call structure, the adUnitCodes array in the auctionEnd event has duplicated code s .

This is a bug we can fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

2 participants