Google adsense : is there a slotrenderenderevent? - adsense

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

Related

Facebook Insights API Conversions are NOT matching Facebook Ads manager Results

When trying to fetch Facebook insights API for the following action offsite_conversion.fb_pixel_purchase I always get less number than Facebook show on their ad manager, I tried to inspect their network calls and URL structure and I see they're using the same field offsite_conversion.fb_pixel_purchase to show Results I am not sure why the numbers are mis-matching. I tried to query from the Graph API and from my shell with the same results.
You may check use_account_attribution_setting and use_unified_attribution_setting in here: https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group/insights
Setting use_unified_attribution_setting to true worked for me.
I did some testing and found out that if you use an additional breakdown, FB will return less conversions. There might be a bug in their API when you use breakdowns.
I tried getting offsite_conversion.fb_pixel_purchase with
'breakdowns' => 'hourly_stats_aggregated_by_advertiser_time_zone',
and facebook retuned 5 conversions.
if I remove the breakdown and get the data grouped daily I get 11 conversions which is what Facebook Ads Manager shows

Google ad manager ad slot sizes default behavior

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

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

"call_to_action_type field in creative is required in this ad" returned while creating ads using marketing api

When I use adcreatives endpoint with object_story_spec parameter to create ads or using object_story_id parameter following instructions in this link :
I got this error message:
{"error":{"message":"Invalid
parameter","type":"FacebookApiException","code":100,"error_subcode":1487664,"is_transient":false,"error_user_title":"Missing
Call To Action Type","error_user_msg":"call_to_action_type field in
creative is required in this ad"}}
Anyone knows how to solve this problem?
Are you not setting the call_to_action field? While it's not explicitly stated in the docs (as far as I can see) the field is mentioned for all ads for mobile app install or engagement campaigns so I suggest setting it.
https://developers.facebook.com/docs/marketing-api/mobile-app-ads/v2.2#cta_definitions