What Is Header Bidding And How To Execute It

Posted by

[]The header bidding innovation began to establish in 2015, and has actually because assisted numerous 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 advanced technique where publishers offer their advertisement inventory to numerous ad exchanges, also called Supply-Side Platforms (or SSPs), at the same time before making calls to their ad servers.

[]Here are the actions a publisher requires to pass to have this technology power up its monetization.

  • Apply to SSP partners and get approval.
  • Implement Prebid.JS on site.
  • Set up ad server.
  • Select an authorization management system.
  • Test and debug.

Using To SSP Partners

[]There are hundreds of SSP partners readily available in the list to apply, but I would like to mention what I think 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 needs to discover their online application form and go through the company’s verification procedure. For example, in the case of Xandr, the contact page appears like this:

Screenshot from Xandr, December 2022 Pay attention to the []minimum stock size needed to be qualified for using. Yes, that is an incredible high of 50M advertisement impressions a month. You may require rather an outstanding website to be able to use to some of the advertisement networks. We will call them additional bidders, as they bid on stock in genuine time. Nevertheless, not all SSPs have such high limits for application.

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

[]with them, so it can be a relatively lengthy process that may even take months to finish. How Does Prebid.js Work? In nutshell, here is how Prebid.js works. When a user opens a webpage, an advertisement demand is made to all bidders(SSP partners). Bidders react with their CPM quotes– let’s state$1

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

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

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

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

[]CPM possible. If Google AdX doesn’t have any competition, it will provide the most affordable CPM possible– as it wishes to purchase inventory for the least expensive rate

[]possible. With header bidding, bidders are able to complete and press CPMs (and therefore revenue) up. There are two ways to execute header bidding

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

[]operated on the server. Let’s discuss client-side header bidding. How To Implement Client-Side Header Bidding In order to set up header bidding, we require to carry out Prebid.js on our site and configure our

[]Google Advertisement Supervisor(or ad server).

Execute Prebid.js On Your Website 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 setup. Don’t forget to choose Authorization Management modules to comply

[]with GDPR and GPP personal privacy standards. Below is the sample code taken 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 very first lines load all required JS files and our customized Prebid.JS file.
  • Ad slots are defined in the adUnits range variable.
  • In the adslot definitions, you can see the SSP partners’ names and IDs you will be given when onboarding when them.
  • googletag.pubads(). disableInitialLoad(); is contacted us to disable advertisement request to be sent to Google Ad Supervisor up until Prebid.js finishes the auction.
  • pbjs.requestBids function calls SSP partners and figures out the winner.
  • initAdserver() function is called to send out an advertisement request to the Google Ad Manager with hb_pb key, which consists of the winning CPM worth, e.g. hb_pb=”1.5 ″. (This action is gotten in touch with setting up Google Advertisement Manager in the next action.)
  • When Google Ad Supervisor gets the demand with the winning bid, it runs its own auction in Google AdX, and returns either the AdX advertisement with a greater CPM, or the ad of the winning SSP.

[]For your specific case, you may need to code in a different way and alter the setup, but the concept stays the very same.

[]Besides that, I would like to quickly go over how to implement lazy loading, because it is a little various.

How To Implement Lazy Loading

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

[]This is due to the fact that you require to run an auction, and identify and set crucial worths prior to sending out a request to the ad server.

[]Because of that, I would encourage utilizing the Intersection Observer API to determine when to load the advertisement in the HTML

tag when it is about to enter into the viewport.

