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

Can't catching AuctionInit event when removing bidders before the auction starts. #12033

Closed
maelmrgt opened this issue Jul 24, 2024 · 2 comments

Comments

@maelmrgt
Copy link
Contributor

Type of issue:

Question

Description

I am currently working on adding debugging features to our Rtd module. This Rtd module removes bidders from an auction based on certain conditions.

For debugging purposes, my goal is to force the removal of all bidders from the auction when a certain flag is activated. I added this flag greenbids_force_filtering, and when it is activated, I set the bid array for each adUnit to empty, i.e., adUnit.bids = [];.

However, I am encountering an issue where I am unable to catch certain events, particularly the AuctionInit event, which is important for my debugging. Is it expected behavior to not catch the AuctionInit event when all bidders are removed before the auction starts?
(I am able to catch the AuctionEnd event.)

Steps to reproduce

I have updated the corresponding PR, so you can pull the branch from this PR to reproduce: greenbids#3

Then, on a local server, at this adress http://localhost:9999/test-prebid-html3.html you can see the differents events catched when the flag is activated or not, (http://localhost:9999/test-prebid-html3.html?greenbids_force_filtering=True), by using a breakpoint line 219 if (eventType === AUCTION_INIT) {of the greenbidsAnalyticsAdapter module.

@dgirardi
Copy link
Collaborator

dgirardi commented Jul 24, 2024

Is it expected behavior to not catch the AuctionInit event when all bidders are removed before the auction starts?

Yes (kinda) - what should happen in that case is that no auction starts at all (and there should be no AUCTION_END event either).

What's happening in your case is that an adUnit with no bids, but an ortb2Imp definition, is assumed to map to a stored impression. A "dummy" bid is generated for it, and an auction starts, but since you don't have s2s set up, no call is made, an the AUCTION_INIT event is never fired.

We can and should fix the missing event for this edge case, but I'm not sure that fixes your problem - it's still an accident that you're getting an auction - there's no need for one if there are no bids to get. If one day we get smarter about detecting when a stored impression makes sense, you may no longer have a way to generate "empty" auctions.

@maelmrgt
Copy link
Contributor Author

That's very clear. Many thanks for this detailed explaination.

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

No branches or pull requests

2 participants