This time, we like to show you how to place Adsense ad code in the site. Especially for how to put the ad code on AMP version of your WordPress site. We gonna use a 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 the 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 the 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 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 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 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 ing 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 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 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 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
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 reading, until the next post about WordPress and Blogging categories.
Good luck! ?