Google ad manager ad slot sizes default behavior - google-dfp

Official implementation of gpt defineSlot function, states that ad unit sizes can be defined via array, like this:
googletag.defineSlot('/1234567/sports', [728, 90], 'div-1');
What is the default implementation for this beehavior? Can we define all possible sizes in advance, to be requested from the frontend on each request, but let our admanager team to define sizes on the backend?
The goal is to avoid constant code changes, as our ad unit team works and tests different sizes.
Example. If we put following line in code
googletag.defineSlot('/1234567/sports', [[728, 90],[300,250]], 'div-1');
And our adManager team defines sets for ad unit /sports/ to deliver only 300x250.
Will this be valid behavior for google, and will deliver only 300x250 demand, ignoring other requested unit sizes?

The Google Publisher Tag API allows you to define multiple ad sizes for a unique ad placement.
Regarding your defined slot sample :
googletag.defineSlot('/1234567/sports', [[728, 90],[300,250]], 'div-1');
the behavior would be the following :
Google Ad Manager will create a slot where 728x90 and 300x250 are accepted
When the slot is requested, Google Ad Manager will select any activated line item with these sizes
when rendered, the ad placement will display only 728x90 or 300x250 creatives

Related

Google DFP ad slot sizes and stats mismatch

I am using Google DFP and define ad slot like this:
googletag.defineSlot('/1234567/my-beautiful-slot', [[728, 90],[300,250],[640,400]], 'the-best-div-ever');
What I expect is googletag makes requests with all the sizes provided and its reflected in statistics. However, what I actually see in the stats for ad requests is multiple combinations of sizes, say: "728x90, 640x400", "300x250", "728x90, 300x250" etc.
Why not all sizes are present in all requests? It looks like googletag choses some subset on the client, but Im not really sure and cant find any confirmation in manuals.

Google adsense : is there a slotrenderenderevent?

I dont find anything in Google Adsense's documentation : does Adsense has adslotrendered event, like the Google Publishers tag?
Thanks !
No, adsense has no features like this.
Only gpt support slotrendered event.
*** Update
Now AdSense add two tags to its ad units
Depending on whether or not an ad was returned, this parameter will update to one of the following:
data-ad-status="filled" An ad was returned to the ad unit and is now showing.
data-ad-status="unfilled" No ads were returned and the ad unit is empty.
You can check if the ad unit is empty or not by querying data-ad-status
More info: https://support.google.com/adsense/answer/10762946?hl=en

Prebid.js DFP How they work together

I'm kinda a newbie at header bidding and prebid but I am trying to understand how prebid and DFP work together. Does prebid do its auction when the page loads and then after that it goes to DFP to see if it has any better ads to serve? Then whatever ad is suppose to be rendered it will ultimately be rendered by prebid onto the page?
Thanks for the help.
Prebid.js works by updating targeting(key/values) before the page requests ads from GPT.
Here is how the flow might go:
Initialize GPT, making sure to disable initial load.
Setup each Ad slot for GPT with information about the ad, like the allowable size
Setup each Ad slot for Prebid creating AdUnits for them.
Make call to Prebid to start the auction
Wait for Prebid to notify you of the end of auction, some of the bids comeback might timeout
Update slot targeting with parameters with the results of the header bidding auction (using pbjs.setTargetingForGPTAsync()).
Call GPT to refresh the ads slots affected by the auction
DFP will use the information in the targeting for potentially displaying header bidding ads that have a higher priority than the ads that would have been displayed
Prebid.js has bid adapters for a number of SSPs these are used to abstract bid logic because each adapter requires different setup information.
You must setup relationships which each of this SSPs, they will tell what parameters to send them and how to setup line items in DFP.
Here is example of the data prebid returns Prebid.js
{
"/9968336/header-bid-tag-0": {
"hb_bidder": "rubicon",
"hb_adid": "13f44b0d3c",
"hb_pb": "1.50"
},
"/9968336/header-bid-tag-1": {
"hb_bidder": "openx",
"hb_adid": "147ac541a",
"hb_pb": "1.00"
},
"/9968336/header-bid-tag-2": {
"hb_bidder": "appnexus",
"hb_adid": "147ac541a",
"hb_pb": "2.50",
"hb_deal_appnexus": "ABC_123"
}
}
In this case we know rubicon was the highest bidder for slot /9968336/header-bid-tag-0 with a bid of $1.50

Is there a Google DFP api to check whether an ad units is active or not?

Is there a Google DFP api to check whether an ad unit is active or not ?
Any suggestions are appreciated! Thanks
The google publisher console can help check for active ad units, https://support.google.com/dfp_sb/answer/2462712?hl=en.
It depends on what you mean by "whether an ad unit is active or not". In general it's best to be as descriptive as posible in questions and to include what you've already tried, it saves time in the answers. I'll do my best.
If you're trying to debug whether it was properly loaded on the site, then I'd suggest you debug using the DoubleClick Publisher Console, which you can activate by adding ?googfc to the end of the URL. In there you can check which ad units are called and their status, and you can also follow the execution on the History tab inside the console.
You could also use the Google Publisher Toolbar chrome extension, which has some more information on the ad being rendered, the line item, etc.
Moreover, you could set up an event listener and render information to the developer console.
googletag.pubads().addEventListener('slotRenderEnded', function(event) {
console.info(event);
}
});
This code should be included inside the googlgoogletag.cmd.push(function() {}) and below the slot definitions (e.g.: the method defineSlot()).
However, if you want to do is programatically check if an ad unit is active prior to calling it or defining it, then I think you should rephrase the question to be a bit more specific.

Checking which Google DoubleClick For Publishers (DFP) ad was served

I'm finding that some advertisers are over-aggressively reneging on ad impressions that have low viewability. As a result, I'd like to do my own audit of viewability per ad, rendering only just as the ad scrolls into view. I'll be tracking this with MixPanel, but was wondering if there is any way to insert a callback in the GPT API to determine which creative and line item was served after the fact.
Just listing this here for future searches:
googletag.events.SlotRenderEndedEvent seems be the best way to go about this as it provides access to several parameters including creativeId and the LineItemId.
Full reference here --> https://developers.google.com/doubleclick-gpt/reference#googletageventsslotrenderendedevent