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

Check all bids snippet needs investigation/update #2190

Closed
mkendall07 opened this issue Feb 23, 2018 · 9 comments
Closed

Check all bids snippet needs investigation/update #2190

mkendall07 opened this issue Feb 23, 2018 · 9 comments
Assignees

Comments

@mkendall07
Copy link
Member

The rendered ad snippet isn't working for all cases.

I ran this on a site with 2 rendered bids and it told me 1 wasn't rendered.

image

(function() {
  var responses = ga_pbjs.getBidResponses();
  var winners = ga_pbjs.getAllWinningBids();
  var output = [];
  Object.keys(responses).forEach(function(adUnitCode) {
    var response = responses[adUnitCode];
    response.bids.forEach(function(bid) {
      console.log(bid);
      output.push({
        adunit: adUnitCode,
        size: bid.size,
        adId: bid.adId,
        bidder: bid.bidder,
        time: bid.timeToRespond,
        cpm: bid.cpm,
        msg: bid.statusMessage,
        rendered: !!winners.find(function(winner) {
          return winner.adId==bid.adId;
        })
      });
    });
  });
  if (output.length) {
    if (console.table) {
      console.table(output);
    } else {
      for (var j = 0; j < output.length; j++) {
        console.log(output[j]);
      }
    }
  } else {
    console.warn('NO prebid responses');
  }
})();```
@mkendall07 mkendall07 changed the title Check all bids snippet needs an update Check all bids snippet needs investigation/update Feb 23, 2018
@snapwich snapwich self-assigned this Feb 26, 2018
@chefbenjamin
Copy link

Just checking to see if there has been any progress here.

@mkendall07
Copy link
Member Author

@chefbenjamin
I think this might actually be related to your implementation. I'll send an email

@mkendall07
Copy link
Member Author

sorry scratch that. It looks like the issue is that pbjs.getAllWinningBids(); is not returning all winning bids after all.

@chefbenjamin
Copy link

@mkendall07 ok cool. let me know if you want me to test something.

@snapwich
Copy link
Collaborator

snapwich commented Mar 6, 2018

I tried looking into this but it's working fine with my test pages. Is there a test page I could look at that is known to have the issue?

@chefbenjamin
Copy link

@snapwich happy to share with you, but prefer to send privately. Best email address ?

@snapwich
Copy link
Collaborator

snapwich commented Mar 6, 2018

Sure

@stale
Copy link

stale bot commented Mar 21, 2018

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 stale bot added the wontfix label Mar 21, 2018
@stale
Copy link

stale bot commented Apr 4, 2018

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 stale bot added the stale label Apr 4, 2018
@stale stale bot closed this as completed Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants