What Is Header Bidding And How To Execute It

Posted by

[]The header bidding technology started to develop in 2015, and has because assisted lots of publishers to grow their earnings by as much as 40% (and even, sometimes, to levels of 100% or more.)

What Is Header Bidding?

[]Header bidding is an innovative technique where publishers provide their advertisement stock to numerous ad exchanges, also called Supply-Side Platforms (or SSPs), simultaneously before making calls to their advertisement servers.

[]Here are the steps a publisher needs to pass to have this innovation power up its money making.

  • Apply to SSP partners and get approval.
  • Carry out Prebid.JS on website.
  • Configure ad server.
  • Pick an approval management system.
  • Test and debug.

Using To SSP Partners

[]There are hundreds of SSP partners readily available in the list to use, however I want to mention what I believe to be the most popular ones:

  • TripleLift.
  • Index Exchange.
  • Amazon UAM/TAM.
  • Xandr (previously AppNexus).
  • Teads.
  • Pubmatic.
  • Sovrn.
  • Verizon.
  • Magnite (formerly Rubicon).
  • OpenX.
  • Sonobi.
  • GumGum.
  • Sharethrough.
  • Unurly.

[]One requires to discover their online application and go through the business’s verification procedure. For instance, when it comes to Xandr, the contact page appears like this:

Screenshot from Xandr, December 2022 Focus on the []minimum stock size required to be eligible for using. Yes, that is a staggering high of 50M ad impressions a month. You may need rather an outstanding website to be able to use to a few of the advertisement networks. We will call them more bidders, as they bid on inventory in genuine time. However, not all SSPs have such high thresholds for application.

[]For instance, Sharethrough only requires 20M ad impressions. Besides, they think about likewise audience quality, traffic geolocation, just how much time users invest in the site, etc. It usually takes a couple of weeks after applying to be approved and onboarded

[]with them, so it can be a relatively time-consuming procedure that might even take months to end up. How Does Prebid.js Work? In nutshell, here is how Prebid.js works. When a user opens a web page, an ad request is made to all bidders(SSP partners). Bidders respond with their CPM quotes– let’s say$1

[]and$ 1.50– and Prebid.js makes a request to the ad server, with the highest

[]CPM targeting. In this case, that would be $1.50. At the advertisement server, in our case, Google Ad Manager, the demand is gotten and it knows that someone is

[]paying $1.50 USD CPM for an advertisement. It runs another auction with Google Adsense or AdX. If Google offers a higher CPM, then the Google Advertisement will be served. If not, our ad with $1.50 CPM will win, and be served

[]by our SSP partner. Screenshot from Google Ad Supervisor, December 2022 The trick here is that auctions happen in real-time, which produces buying pressure on Google AdX to pay the highest

[]CPM possible. If Google AdX does not have any competitors, it will provide the lowest CPM possible– as it wants to buy inventory for the least expensive price

[]possible. With header bidding, bidders have the ability to compete and push CPMs (and for that reason earnings) up. There are 2 methods to carry out header bidding

[]: Client-side: When the auction runs through JavaScript in the browser. Server-side: When the auction is

[]operated on the server. Let’s go over client-side header bidding. How To Carry Out Client-Side Header Bidding In order to set up header bidding, we require to execute Prebid.js on our website and configure our

[]Google Ad Supervisor(or advertisement server).

Carry out Prebid.js On Your Site Prebid.js []is a header bidding platform that has more than 200 need sources integrated. You require to pick the SSP partners you are working with

from the customize page and download the library []built for your specific configuration. Do not forget to select Consent Management modules to comply

[]with GDPR and GPP personal privacy standards. Below is the sample code drawn from the main documents. var div_1_sizes=[ [300, 250]

[], [300, 600]]; var div_2_sizes= [[

[]728, 90], [970, 250]]

Fundamental Prebid.js Example



[]Let’s break down the code above.

  • The first lines pack all required JS files and our customized Prebid.JS file.
  • Ad slots are specified in the adUnits selection variable.
  • In the adslot definitions, you can see the SSP partners’ names and IDs you will be provided when onboarding when them.
  • googletag.pubads(). disableInitialLoad(); is called to disable ad request to be sent to Google Advertisement Supervisor up until Prebid.js ends up the auction.
  • pbjs.requestBids function calls SSP partners and identifies the winner.
  • initAdserver() function is called to send out an advertisement demand to the Google Ad Manager with hb_pb secret, which contains the winning CPM worth, e.g. hb_pb=”1.5 ″. (This action is gotten in touch with setting up Google Ad Supervisor in the next action.)
  • When Google Ad Supervisor gets the demand with the winning bid, it runs its own auction in Google AdX, and sends back either the AdX advertisement with a greater CPM, or the ad of the winning SSP.

