half circle

Pubfood Analytics

A unique dataset that combines bid data with latency analytics to provide publishers with a holistic view of their header bidding auctions.

Benefits

  • Publishers can optimize their header bidding stack to find the optimal balance between number of partners and latency impact
  • Publishers can onboard new partners and determine if they add value immediately

Key Pubfood Data Terms

Bid Complete
When a header bidder has completed their bid and passed key-value pairs into adserver call
Auction Complete
When the DFP auction has ended (all targeting is set, including header bidders). Now GPT display calls are triggered to render ads on page.
Late Bids
Header bidders that didn’t complete their bids in time for auction complete.
Bid Value
How much are header bidders paying for your imps (some header bidders don’t send price information with bid).

How to see data in Google Analytics

Pubfood AttributeGA Target
Latency timingValue
Bidder Name timingCategory
Bid Value timingLabel
BidValue timingVar

Example GA Reports


Bidder By Ad Unit
Behavior -> Site Speed -> User Timings -> Secondary Dimension: Timing Variable

Average bidder latency by ad unit (sec)
Bidder By Device
Behavior -> Site Speed -> User Timings -> Secondary Dimension: Device Category

Average latency (sec) by device
Bidder by Bid Value
Behavior -> Site Speed -> User Timings -> Secondary Dimension: Device Category

Average bidder latency per bid

The Code


     function sendBatchHits(data) {
         if (!data || typeof data !== 'object') return;

         var payloadHits = [];
         for (var idx in data) {
             var hit = data[idx],
                 hitParams = 'v=1' +
                             '&t=timing' +
                             '&tid=UA-69476533-3' +
                             '&cid=' + UUID() +
                             '&utc=' + hit.category +
                             '&utv=' + hit.timingVar +
                             '&utt=' + hit.timingValue +
                             '&utl=' + hit.timingLabel;
             payloadHits.push(hitParams);
         }

         var data_payload = payloadHits.join('\n'),
             settings = {
                 "async": true,
                 "crossDomain": true,
                 "url": "https://www.google-analytics.com/batch",
                 "method": "POST",
                 "data": data_payload
             };

         if (noSend) return;

         console.log('Sending Google Analytics Batch');
         $.ajax(settings).fail(function(jqXHR, status) {
             console.log('Google Analytics POST failed: ' + status);
         });
     }

     function sendHit(hit) {
         ga('pftest.send', {
             hitType: 'timing',
             timingCategory: hit.category,
             timingVar: hit.timingVar,
             timingValue: hit.timingValue,
             timingLabel: hit.timingLabel
         });
     }    
            pf.observe('BID_PUSH_NEXT', function(ev) {
               var hit = buildHit(ev, pfTimeReference);
               if (hit) {
                   console.log(JSON.stringify(hit));
                   if (doAll) {
                       sendHit(hit);
                   } else {
                       bidTimingHits.push(hit);
                   }
               };
           });
            
         pf.observe('BID_PUSH_NEXT_LATE', function(ev) {
                 var hit = buildHit(ev, pfTimeReference);
                 if (hit) {
                     console.log(JSON.stringify(hit));
                     if (doAll) {
                         sendHit(hit);
                     } else {
                         bidTimingHits.push(hit);
                     }
                 };
             });
            
         pf.observe('BID_COMPLETE', function(ev) {
               var hit = buildHit(ev, pfTimeReference);
               if (hit) {
                   console.log(JSON.stringify(hit));
                   if (doAll){
                       sendHit(hit);
                   } else {
                       bidTimingHits.push(hit);
                   }
               };
           });