Adsense ad code bug
-
Today I noticed there is serious issue in Adsense ad code which generated using account ID and ad slot ID.
See this code has no spaces between
data-ad-slot="1697923694"data-auto-format="rspv"<amp-ad class="amp-ad-1" type="adsense" width=100vw height=320 data-ad-client="ca-pub-3918084299684199" data-ad-slot="1697923694"data-auto-format="rspv" data-full-width>If you do view source in Firefox browser you’ll see adsense code in red color due to no spaces (code line number 899, code line number 924, code line number 1121).
Please fix this issue
The page I need help with: [log in to see the link]
-
Also I see some differences between your plugin’s adsense ad code and original adsense code.
Your code:
<amp-ad class="amp-ad-1" type="adsense" width=100vw height=320 data-ad-client="ca-pub-3918084299684199" data-ad-slot="4519140623"data-auto-format="rspv" data-full-width><div overflow></div></amp-ad>Original code:
<amp-ad width="100vw" height="320" type="adsense" data-ad-client="ca-pub-3918084299684199" data-ad-slot="4519140623" data-auto-format="rspv" data-full-width=""> <div overflow=""></div> </amp-ad>Followings are incorrect parts I noticed in your ad code:
1.
data-ad-slot="4519140623"data-auto-format="rspv"(No spaces)
2.data-full-width>( data-full-width=""is missing )
3.<div overflow>( data-full-width=""is missing )4. This might be not and issue, but also check this as well:
<script custom-element="amp-position-observer" src="https://cdn.ampproject.org/v0/amp-position-observer-0.1.js" async></script> <script custom-element="amp-animation" src="https://cdn.ampproject.org/v0/amp-animation-0.1.js" async></script> <script custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js" async></script>asyncshould be added at very first,<script asyncOriginal Adsense AMP ad code implementation has:
<script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>Thank you for your valuable information. Can you please share the list of active plugins on your AMP page?
@ahmedkaludi I removed adsense ad codes 5 minutes ago.
I will only use adsense amp auto ads from now.
It’ll need only the code between <head></head> and another code between <body></body>
Those are appearing correctly.
So you can check adsense ad code issues by placing ad codes from your end.
yes, we tried and many other customers tried and it is working fine, there seems to be a specific issue, I want to help you but I need to see the issue, only then we can do something about it
@ahmedkaludi ok, I’m using following wordpress plugins for my site:
- Accelerated Mobile Pages – (By Ahmed Kaludi, Mohammed Kaludi)
- Akismet Anti-Spam – (By Automattic)
- All 404 Redirect to Homepage – (By Fakhri Alsadi)
- Better Recent Comments – (By Barn2 Media)
- Better Search Replace – (By Delicious Brains)
- Classic Editor – (By WordPress Contributors)
- Cookie Notice – (By dFactory)
- Default featured image – (By Jan Willem Oostendorp)
- Form Maker – (By 10Web Form Builder Team)
- Limit Login Attempts Reloaded – (By WPChef)
- MaxButtons – (By Max Foundry)
- Plugins Garbage Collector – (By Vladimir Garagulya)
- Really Simple SSL – (By Rogier Lankhorst, Mark Wolters)
- Widget Logic – (By WPChef)
- WP Super Cache – (By Automattic)
- WP Twitter Auto Publish – (By xyzscripts.com)
- Yoast SEO – (By Team Yoast)
-
This reply was modified 6 years ago by
onlanka. Reason: some formatting added
The topic ‘Adsense ad code bug’ is closed to new replies.