What Is Header Bidding And How To Execute It

Posted by

[]The header bidding innovation started to establish in 2015, and has because assisted many publishers to grow their profits by as much as 40% (and even, in some cases, to levels of 100% or more.)

What Is Header Bidding?

[]Header bidding is a technique where publishers use their advertisement inventory to many advertisement exchanges, also called Supply-Side Platforms (or SSPs), at the same time prior to making calls to their ad servers.

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

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

Applying To SSP Partners

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

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

[]One requires to discover their online application and pass through the company’s confirmation process. For instance, in the case of Xandr, the contact page appears like this:

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

[]For example, Sharethrough just requires 20M ad impressions. Besides, they think about also audience quality, traffic geolocation, how much time users spend on the site, and so on. It normally takes a couple of weeks after using to be approved and onboarded

[]with them, so it can be a relatively lengthy procedure 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 request is made to all bidders(SSP partners). Bidders react with their CPM bids– let’s say$1

[]and$ 1.50– and Prebid.js makes a request 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 Supervisor, the request is gotten and it understands that someone is

[]paying $1.50 USD CPM for an ad. It runs another auction with Google Adsense or AdX. If Google offers a higher CPM, then the Google Ad will be served. If not, our ad 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 greatest

[]CPM possible. If Google AdX does not have any competition, it will provide the lowest CPM possible– as it wants to purchase inventory for the most affordable price

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

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

[]run 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 need to carry out Prebid.js on our website and configure our

[]Google Advertisement Supervisor(or advertisement server).

Implement Prebid.js On Your Site Prebid.js []is a header bidding platform that has more than 200 need sources integrated. You need to select the SSP partners you are dealing with

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

[]with GDPR and GPP personal privacy standards. Below is the sample code drawn from the official documents. 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 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 ad demand to be sent to Google Advertisement Supervisor up until Prebid.js finishes the auction.
  • pbjs.requestBids function calls SSP partners and determines the winner.
  • initAdserver() function is called to send an ad request to the Google Ad Supervisor with hb_pb key, which contains the winning CPM value, e.g. hb_pb=”1.5 ″. (This step is connected with setting up Google Advertisement Manager in the next step.)
  • When Google Advertisement Supervisor gets the request with the winning bid, it runs its own auction in Google AdX, and sends back either the AdX advertisement with a higher CPM, or the advertisement of the winning SSP.

[]For your specific case, you might require to code in a different way and alter the setup, however the concept stays the very same.

[]Aside from that, I wish to quickly go over how to carry out lazy loading, because it is a little bit various.

How To Implement Lazy Loading

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

[]This is because you require to run an auction, and figure out and set essential worths before sending a demand to the ad server.

[]Since of that, I would recommend utilizing the Intersection Observer API to figure out when to load the ad in the HTML

tag when it is about to participate in the viewport.

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

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

How To Set Up GAM For Header Bidding

[]Advertisement servers require to have dozens of rate concern line items with key hb_pb targeting all possible CPM worths, such as hb_pb=0.04, hb_pb=0.03, etc hb_pb crucial value targeting

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

  • The winning SSP partner is sent out to GAM with a key worth targeting hb_pb = 2.62.
  • Considering that the order has the very same CPM worth, GAM comprehends that there is a bid 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 discussed above, you would require to build line products in GAM with particular granularity, state 0.01– and for the CPM variety $0-$20, you would need to develop 2,000 line items, which are difficult to do manually.

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

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

    []It is a rather intricate task, however thanks to factors who developed API tools (despite the fact that they are not actively supporting them), we can still customize it a little and make it work.

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

    Step 1: Enable API Gain Access To

    []In the Google Ad supervisor International > General settings section, make certain API gain access to is allowed.

    []Click on 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 Action 2: Develop A New Project

    Navigate to Google API Console

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

    []a new project, get in a name for the task, and, optionally, edit the supplied Task ID. Click Create.

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

    []. Click Create to download a file including a private secret. Screenshot from Google API Console Credentials page, Deccember 2022 Screenshot from Google API Console Credentials page, Deccember 2022 Fill in the service account information you have actually produced above. Designate the role “owner” and produce the service account OAuth2 qualifications. Then, click the produced user and create JSON type secret, and download it. Screenshot from Google API Console Qualifications page, Deccember 2022 Action 3: Download Project Download the job zip file and

    unzip it, directory(additionally, you can utilize the git command tool to clone the repo). Install composer for your os in order to construct the job. Step 4: Modification your PHP.INI Modification your php.ini( situated at/ xampp/php/php. ini)file and enable”

    []extension=soap”by removing”;” 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 Project Once you have whatever established

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

    []n’t upgraded considering that 2019, to use the latest variation 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 set up), and run composer upgrade in the PC terminal or git terminal. It will create subfolders and build the task. Step 6: Set Up Your Google Ad Manager Credentials Move the downloaded JSON key “gam-api-54545-0c04qd8fcb. json” file into the root folder of

    the project you have actually developed. Next, download adsapi_php. ini file []and set up your Google Ad Manager 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 outright directory path to the JSON essential file in the folder root. Step 7: Set The Material Of The File Lastly, browse to the file/ script/tests/ConnexionTest

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

    “/./” ); need __ DIR __.’/./ []./ vendor/autoload. php’; $traffickerId=(new App AdManager UserManager ()) -> getUserId (); if(is_numeric($traffickerId))echo” n====Connexion OK=== = n n”; 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 need to see a message”= == =Connection okay====” Step 8: Set Up The Parameters Navigate 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 criteria in the $entry and$buckets varieties per your requirements.

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

    []Additionally 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 only when the customized essential value is set.

    []Run the command below and it will start creating line items per the container settings you have actually defined.

    []php ConnexionTest.php

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

    Debugging

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

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

    []You need to make certain 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 “Delivery Diagnostics” of each ad system.

    []You must see that hb_pb values are set and passed to the advertisement server.

    Screenshot from Google API Console Qualifications page, Deccember 2022

    Select An Authorization Management System

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

    []The in-depth guidelines on how to set up an approval management system in your wrapper are here.

    []There are lots of service providers which comply with IAB’s newest requirements, and here are a few of the most popular ones:

    Conclusion

    []You might find it surprising that setting up header bidding involves a lot of steps, however it is actually worth it to implement. It can quickly enhance your income by +30% or more by developing selling pressure on Google Advertisements.

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

    []I hope that after reading this article, you will find it simpler to set up header bidding and boost the money making of your site.

    []More resources:

    []Featured Image: SMM Panel