Friday, October 1, 2021

Digest for adsense-api@googlegroups.com - 2 updates in 1 topic

Advanced Ads <thomas@wpadvancedads.com>: Sep 30 12:59AM -0700

Hi there,
 
version 2.0 of the AdSense Management API delivers wrong ad unit codes for
native ads.
 
Using the codes from the API causes the In-feed ad unit to not show up.
In-article and Matched Content show up, but I am not sure if they are
identical. I.e., In-article might fall back to display as "Display" ads.
 
An example for In-feed:
 
Code from the API:
 
<script async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- In-feed -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-123"
data-ad-slot="321"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
 
Code for the same ad unit from the AdSense account UI:
 
<script async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-123"
crossorigin="anonymous"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-format="fluid"
data-ad-layout-key="-6j+ed+2i-1n-4w"
data-ad-client="ca-pub-123"
data-ad-slot="321"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
 
This also happened with 1.4, until we reported it a while ago, and then
delivering ad unit codes for native ads was at least stopped. That wasn't
perfect but allowed us to offer alternatives to users.
 
Was this overlooked in API 2.0 or did I miss something?
 
Thomas
Ad Sense API <adsenseapi@forumsupport.google>: Sep 30 08:29PM

Hi, Thomas.
 
Thanks for bringing this to our attention. I've raised a bug with an engineer who can correct this issue. For the short term, they will throw errors on in-feed/in-article/matched-content Ad Units, similar to the v1.4 behavior. Long term, they will look into the possibility of sending the same ad codes for these Ad Units as the UI does. Does that solution meet your use case?
 
Donovan McMurray
AdSense API Team
ref:_00D1U1174p._5004Q2OVV2R:ref
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to adsense-api+unsubscribe@googlegroups.com.

No comments:

Post a Comment