[]For your specific case, you may need to code differently and change the setup, but the concept stays the exact same.

[]Aside from that, I would like to rapidly go over how to implement lazy loading, since it is a bit different.

How To Execute Lazy Loading

[]The Google tag for publishers has a lazy loading structure which will not work in the case of header bidding.

[]This is due to the fact that you need to run an auction, and determine and set essential worths before sending out a demand to the advertisement server.

[]Because of that, I would advise using the Intersection Observer API to figure out when to pack the advertisement in the HTML

tag when it is about to participate in the viewport.

options = noticeable amount of product displayed in relation to root; your_observer = new IntersectionObserver( observer_handler, choices ); your_observer. observe( goog_adslots [i]; []In the observer_handler call back function, you can run the prebid auction and call the advertisement server.

function observer_handler( entries, observer) 1055389 function lazySlotPrebid(slot, div_id) // endd of initDynamicSlotPrebid []Now, let’s jump on establishing the ad server using Google Advertisement Supervisor.

How To Set Up GAM For Header Bidding

[]Ad servers need to have dozens of cost top priority line items with crucial hb_pb targeting all possible CPM worths, such as hb_pb=0.04, hb_pb=0.03, etc hb_pb essential value targeting

[] This is the key point that makes the header bidding engine work. The auction runs in the browser on page load.

  • The winning SSP partner is sent out to GAM with a key value targeting hb_pb = 2.62.
  • Given that the order has the same CPM value, GAM understands that there is a quote at $2.62.
  • GAM runs an AdX auction and needs to pay more than $2.62 in order to win the quote and display a Google Ad.
  • []As I mentioned above, you would need to develop line items in GAM with specific granularity, say 0.01– and for the CPM variety $0-$20, you would need to create 2,000 line products, which are impossible to do manually.

    []For that, you would need to use GAM API.

    []Sadly, there are no solid solutions that you can simply download and run in one click.

    []It is a somewhat complex task, however thanks to contributors who constructed API tools (even though they are not actively supporting them), we can still modify it a little and make it work.

    []Let’s dive into how to establish Google Advertisement Manager and understand the following:

    Step 1: Make It Possible For API Access

    []In the Google Advertisement supervisor Worldwide > General settings section, make sure API access is enabled.

    []Click the Add service account button and create a user with the sample name “GAM API USER” and email “[email protected]” with admin rights.

    Screenshot from Google Advertisement Manager, December 2022 Step 2: Produce A New Job

    Browse to Google API Console

    []Qualifications page. From the task drop-down, select Produce

    []a brand-new project, get in a name for the task, and, optionally, modify the provided Project ID. Click Create.

    []On the Credentials page, []select Develop credentials, then select Service account secret.Select New service account, and choose JSON

    []. Click Develop to download a file containing a personal key. Screenshot from Google API Console Qualifications page, Deccember 2022 Screenshot from Google API Console Qualifications page, Deccember 2022 Fill out the service account information you have actually produced above. Assign the function “owner” and produce the service account OAuth2 credentials. Then, click the developed user and develop JSON type secret, and download it. Screenshot from Google API Console Credentials page, Deccember 2022 Step 3: Download Task Download the task zip file and

    unzip it, directory site(alternatively, you can utilize the git command tool to clone the repo). Set up author for your os in order to build the project. Step 4: Change your PHP.INI Change your php.ini( situated at/ xampp/php/php. ini)file and make it possible for”

    []extension=soap”by getting rid of”;” in front of and set”soap.wsdl _ cache_ttl=0″ and restart Apache from the control panel of XAMPP. Step 5: Create Subfolders And Build The Job As soon as you have everything set up

    and unzipped, open composer.json file and modification”googleads/googleads-php-lib”:”^ 44.0.0 “to use the latest variation” googleads/googleads-php-lib “:”^ 59.0.0″. Look for the most fresh variation at the moment you perform this. Browse and change in/ app []/ folder of the task”v201911″with” v202202″, because that git project was

    []n’t upgraded given that 2019, to utilize the current version path of libraries. Open the command line of your PC and switch to the directory where you have actually unzipped the files(using cd command or right-click inside the folder” Git bash here “if you have git installed), and run composer upgrade in the PC terminal or git terminal. It will produce subfolders and build the task. Step 6: Set Up Your Google Advertisement Manager Qualifications Move the downloaded JSON secret “gam-api-54545-0c04qd8fcb. json” file into the root folder of

    the project you have actually built. Next, download adsapi_php. ini file []and established your Google Ad Supervisor credentials in it. networkCode= “899899” applicationName =”My GAM APP” jsonKeyFilePath=”

    []D: xampp htdocs dfp-prebid-lineitems gam-api-54545-0c04qd8fcb. json”scopes=”https://www.googleapis.com/auth/dfp” impersonatedEmail =” [email protected]”jsonKeyFilePath is the absolute directory course to the JSON crucial file in the folder root. Action 7: Set The Content Of The File Finally, navigate to the file/ script/tests/ConnexionTest

    []. php and set the material of the file like listed below: putenv(‘ HOUSE =’. dirname( __ DIR __ ).

    “/./” ); need __ DIR __.’/./ []./ vendor/autoload. php’; $traffickerId=(brand-new App AdManager UserManager ()) -> getUserId (); if(is_numeric($traffickerId)) else echo” n===Connexion KO==== n n “; In your terminal(or git celebration console) test the connection by running the command(if you remain in the/ script/tests/ folder). php ConnexionTest.php You need to see a message”= == =Connection OK====” Step 8: Set Up The Parameters Browse to the

    file/ script/tests/ConnexionTest. php in your job and open it. Copy and paste the listed below code into that file, and configure the specifications in the $entry and$pails ranges per your requirements.

    []putenv(‘ HOUSE= ‘. dirname (__ DIR __).”/./”); require __ DIR __.’/././ vendor/autoload. php ‘; usage App Scripts HeaderBiddingScript;$bucket_range=variety(); $Your_Advertiser_Name=’Sample_Advertiser’; $buckets=[“buckets”=> [[‘accuracy’=> 2,’minutes ‘=> 0,’max’= > 4.00,’increment’= > 0.01], [‘ precision ‘= > 2, ‘min’ => 4.01, ‘max’ => 8.00, ‘increment’ => 0.05],]]; foreach ($ pails [” buckets”] as $k => $bucket) can be ‘low’, ‘med’, ‘high’, ‘auto’,’dense’, ‘test’ ‘currency’ => ‘USD’,

    []Optionally you can likewise define ‘geoTargetingList’ => “dz, pk, ke, pt” or customized essential worth targeting customTargeting’ => [‘ amp_pages’ => yes’] if you want your header bidding to work only when the custom-made essential worth is set.

    []Run the command below and it will begin producing line items per the pail settings you’ve defined.

    []php ConnexionTest.php

    []There is a tool utilizing Python that is used similarly; you may want to provide it a try too.


    []For debugging, there are a few internet browser add-ons you can use to see if the auction runs without errors.

    []Additionally, open your web page URL using “/? pbjs_debug=true” specification at the end of the URL, and see console logs messages.

    []You require to make sure that hb_pb key worths are passed to Google Advertisement Supervisor. Use “/? google_console=1” at the end of the URL to open the GAM console, and click on “Delivery Diagnostics” of each advertisement unit.

    []You need to see that hb_pb worths are set and passed to the ad server.

    Screenshot from Google API Console Credentials page, Deccember 2022

    Pick A Consent Management System

    []Users’ privacy is one of the most crucial aspects, and you wish to make sure that you comply with both GDPR and GPP.

    []The detailed guidelines on how to establish a permission management system in your wrapper are here.

    []There are lots of providers which abide by IAB’s newest standards, and here are a few of the most popular ones:


    []You may discover it unexpected that establishing header bidding includes a lot of actions, but it is truly worth it to carry out. It can quickly boost your profits by +30% or more by developing selling pressure on Google Advertisements.

    []This guide is for technically smart users– however if you have concerns and problems, there is an Adops slack channel you may subscribe to and ask questions to the community.

    []I hope that after reading this short article, you will discover it simpler to set up header bidding and enhance the monetization of your site.

    []More resources:

    []Included Image: Best SMM Panel