What Is Header Bidding And How To Implement It

Posted by

[]The header bidding technology began to establish in 2015, and has actually considering that helped lots of publishers to grow their earnings by as much as 40% (and even, in many cases, to levels of 100% or more.)

What Is Header Bidding?

[]Header bidding is an advanced method where publishers provide their advertisement stock to lots of advertisement exchanges, likewise called Supply-Side Platforms (or SSPs), simultaneously prior to making calls to their ad servers.

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

  • Apply to SSP partners and get approval.
  • Implement Prebid.JS on website.
  • Set up advertisement server.
  • Choose a permission management system.
  • Test and debug.

Applying To SSP Partners

[]There are hundreds of SSP partners available in the list to apply, but I would like 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 needs to discover their online application form and travel through the company’s confirmation procedure. For example, when it comes to Xandr, the contact page looks like this:

Screenshot from Xandr, December 2022 Take note of the []minimum stock size needed to be eligible for using. Yes, that is an incredible high of 50M ad impressions a month. You may require quite an impressive site to be able to use to a few of the ad 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 consider likewise audience quality, traffic geolocation, how much time users spend on the site, and so on. It usually takes a couple of weeks after using to be approved and onboarded

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

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

[]CPM targeting. In this case, that would be $1.50. At the ad server, in our case, Google Ad Supervisor, the demand is gotten and it understands that somebody 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 take place in real-time, which creates buying pressure on Google AdX to pay the greatest

[]CPM possible. If Google AdX doesn’t have any competitors, it will offer the most affordable CPM possible– as it wishes to purchase stock for the cheapest cost

[]possible. With header bidding, bidders have the ability to complete and push CPMs (and therefore profits) up. There are two methods to carry out header bidding

[]: Client-side: When the auction runs via JavaScript in the web 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 establish header bidding, we need to carry out Prebid.js on our website and configure our

[]Google Advertisement Supervisor(or advertisement server).

Implement 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 dealing with

from the customize page and download the library []developed for your particular setup. Don’t forget to choose Authorization Management modules to comply

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

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

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

Fundamental Prebid.js Example

Div-1

Div-2

[]Let’s break down the code above.

  • The very first lines load all needed JS files and our customized Prebid.JS file.
  • Ad slots are specified in the adUnits variety variable.
  • In the adslot meanings, you can see the SSP partners’ names and IDs you will be given when onboarding when them.
  • googletag.pubads(). disableInitialLoad(); is called to disable ad demand to be sent out to Google Ad Manager till Prebid.js completes the auction.
  • pbjs.requestBids operate calls SSP partners and figures out the winner.
  • initAdserver() function is contacted us to send out an ad demand to the Google Advertisement Supervisor with hb_pb key, which includes the winning CPM value, e.g. hb_pb=”1.5 ″. (This step is connected with establishing Google Ad Manager in the next step.)
  • When Google Ad Manager gets the request with the winning bid, it runs its own auction in Google AdX, and returns either the AdX advertisement with a higher CPM, or the advertisement of the winning SSP.

[]For your specific case, you might need to code in a different way and change the setup, however the principle stays the exact same.

[]Aside from that, I would like to quickly go over how to execute lazy loading, because it is a little bit various.

How To Execute 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 figure out and set crucial values prior to sending a demand to the advertisement server.

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

tag when it will participate in the viewport.

