In this post, we like to show you how to place Adsense ad code in the
So in this post, we gonna use a
That
Okay, Lets find out!
How use Ad Inserter to place Adsense code on WordPress site
Beforehand make sure you have installed Yoast SEO + Glue for Yoast SEO & AMP and of course AMP for WordPress by Automattic on your site.
We start with how to place Adsense code on WordPress site AMP version.
How to setup Adsense ad on AMP WordPress
First, you need to install the Ad Inserter plugin, the easy way to do it is go to the
When plugins activated, go to Settings > Ad Inserter in WP Admin to access the plugin settings page.
Inside Ad Inserter plugins page paste Adsense code from your Google Adsense account to Ad Inserter block, in this example I use block 1. Also, make sure you have create a custom ad unit for AMP version.
Next, click on the
Once you import the Adsense code, enable AMP Ad by choosing it Above or Below the fold, in Ad Type choose Standard, and in size choose the Responsive.
When done, click the Arrow down button to generate the Adsense code for AMP page of your site.
Below is the
Click Save All Settings to save the block setting.
We don’t finish yet ladies and gentleman, in order to make Adsense ad works on AMP site version you need to put AMP Ad / AMP embedded script inside your site header.
To do that, after you save the block setting copy the AMP Ad embedded code and paste it to site Header. Luckily you can do that with Ad Inserter.
Just go to Settings by clicking the ‘Gear’ button in the top right at the and of block numbers. And choose the ‘Header’ tab. Paste the script there then turn on the Header setting by
Tips #1 If you want to activate the Auto ads you also can put the code here.
Tips #2 For you, who just sign up to Google Adsense, you can also put Page Level Ads code here 🙂
Okay! when done, don’t forget to Save settings
The AMP Ad setup
For the final steps, go back to block 1 where you set
Just like screenshot above;
In ‘Automatic Insertion‘ choose Before or After paragraph.
Mark down only in ‘Posts‘ pages.
In Paragraph(s) you can try my settings like in the screenshot. Or, follow the built-in hover guide of Ad Inserter when you place your pointer in the Paragraph(s) form.
In ‘Count’ you can set it from ‘Bottom’ or ‘Top’ is up to you.
In the ‘Insertion’ tab just check mark for Ajax requests.
Then Save All Settings ! and you are done!
Just closing words
That
Thanks for reading, until the next post about WordPress and Blogging categories.
Good luck! ?
Discover more from Digimanx
Subscribe to get the latest posts sent to your email.
Michael says
My 2 cents: Ad Inserter is (like AdRotate) a nice and easy to use plugin if you just start to monetize your blog. But if you want to improve your revenues seriously, you will need to spend more time on ad optimization. I recommend the plugin Advanced Ads (https://wordpress.org/plugins/advanced-ads/) for this task, because there are no limits like in AdInserter, where you can create only 16 ad blocks in the free version.
Hermansyah Filani says
Hi Michael!
Yeah! 16 enough for me, as i only use 3 of Ad Inserter blocks
But, Thanks for your advice anyway, maybe i will try it on my other website ?
mad says
yes it works but only in my wordpress admin. It’s not showing at the brower when you clicked at any your post article there. How to fix this, should i wait for google indexing my amp site. Hope you answer my question. thank you.
Hermansyah Filani says
Yeah just wait, it should work 🙂