What Is Header Bidding And How To Execute It

Posted by

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

What Is Header Bidding?

[]Header bidding is a cutting-edge method where publishers use their advertisement stock to many ad exchanges, likewise called Supply-Side Platforms (or SSPs), at the same time before making calls to their advertisement servers.

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

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

Applying To SSP Partners

[]There are numerous SSP partners available in the list to apply, however I wish 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 form and pass through the business’s confirmation process. For example, when it comes to Xandr, the contact page looks like this:

Screenshot from Xandr, December 2022 Focus on the []minimum inventory size needed to be qualified for using. Yes, that is a shocking high of 50M advertisement impressions a month. You may require quite a remarkable site to be able to apply to some of the ad networks. We will call them more bidders, as they bid on stock in genuine time. Nevertheless, not all SSPs have such high limits for application.

[]For instance, Sharethrough only needs 20M advertisement impressions. Besides, they think about likewise audience quality, traffic geolocation, how much time users invest in the website, etc. It typically takes a couple of weeks after applying to be authorized and onboarded

[]with them, so it can be a relatively lengthy process that might 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 bids– let’s say$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 advertisement server, in our case, Google Advertisement Manager, the request is gotten and it knows that someone is

[]paying $1.50 USD CPM for an ad. It runs another auction with Google Adsense or AdX. If Google provides a greater 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 technique here is that auctions occur 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 provide the most affordable CPM possible– as it wishes to purchase inventory for the cheapest rate

[]possible. With header bidding, bidders are able to compete and push CPMs (and therefore earnings) up. There are 2 ways to execute header bidding

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

[]worked on the server. Let’s talk about client-side header bidding. How To Carry Out Client-Side Header Bidding In order to establish header bidding, we need to carry out Prebid.js on our website and configure our

[]Google Ad Manager(or ad server).

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

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