options = ; your_observer = brand-new IntersectionObserver( observer_handler, alternatives ); your_observer. observe( goog_adslots [i]; []In the observer_handler call back function, you can run the prebid auction and call the ad server.

function observer_handler( entries, observer) dynamicAdUnit = []; pbjs.addAdUnits(dynamicAdUnit); slot = window.googletag.defineSlot(‘ function lazySlotPrebid(slot, div_id) // endd of initDynamicSlotPrebid []Now, let’s get on establishing the ad server using Google Advertisement Manager.

How To Establish GAM For Header Bidding

[]Advertisement servers need to have dozens of rate 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 key 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 out to GAM with a key value targeting hb_pb = 2.62.
  • Because the order has the very 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 Advertisement.
  • []As I pointed out above, you would need to build line items in GAM with specific granularity, say 0.01– and for the CPM variety $0-$20, you would need to produce 2,000 line products, which are impossible to do manually.

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

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

    []It is a somewhat intricate task, but thanks to contributors who built API tools (although they are not actively supporting them), we can still customize it a little and make it work.

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

    Step 1: Enable API Gain Access To

    []In the Google Ad supervisor Worldwide > General settings area, make certain API access is made it possible for.

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

    Screenshot from Google Ad Supervisor, December 2022 Action 2: Create A New Job

    Browse to Google API Console

    []Qualifications page. From the task drop-down, pick Develop

    []a brand-new job, get in a name for the task, and, optionally, edit the provided Task ID. Click Create.

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

    []. Click Produce to download a file consisting of a private key. Screenshot from Google API Console Qualifications page, Deccember 2022 Screenshot from Google API Console Credentials page, Deccember 2022 Complete the service account information you have actually developed above. Designate the function “owner” and produce the service account OAuth2 credentials. Then, click on the produced user and produce JSON type key, and download it. Screenshot from Google API Console Qualifications page, Deccember 2022 Step 3: Download Task Download the job zip file and

    unzip it, directory site(alternatively, you can use the git command tool to clone the repo). Install composer for your operating system in order to build the job. Step 4: Change your PHP.INI Modification 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 reboot Apache from the control board of XAMPP. Step 5: Develop Subfolders And Build The Job As soon as you have whatever set up

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

    []n’t updated given that 2019, to use the latest version course of libraries. Open the command line of your PC and switch to the directory site where you’ve unzipped the files(using cd command or right-click inside the folder” Git celebration here “if you have git installed), and run author upgrade in the PC terminal or git terminal. It will develop subfolders and develop the job. Step 6: Set Up Your Google Ad Manager Credentials Move the downloaded JSON secret “gam-api-54545-0c04qd8fcb. json” file into the root folder of

    the task you have actually built. Next, download adsapi_php. ini file []and set up your Google Advertisement Manager 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 site course to the JSON crucial 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 content of the file like listed below: putenv(‘ HOUSE =’. dirname( __ DIR __ ).

    “/./” ); require __ 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 ought to see a message”= == =Connection OK====” Action 8: Set Up The Parameters Navigate to the

    file/ script/tests/ConnexionTest. php in your job and open it. Copy and paste the below code into that file, and configure the criteria in the $entry and$buckets selections per your requirements.

    []putenv(‘ HOUSE= ‘. dirname (__ DIR __).”/./”); need __ DIR __.’/././ vendor/autoload. php ‘; use App Scripts HeaderBiddingScript;$bucket_range=array(); $Your_Advertiser_Name=’Sample_Advertiser’; $containers=[“containers”=> [[‘accuracy’=> 2,’min ‘=> 0,’max’= > 4.00,’increment’= > 0.01], [‘ precision ‘= > 2, ‘min’ => 4.01, ‘max’ => 8.00, ‘increment’ => 0.05],]]; foreach ($ buckets [” pails”] as $k => $bucket) >; $entry = [‘ priceGranularity’ => $request_bucket,

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

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

    []php ConnexionTest.php

    []There is a tool using Python that is utilized likewise; you may want to offer it a shot too.

    Debugging

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

    []Alternatively, open your webpage URL using “/? pbjs_debug=real” specification at the end of the URL, and watch console logs messages.

    []You require to make certain that hb_pb secret values are passed to Google Advertisement Manager. Use “/? google_console=1” at the end of the URL to open the GAM console, and click on “Shipment Diagnostics” of each advertisement system.

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

    Screenshot from Google API Console Credentials page, Deccember 2022

    Select A Consent Management System

    []Users’ personal privacy is among the most crucial aspects, and you want to make sure that you comply with both GDPR and GPP.

    []The comprehensive instructions on how to establish an approval management system in your wrapper are here.

    []There are many providers which comply with IAB’s most current standards, and here are a few of the most popular ones:

    Conclusion

    []You may find it surprising that setting up header bidding involves many steps, but it is truly worth it to implement. It can easily improve your earnings by +30% or more by developing selling pressure on Google Advertisements.

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

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

    []More resources:

    []Featured Image: Best SMM Panel