What Is Header Bidding And How To Execute It

Posted by

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

What Is Header Bidding?

[]Header bidding is an advanced technique where publishers offer their advertisement stock to numerous advertisement exchanges, likewise called Supply-Side Platforms (or SSPs), at the same time prior to making calls to their ad servers.

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

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

Applying To SSP Partners

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

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

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

Screenshot from Xandr, December 2022 Focus on the []minimum stock size required to be qualified for applying. Yes, that is a staggering high of 50M advertisement impressions a month. You might require rather an outstanding site to be able to apply to some of the ad networks. We will call them further bidders, as they bid on inventory in real time. Nevertheless, not all SSPs have such high limits for application.

[]For example, Sharethrough just needs 20M advertisement impressions. Besides, they think about likewise audience quality, traffic geolocation, just how much time users spend on the website, etc. It normally takes a few weeks after using to be approved and onboarded

[]with them, so it can be a fairly time-consuming procedure that may 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 demand is made to all bidders(SSP partners). Bidders respond with their CPM bids– let’s say$1

[]and$ 1.50– and Prebid.js makes a demand 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 provides a greater 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 Advertisement Manager, December 2022 The technique here is that auctions take place in real-time, which produces purchasing pressure on Google AdX to pay the highest

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

[]possible. With header bidding, bidders are able to contend and push CPMs (and therefore income) up. There are two ways to implement header bidding

[]: Client-side: When the auction runs via JavaScript in the 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 need to execute Prebid.js on our site and configure our

[]Google Ad Supervisor(or advertisement server).

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

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

[]with GDPR and GPP privacy requirements. 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]]

Standard Prebid.js Example

Div-1

Div-2

[]Let’s break down the code above.

  • The very first lines load all required JS files and our personalized Prebid.JS file.
  • Advertisement slots are defined in the adUnits selection variable.
  • In the adslot meanings, you can see the SSP partners’ names and IDs you will be offered when onboarding when them.
  • googletag.pubads(). disableInitialLoad(); is contacted us to disable ad request to be sent to Google Advertisement Supervisor till Prebid.js ends up the auction.
  • pbjs.requestBids operate calls SSP partners and figures out the winner.
  • initAdserver() function is contacted us to send 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 Advertisement Manager in the next action.)
  • When Google Advertisement Manager 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 advertisement of the winning SSP.

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

[]Besides that, I would like to quickly discuss how to execute lazy loading, since it is a little bit different.

How To Execute Lazy Loading

[]The Google tag for publishers has a lazy loading framework 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 a request to the ad server.

[]Because of that, I would encourage utilizing the Crossway Observer API to figure out when to pack the advertisement 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 call back function, you can run the prebid auction and call the ad server.

function observer_handler( entries, observer) dynamicAdUnit = [code: ‘your_html_div_id’, mediaTypes: , bids: [bidder: ‘appnexus’, params: , bidder: “familiar”, params: ]]; pbjs.addAdUnits(dynamicAdUnit); slot = window.googletag.defineSlot(‘ function lazySlotPrebid(slot, div_id) // endd of initDynamicSlotPrebid []Now, let’s jump on establishing the ad server using Google Advertisement Manager.

How To Establish GAM For Header Bidding

[]Ad servers need to have dozens of rate top priority line items with essential hb_pb targeting all possible CPM worths, such as hb_pb=0.04, hb_pb=0.03, and so on hb_pb crucial 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 to GAM with a key worth targeting hb_pb = 2.62.
  • Because the order has the same CPM value, 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 display a Google Advertisement.
  • []As I pointed out above, you would require to develop line products in GAM with particular granularity, say 0.01– and for the CPM variety $0-$20, you would need to develop 2,000 line products, which are impossible to do manually.

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

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

    []It is a rather complicated task, but thanks to contributors who developed 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 Ad Manager and comprehend the following:

    Step 1: Enable API Gain Access To

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

    []Click 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 Step 2: Produce A New Project

    Browse to Google API Console

    []Qualifications page. From the project drop-down, pick Create

    []a brand-new project, go into a name for the job, and, additionally, modify the offered Project ID. Click Produce.

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

    []. Click Create to download a file including a private key. Screenshot from Google API Console Credentials page, Deccember 2022 Screenshot from Google API Console Qualifications page, Deccember 2022 Fill in the service account details you have actually produced above. Assign the function “owner” and develop the service account OAuth2 qualifications. 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 Task Download the project zip file and

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

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

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

    []n’t upgraded given that 2019, to use the most recent 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 celebration here “if you have actually git installed), and run author upgrade in the PC terminal or git terminal. It will create subfolders and develop the project. Step 6: Set Up Your Google Advertisement Supervisor Credentials 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 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 site course to the JSON crucial file in the folder root. Action 7: Set The Material Of The File Lastly, browse to the file/ script/tests/ConnexionTest

    []. php and set the material of the file like below: putenv(‘ HOME =’. 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 celebration 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 OK====” Step 8: Configure The Parameters Navigate to the

    file/ script/tests/ConnexionTest. php in your project and open it. Copy and paste the below code into that file, and configure the criteria in the $entry and$containers varieties per your needs.

    []putenv(‘ HOUSE= ‘. dirname (__ DIR __).”/./”); need __ DIR __.’/././ vendor/autoload. php ‘; use App Scripts HeaderBiddingScript;$bucket_range=selection(); $Your_Advertiser_Name=’Sample_Advertiser’; $pails=[“buckets”=> [[‘precision’=> 2,’minutes ‘=> 0,’max’= > 4.00,’increment’= > 0.01], [‘ precision ‘= > 2, ‘minutes’ => 4.01, ‘max’ => 8.00, ‘increment’ => 0.05],]]; foreach ($ pails [” containers”] as $k => $bucket) >
    Additionally you can also specify ‘geoTargetingList’ => “dz, pk, ke, pt” or custom essential worth targeting customTargeting’ => [‘ amp_pages’ => yes’] if you want your header bidding to work just when the custom crucial worth is set.

    []Run the command below and it will start producing line items per the bucket settings you’ve specified.

    []php ConnexionTest.php

    []There is a tool using Python that is used similarly; you might want to give it a try too.

    Debugging

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

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

    []You need to ensure that hb_pb secret worths are passed to Google Advertisement Manager. Usage “/? google_console=1” at the end of the URL to open the GAM console, and click “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

    Choose A Consent Management System

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

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

    []There are lots of service providers which adhere to IAB’s latest standards, and here are a few of the most popular ones:

    Conclusion

    []You might discover it surprising that setting up header bidding includes many actions, however it is really worth it to carry out. It can quickly improve your profits by +30% or more by developing selling pressure on Google Ads.

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

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

    []More resources:

    []Included Image: Online Best SMM Panel