[]with GDPR and GPP personal privacy requirements. Below is the sample code taken from the official documentation. var div_1_sizes=[ [300, 250]

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

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

Standard Prebid.js Example

Div-1

Div-2

[]Let’s break down the code above.

  • The first lines pack all required JS files and our personalized Prebid.JS file.
  • Advertisement slots are defined in the adUnits array variable.
  • In the adslot meanings, 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 out to Google Advertisement Manager until Prebid.js completes the auction.
  • pbjs.requestBids function calls SSP partners and determines the winner.
  • initAdserver() function is contacted us to send an ad demand to the Google Advertisement Supervisor with hb_pb key, which consists of the winning CPM worth, e.g. hb_pb=”1.5 ″. (This action is connected with setting up Google Advertisement Supervisor 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 greater CPM, or the advertisement of the winning SSP.

[]For your specific case, you may require to code differently and change the setup, however the concept stays the very same.

[]Aside from that, I want to quickly discuss how to implement lazy loading, since it is a little different.

How To Carry Out Lazy Loading

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

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

[]Since of that, I would advise utilizing the Intersection Observer API to determine when to pack the advertisement in the HTML

tag when it is about to participate in the viewport.

alternatives = root: null,; your_observer = new IntersectionObserver( observer_handler, alternatives ); 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) header-bid-tag -0′, [728,90], ‘your_html_div_id’ ). addService(googletag.pubads()); lazySlotPrebid(slot, ‘your_html_div_id’) function lazySlotPrebid(slot, div_id) pbjs.que.push(function() pbjs.request bids( timeout: PREBID_TIMEOUT, adUnitCodes: [div_id], bidsBackHandler: function() pbjs.setTargetingForGPTAsync( [div_id]; googletag.pubads(). refresh(slot); ); );// endd of initDynamicSlotPrebid []Now, let’s jump on setting up the advertisement server using Google Ad Supervisor.

How To Set Up GAM For Header Bidding

[]Advertisement servers need to have lots of cost top priority line products with crucial hb_pb targeting all possible CPM values, such as hb_pb=0.04, hb_pb=0.03, etc 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 an essential worth targeting hb_pb = 2.62.
  • Given that the order has the very same CPM worth, GAM comprehends that there is a quote at $2.62.
  • GAM runs an AdX auction and has to pay more than $2.62 in order to win the bid and show a Google Advertisement.
  • []As I discussed above, you would need to build line items in GAM with specific granularity, state 0.01– and for the CPM range $0-$20, you would need to develop 2,000 line items, which are difficult to do by hand.

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

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

    []It is a somewhat complicated task, however 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 establish Google Advertisement Manager and understand the following:

    Step 1: Enable API Gain Access To

    []In the Google Advertisement manager International > General settings area, make sure API gain access to is allowed.

    []Click on 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 Supervisor, December 2022 Step 2: Produce A New Job

    Browse to Google API Console

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

    []a brand-new job, enter a name for the task, and, additionally, modify the offered Task ID. Click Create.

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

    []. Click Create to download a file containing a personal key. Screenshot from Google API Console Credentials page, Deccember 2022 Screenshot from Google API Console Credentials page, Deccember 2022 Fill out the service account details you have actually created above. Assign the function “owner” and create the service account OAuth2 qualifications. Then, click on the produced user and produce JSON type secret, and download it. Screenshot from Google API Console Credentials page, Deccember 2022 Step 3: Download Job 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 operating system in order to develop the job. 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 removing”;” in front of and set”soap.wsdl _ cache_ttl=0″ and reboot Apache from the control panel of XAMPP. Step 5: Develop Subfolders And Build The Task Once you have everything established

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

    []n’t updated because 2019, to use the current version 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 celebration here “if you have git set up), and run composer update in the PC terminal or git terminal. It will create subfolders and construct the job. Step 6: Set Up Your Google Advertisement Supervisor Credentials Move the downloaded JSON key “gam-api-54545-0c04qd8fcb. json” file into the root folder of

    the job you’ve constructed. Next, download adsapi_php. ini file []and established your Google Advertisement 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 =” gam-api-us[email protected]”jsonKeyFilePath is the outright directory site path to the JSON essential file in the folder root. Step 7: Set The Material Of The File Finally, navigate to the file/ script/tests/ConnexionTest

    []. php and set the content of the file like listed below: putenv(‘ HOUSE =’. 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 celebration console) test the connection by running the command(if you are in the/ script/tests/ folder). php ConnexionTest.php You must see a message”= == =Connection okay====” Action 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 set up the specifications in the $entry and$buckets selections per your requirements.

    []putenv(‘ HOUSE= ‘. dirname (__ DIR __).”/./”); need __ DIR __.’/././ vendor/autoload. php ‘; use App Scripts HeaderBiddingScript;$bucket_range=selection(); $Your_Advertiser_Name=’Sample_Advertiser’; $pails=[“pails”=> [[‘precision’=> 2,’minutes ‘=> 0,’max’= > 4.00,’increment’= > 0.01], [‘ precision ‘= > 2, ‘minutes’ => 4.01, ‘max’ => 8.00, ‘increment’ => 0.05],]]; foreach ($ containers [” containers”] as $k => $bucket) $request_bucket = range( ‘pails’ => variety( $bucket) ); $order_name=’Your_Order_name ‘.$bucket [‘ minutes’]’-‘.$bucket [‘ max’];

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

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

    []php ConnexionTest.php

    []There is a tool using Python that is utilized similarly; you may wish to provide it a try too.

    Debugging

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

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

    []You need to ensure that hb_pb key worths are passed to Google Advertisement Manager. 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 should see that hb_pb worths are set and passed to the advertisement server.

    Screenshot from Google API Console Credentials page, Deccember 2022

    Choose A Consent Management System

    []Users’ personal privacy is among the most essential elements, and you wish to make sure that you abide by both GDPR and GPP.

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

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

    Conclusion

    []You might discover it surprising that establishing header bidding involves so many actions, but it is truly worth it to carry out. It can easily enhance your income by +30% or more by producing 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 might sign up for and ask concerns to the neighborhood.

    []I hope that after reading this post, you will discover it easier to establish header bidding and improve the money making of your website.

    []More resources:

    []Included Image: Best SMM Panel