In this post we like to show you how to place Adsense ad code in WordPress site. Especially for how to put the ad code on AMP version of your WordPress site.
So, in this post we gonna use WordPress plugin called Ad Inserter. You may already know it and maybe you are here because you still feeling ‘fuzzy’ how to use it properly.
Thats okay, here we try the best to guide you how using Ad Inserter to putting Adsense code on WordPress AMP and also where to put the Adsense Auto Ads code using Ad Inserter.
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 Plugins page in your WP Admin panel, search the plugin using keyword “Ad Inserter” then install and activate the plugin.
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 wrench icon then [<>] icon and choose Adsense tab. Then next step click the arrow up button to Import Adsense ad code
Once you import the Adsense code, enable AMP Ad by choose it Above or Below the fold, in Ad Type choose Standard, and in size choose Responsive.
When you done, click the Arrow down button to generate the Adsense code for AMP page of your site.
Below is example of generated Adsense code for AMP Ad
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 click the ‘Gear’ button in top right at the and of block numbers and choose the ‘Header’ tab. Paste the script there then turn on the Header setting by click the [o] button so it turns green. See screenshot below
Tips #1 If you want to activate the Auto ads you also can put the code here.
Tips #2 For you, who are just sign up to Google Adsense, you can also putting Page Level Ads code here 🙂
Okay! when done, don’t forget to Save settings
The final steps for AMP Ad setup
For the final steps, go back to block 1 where you setup and import the ad code before. Then go to ‘Misc’ settings and follow these setting.
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 guid 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
Thats how to use Ad Inserter plugin for Putting Adsense Code On WordPress Site/AMP. Hope this post useful and don’t feel hesitate to leave a comment below if you wanna share your opinion.
Thanks for read until the next post about WordPress and Blogging categories
Good luck! 🙂