alternatives = noticeable quantity of item shown in relation to root; your_observer = brand-new IntersectionObserver( observer_handler, options ); 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) dynamicAdUnit = [code: ‘your_html_div_id’, mediaTypes: , quotes: [bidder: ‘appnexus’, params: placementId: 13144370, ]]; pbjs.addAdUnits(dynamicAdUnit); slot = window.googletag.defineSlot(‘ function lazySlotPrebid(slot, div_id) pbjs.que.push(function() // endd of initDynamicSlotPrebid []Now, let’s jump on setting up the advertisement server using Google Advertisement Supervisor.

How To Establish GAM For Header Bidding

[]Ad servers require to have lots 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, and so on hb_pb essential value targeting

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

  • The winning SSP partner is sent to GAM with an essential value targeting hb_pb = 2.62.
  • Given that the order has the exact same CPM value, GAM comprehends that there is a bid at $2.62.
  • GAM runs an AdX auction and has to pay more than $2.62 in order to win the quote and display a Google Advertisement.
  • []As I mentioned above, you would require to build line products in GAM with particular granularity, say 0.01– and for the CPM variety $0-$20, you would need to create 2,000 line items, which are impossible to do by hand.

    []For that, you would require to utilize GAM API.

    []Regrettably, there are no strong options that you can merely download and run in one click.

    []It is a somewhat intricate task, but thanks to factors who built 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:

    Action 1: Allow API Gain Access To

    []In the Google Advertisement supervisor International > General settings area, ensure API gain access to is enabled.

    []Click the Include 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 Action 2: Create A New Task

    Browse to Google API Console

    []Credentials page. From the job drop-down, choose Produce

    []a new job, go into a name for the job, and, optionally, edit the supplied Task ID. Click Create.

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

    []. Click Develop to download a file containing a private key. Screenshot from Google API Console Qualifications page, Deccember 2022 Screenshot from Google API Console Credentials page, Deccember 2022 Fill in the service account details you’ve created above. Designate the role “owner” and develop the service account OAuth2 credentials. Then, click on the developed user and develop JSON type secret, and download it. Screenshot from Google API Console Qualifications page, Deccember 2022 Action 3: Download Project Download the project zip file and

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

    []extension=soap”by eliminating”;” in front of and set”soap.wsdl _ cache_ttl=0″ and reboot Apache from the control board of XAMPP. Step 5: Produce Subfolders And Build The Project As soon as you have everything established

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

    []n’t updated because 2019, to use the current variation path of libraries. Open the command line of your PC and switch to the directory site where you’ve unzipped the files(utilizing cd command or right-click inside the folder” Git bash here “if you have git installed), and run author update in the PC terminal or git terminal. It will produce subfolders and build the job. Step 6: Set Up Your Google Advertisement Supervisor 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 set up your Google Advertisement Supervisor qualifications 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 key file in the folder root. Action 7: Set The Material Of The File Finally, browse to the file/ script/tests/ConnexionTest

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

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

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

    []putenv(‘ HOME= ‘. dirname (__ DIR __).”/./”); need __ DIR __.’/././ vendor/autoload. php ‘; use App Scripts HeaderBiddingScript;$bucket_range=variety(); $Your_Advertiser_Name=’Sample_Advertiser’; $buckets=[“containers”=> [[‘precision’=> 2,’min ‘=> 0,’max’= > 4.00,’increment’= > 0.01], [‘ accuracy ‘= > 2, ‘minutes’ => 4.01, ‘max’ => 8.00, ‘increment’ => 0.05],]]; foreach ($ pails [” containers”] as $k => $bucket) prebid advertiserName ‘orderName’ => $order_name]; $script = new HeaderBiddingScript(); $script-> createGlobalAdUnits($entry);

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

    []Run the command listed below and it will begin developing line products per the container settings you have actually specified.

    []php ConnexionTest.php

    []There is a tool using Python that is used likewise; you might want to give it a shot as well.


    []For debugging, there are a few web browser add-ons you can utilize to see if the auction runs without mistakes.

    []Alternatively, open your website URL utilizing “/? pbjs_debug=real” parameter at the end of the URL, and enjoy console logs messages.

    []You require to ensure that hb_pb key values are passed to Google Ad Supervisor. Usage “/? google_console=1” at the end of the URL to open the GAM console, and click on “Delivery Diagnostics” of each ad system.

    []You should see that hb_pb values are set and passed to the ad server.

    Screenshot from Google API Console Credentials page, Deccember 2022

    Pick An Approval Management System

    []Users’ privacy is one of the most important factors, and you wish to make certain that you comply with both GDPR and GPP.

    []The comprehensive instructions on how to set up a permission management system in your wrapper are here.

    []There are lots of companies which comply with IAB’s latest standards, and here are a few of the most popular ones:


    []You may discover it surprising that establishing header bidding includes numerous actions, but it is actually worth it to implement. It can easily boost your profits by +30% or more by creating selling pressure on Google Ads.

    []This guide is for technically smart users– however if you have questions and problems, there is an Adops slack channel you might register for and ask questions to the neighborhood.

    []I hope that after reading this short article, you will discover it much easier to establish header bidding and enhance the monetization of your website.

    []More resources:

    []Included Image: Best SMM Panel