Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

bidWonFailure event - Fire off event in the case that there is an error rendering from pbjs.renderAd

Open aneuway2 opened this issue 8 years ago • 3 comments

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

  1. From the renderAd call, pass an invalid adid (or other error causing issue)
  2. Note that the bidWon event will be fired off
  3. 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.

aneuway2 avatar Feb 09 '18 16:02 aneuway2

seems reasonable. We accept a PR for this

mkendall07 avatar Feb 21 '18 19:02 mkendall07

@mkendall07 , will be sending a PR in couple of days

vedantseta avatar Mar 02 '18 08:03 vedantseta

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.

stale[bot] avatar Mar 16 '18 13:03 stale[bot]