The header bidding innovation began to develop in 2015, and has actually since assisted many publishers to grow their profits by as much as 40% (and even, sometimes, to levels of 100% or more.)
What Is Header Bidding?
Header bidding is an innovative method where publishers offer their advertisement inventory to many advertisement exchanges, also called Supply-Side Platforms (or SSPs), all at once before making calls to their advertisement servers.
Here are the actions a publisher needs to pass to have this technology power up its money making.
- Apply to SSP partners and get approval.
- Implement Prebid.JS on website.
- Configure ad server.
- Select an authorization management system.
- Test and debug.
Applying To SSP Partners
There are numerous SSP partners offered in the list to use, but I want to discuss what I think to be the most popular ones:
- Index Exchange.
- Amazon UAM/TAM.
- Xandr (previously AppNexus).
- Magnite (previously Rubicon).
One requires to find their online application and pass through the business’s verification procedure. For example, when it comes to Xandr, the contact page appears like this:
Screenshot from Xandr, December 2022 Take note of the minimum inventory size required to be eligible for using. Yes, that is an incredible high of 50M advertisement impressions a month. You may require quite an impressive website to be able to use to some of the advertisement networks. We will call them further bidders, as they bid on inventory in genuine time. However, not all SSPs have such high thresholds for application.
For example, Sharethrough just needs 20M ad impressions. Besides, they think about also audience quality, traffic geolocation, just how much time users spend on the site, etc. It generally takes a few weeks after applying to be approved and onboarded
with them, so it can be a relatively 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 web page, an ad demand is made to all bidders(SSP partners). Bidders react with their CPM quotes– 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 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 advertisement. 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 Ad Manager, December 2022 The technique here is that auctions take place in real-time, which develops buying pressure on Google AdX to pay the greatest
CPM possible. If Google AdX doesn’t have any competition, it will offer the most affordable CPM possible– as it wants to buy inventory for the most inexpensive price
possible. With header bidding, bidders are able to contend and push CPMs (and for that reason profits) up. There are 2 ways to implement header bidding
operated on the server. Let’s go over 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 Advertisement Supervisor(or advertisement server).
Implement Prebid.js On Your Site Prebid.js is a header bidding platform that has more than 200 demand sources integrated. You require to choose the SSP partners you are working with
from the customize page and download the library developed for your specific configuration. Don’t forget to choose 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]]
Basic Prebid.js Example
Let’s break down the code above.
- The first lines pack all required JS files and our personalized Prebid.JS file.
- Ad slots are specified in the adUnits array 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 called to disable ad demand to be sent out to Google Ad Manager till Prebid.js ends up the auction.
- pbjs.requestBids function calls SSP partners and determines the winner.
- initAdserver() function is called to send out an ad request to the Google Advertisement Manager with hb_pb secret, which consists of the winning CPM value, e.g. hb_pb=”1.5 ″. (This action is connected with setting up Google Ad 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 sends back either the AdX advertisement with a greater CPM, or the advertisement of the winning SSP.
For your specific case, you might need to code in a different way and alter the setup, but the concept stays the same.
Other than that, I want to rapidly discuss how to execute lazy loading, since it is a bit different.
How To Execute Lazy Loading
The Google tag for publishers has a lazy loading structure which will not operate in the case of header bidding.
This is because you need to run an auction, and figure out and set key values prior to sending out a demand to the advertisement server.
Since of that, I would recommend utilizing the Intersection Observer API to identify when to fill the advertisement in the HTML
options = ; 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) 1055389 function lazySlotPrebid(slot, div_id) // endd of initDynamicSlotPrebid Now, let’s jump on establishing the advertisement server utilizing Google Advertisement Supervisor.
How To Set Up GAM For Header Bidding
Advertisement servers need to have dozens of rate 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 bottom line that makes the header bidding engine work. The auction runs in the browser on page load.
As I discussed above, you would need to build line products in GAM with specific granularity, say 0.01– and for the CPM variety $0-$20, you would require to produce 2,000 line items, which are impossible to do manually.
For that, you would need to utilize GAM API.
Sadly, there are no strong services that you can simply download and run in one click.
It is a somewhat intricate job, however thanks to contributors who constructed 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 comprehend the following:
Step 1: Allow API Access
In the Google Advertisement supervisor Global > General settings area, 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 Ad Supervisor, December 2022 Step 2: Produce A New Project
Browse to Google API Console
Qualifications page. From the task drop-down, pick Produce
a brand-new job, get in a name for the task, and, optionally, modify the offered Project ID. Click Develop.
On the Credentials page, choose Create qualifications, then select Service account secret.Select New service account, and choose JSON
. Click Develop to download a file consisting of a personal key. Screenshot from Google API Console Qualifications page, Deccember 2022 Screenshot from Google API Console Credentials page, Deccember 2022 Fill out the service account information you’ve produced above. Designate the function “owner” and produce the service account OAuth2 qualifications. Then, click the produced user and develop JSON type key, and download it. Screenshot from Google API Console Credentials page, Deccember 2022 Step 3: Download Task Download the project zip file and
unzip it, directory site(additionally, you can use the git command tool to clone the repo). Install composer for your os in order to build the project. Step 4: Change your PHP.INI Modification your php.ini( located 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 panel of XAMPP. Step 5: Develop Subfolders And Build The Job Once you have everything set up
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. Browse and replace in/ app / folder of the task”v201911″with” v202202″, since that git task was
n’t upgraded because 2019, to utilize the most recent variation 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 bash here “if you have git set up), and run composer update in the PC terminal or git terminal. It will develop subfolders and construct the job. Step 6: Establish Your Google Ad Manager Credentials Move the downloaded JSON key “gam-api-54545-0c04qd8fcb. json” file into the root folder of
the project you’ve developed. 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 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 content of the file like listed 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 remain in the/ script/tests/ folder). php ConnexionTest.php You need to see a message”= == =Connection okay====” Step 8: Configure 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$pails varieties per your needs.
putenv(‘ HOME= ‘. dirname (__ DIR __).”/./”); require __ DIR __.’/././ vendor/autoload. php ‘; usage App Scripts HeaderBiddingScript;$bucket_range=selection(); $Your_Advertiser_Name=’Sample_Advertiser’; $pails=[“buckets”=> [[‘accuracy’=> 2,’minutes ‘=> 0,’max’= > 4.00,’increment’= > 0.01], [‘ precision ‘= > 2, ‘minutes’ => 4.01, ‘max’ => 8.00, ‘increment’ => 0.05],]]; foreach ($ buckets [” buckets”] as $k => $bucket)
Additionally you can likewise define ‘geoTargetingList’ => “dz, pk, ke, pt” or customized essential worth targeting customTargeting’ => [‘ amp_pages’ => yes’] if you desire your header bidding to work only when the custom essential value is set.
Run the command below and it will start producing line items per the container settings you have actually defined.
There is a tool utilizing Python that is utilized likewise; you may wish to give it a try as well.
For debugging, there are a couple of 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 watch console logs messages.
You require to make sure that hb_pb key values are passed to Google Ad Manager. Use “/? google_console=1” at the end of the URL to open the GAM console, and click “Shipment Diagnostics” of each advertisement unit.
You must see that hb_pb values are set and passed to the advertisement server.
Screenshot from Google API Console Qualifications page, Deccember 2022
Pick A Permission Management System
Users’ personal privacy is one of the most crucial aspects, and you wish to make sure that you adhere to both GDPR and GPP.
The in-depth instructions on how to set up a consent management system in your wrapper are here.
There are numerous service providers which comply with IAB’s most current standards, and here are a few of the most popular ones:
You may find it surprising that setting up header bidding includes many actions, however it is truly worth it to carry out. It can easily enhance your income by +30% or more by creating selling pressure on Google Advertisements.
This guide is for technically savvy users– but if you have concerns and issues, there is an Adops slack channel you might register for and ask questions to the neighborhood.
I hope that after reading this article, you will find it simpler to establish header bidding and enhance the money making of your website.
Included Image: Online Best SMM Panel