bidWonFailure event - Fire off event in the case that there is an error rendering from pbjs.renderAd
Type of issue
Feature request
Description
After the pbjs.renderAd() call has been made there are several checks that are made (e.g is there an adid). Currently these just output console statements if an error is found. It would be helpful to have an event that counts these errors/successes when looking into discrepancies between AdServer and SSP.
For example, the AdServer might count 100 impressions, however the SSP might only count 80 impressions (successful renders)
This shows a 20% discrepancy; however maybe theres an additional 15% that can be accounted for in counting these errors = 5% discrepancy. This would show that there is an integration issue instead of an SSP issue with the discrepancy
Steps to reproduce
- From the renderAd call, pass an invalid
adid(or other error causing issue) - Note that the
bidWonevent will be fired off - The renderAd script will be stopped with the checks and then just show a console message. e.g: https://github.com/prebid/Prebid.js/blob/cfe1f72cdb397c6923484943235f3e8de4a9389a/src/prebid.js#L245
Expected results
Prebid.js
utils.logError('Error trying to write ad. No ad for bid response id: ' + id);
msg = bid;
msg['failure'] = "Error trying to write ad. No ad for bid response";
events.emit(BID_WON_FAILURE, msg);
Publisher API
pbjs.onEvent('BidWonFailure', function(data) { notifyBidFailureInOurSystem(data); } );
Actual results
Only the logError message is shown in the browser console.
seems reasonable. We accept a PR for this
@mkendall07 , will be sending a PR in couple of days
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.