How to Add AdSense to WordPress (Visual Guide)

Disclosure: We may earn a commission when you click on links to products or services we recommend. This helps us keep our content free for all. Learn more about how One Smart Sheep is funded.

Are you looking for the best guide on adding Google AdSense to WordPress with screenshots?

We've got you covered.

We understand Google AdSense is one of the best ways to earn handsome money from the internet, especially WordPress owners.

Don't you believe me? Here are my earnings from Google AdSense. I know it's not huge :D

In this article, you'll learn the followings:

  • How to add Google AdSense to WordPress in 2 ways: manually and using a plugin.
  • How much money you can earn with Google AdSense on WordPress.
  • Frequently asked questions about adding Google AdSense to WordPress.

Are you ready? Let's get started.

What is Google AdSense?

Google AdSense employs technologies to serve advertisements based on the website content, the user's geographic location, and other aspects.

It has no doubt AdSense is among the most well-known monetization platforms globally, not because it offers the highest quality of ads but gives the highest earnings to the publishers than any other platform on the planet.

You might think how Google earns 160 billion U.S. dollars per year?

Google receives money from the advertisers that bid to show their ads on Google Search using Google Ads.

Did you know? Almost every niche uses Google AdSense to earn money. Take the below examples:

  • Pitchfork - Music Blog
  • TechRadar - Technology News and Reviews Blog
  • Freepik - Free Vector and Graphic Resource Website
  • The Guardian - News Website

Did you know? More than 38 million websites use Google AdSense, according to Builtwith.

The secret to generating a handsome amount of money through Google AdSense is to write high-quality content on keywords that people search.

According to SERPIQ, the top websites have a higher word count than the ones that rank lower.

Simply learning SEO can give you the advantage of dominating your website on Google Search, of course, generating more money from Google AdSense.

How Does Google AdSense Work with WordPress?

Google AdSense and Google ads work together. Google Ads have advertisers that bid on keywords, and their ads are shown on publishers' websites using Google AdSense.

In a nutshell, Google AdSense works based on three steps:

a) You place the ads on your website. Google AdSense offers different ad units to place on your website to earn revenue.

b) Ads appear on your website. The advertisers who have paid the most money to Google will be able to place ads on your website using Google Ads.

c) Get the payment. When you have earned at least $100, you get paid.

How to Add AdSense to WordPress [Step by Step]

I’ll explain two ways to add AdSense to WordPress: manually and using a plugin.

Before You Start: Approve Google AdSense On Your Website

You cannot add Google AdSense to your WordPress until you have approved Google AdSense.

It’s not 2003 when you could sign up for Google AdSense and show ads instantly.

But don’t worry, I’ll explain how you can use my experience to approve your Google AdSense:

  • Write at least 50 articles on your website on the niche that Google AdSense allows. Not have an idea? Simple go to the AdSense calculator and see the category you can work on.
  • Make sure the content you write is based on low competition keywords.

Want to know how to find the best topics? Go to Google Trends and have a look at the trend trends.

Now visit AnswerthePublic and write the topic you’re interested in.

The tool will show you all the keywords extracted from Google API instantly. These are the keywords that are being searched on the internet.

Warning: Google Trends show the keyword, Super Bowl 2021,  is a seasonal keyword meaning you'll get traffic until the season lasts. You should select evergreen keywords from the SEO tools like SEMrush, Ahrefs, or Ubersuggest.

  • Now apply for Google AdSense approval with a new Google account — important. You’ll get a Google AdSense code to place inside the <head>.

Now go to Appearance > Theme Editor > Header.php > Paste the code within <head> as shown below. Don’t forget to update the file.

You’ll get approval within a week, provided your website is ready, meaning to have 50 unique articles.

Way 1 - Adding AdSense to WordPress with a Plugin

Wordpress.org is filled with 8000+ plugins for Google AdSense.

Not all plugins are created equal. I'll recommend installing the plugin "Ads by WP QUADS."

The reason is simple. It has been installed by more than 60,000 with 5-star ratings.

And the best part? The features it provides:

  • Geo-Targeting. You can target the ads based on the city and countries.
  • Google AdSense: It supports all ad types.
  • Easy to use. The panel is built on React J.S.

And many more great features.

Without further waiting, install the plugin on your website. Once you have installed it, go to WP QUADS > Ads. Click to Create Ad.

You come up with plenty of ad integrations, select Google AdSense.

You can select any ad type like Display Ads, In-feed Ads, In-article Ads, Auto Ads, and matched content.

It demands data like Data Client ID, Data Slot ID, and the Size of your ad.

At the moment, we don’t have the above data since we haven’t created the ad unit in Google AdSense.

Login to our AdSense account and create a Display ad unit. Once you have signed in the Google AdSense, go to Ads > Overview > by Ad Unit.

You’ll develop a new window where you can name your ad, display ad types like square, horizontal or vertical, select the ad size to be responsive, and click Create.

You’ll instantly get all the important data we needed, like a data ad client and the data ad slot.

Copy and paste into the WP QUADS boxes like this:

Then it asks a few simple questions about the ads where they should appear on your website.

It means you can show any ad:

  • Beginning of Post
  • Middle of Post
  • End of Post
  • Right after the <!--more→ tag
  • Right before the last Paragraph
  • After Paragraph
  • After Image
  • By Word Count
  • After the Percentage
  • Ad After HTML tag
  • Ads in between Loop
  • Shortcode (Manually)

So I selected the Display ads and put them at the beginning of the post. I selected the ads that should appear on all the posts I have published on my blog.

Of course, you have the option to disable ads on certain conditions like the country, city, To the, and user-agent.

Once you have done the steps, it’s time to publish our ad.

You’ll get a success message.

As you can see, the ad is appearing after the first paragraph.

To create the second ad, click on the button Create Ad.

Way 2 - Adding AdSense to WordPress without a Plugin

It’s a good practice to add AdSense to your WordPress site without a plugin, as the plugins are among the major reasons that make WordPress vulnerable to hacking.

The fewer the plugins, the better for your website’s security and performance. It’s time to add Google AdSense to WordPress without using any plugin.

Let’s first create an ad unit from scratch. This time, let’s create the Link ads.

You’ll get plenty of options to choose from, for instance, ad size, text color, and background color.

Take a look at the data ad client and the data ad slot.

So, we want to put the ads after the second paragraph manually.  Go to Appearance> Theme Editor > choose Theme Function, function.php. Now paste the below code anywhere.

//Place ads after the 2nd paragraph.

add_filter( 'the_content', 'prefix_insert_post_ads' );

function prefix_insert_post_ads( $content ) {

       $ad_code = '<div>Ads code goes here</div>';

       if ( is_single() && ! is_admin() ) {

           return prefix_insert_after_paragraph( $ad_code, 2, $content );

       }

       return $content;

}

// Parent Function that makes the magic happen

function prefix_insert_after_paragraph( $insertion, $paragraph_id, $content ) {

       $closing_p = '</p>';

       $paragraphs = explode( $closing_p, $content );

       foreach ($paragraphs as $index => $paragraph) {

           if ( trim( $paragraph ) ) {

               $paragraphs[$index] .= $closing_p;

           }

           if ( $paragraph_id == $index + 1 ) {

               $paragraphs[$index] .= $insertion;

           }

       }

       return implode( '', $paragraphs );

}

You should paste your ad code within the phrase that says, “Ads code goes here.” You can paste here any ad type code, even an HTML picture.

Moreover, if you want to show the ad after the paragraph 12, you can change from the following code “return prefix_insert_after_paragraph( $ad_code, 2, $content );”

Once you have pasted the code, don’t forget to hit the button Save Changes.

Optimizing AdSense Revenue on Your WordPress Site

Adding AdSense to your WordPress site is the first step in monetizing your content. To maximize your earnings, it is essential to optimize your AdSense setup. Here are some tips on how to optimize AdSense revenue on your WordPress site:

Choose High-Performing Ad Formats

Experiment with different ad formats, such as display ads, link units, and text ads, to find the ones that perform best on your site. Display ads are traditional banner ads that display in a rectangular or square shape. Link units are small link-style ads that are designed to blend in with your site's content.

Text ads are simple text-based ads that display relevant ads to your users based on the content of your pages. Try testing different ad formats on your site to see which ones perform best and generate the most revenue.

Optimize Ad Placement

Place ads in prominent locations where they are most likely to be seen and clicked. You can try different ad placements, such as above the fold, in the middle of the post, or in the sidebar, to see what works best for your site. Above the fold refers to the portion of a website that is visible without having to scroll down.

Placing ads in this area can increase visibility and engagement but keep your site manageable and make it look effortless. You can also place the ad in the middle of a post since users will likely see it while engaged with your content. The sidebar is another popular location for ads, as it is visible on every page of your site.

Improve Website Traffic

The more traffic your site receives, the more potential impressions and clicks you have. Focus on improving your website traffic through search engine optimization (SEO), social media marketing, and content marketing. SEO involves optimizing your website to rank higher in search engine results pages (SERPs), making it easier for users to find your site.

Social media marketing involves promoting your site on social media platforms to reach a larger audience. Content marketing involves creating valuable and relevant content your target audience is interested in to drive traffic to your site.

Use Google Analytics

Google Analytics can provide valuable insights into your AdSense earnings and help you optimize your ads. You can use Google Analytics to track AdSense performance and see which ads perform best.

You can also track important metrics such as ad impressions, click-through rate (CTR), and earnings. This data can help you make informed decisions about ad placement, ad formats, and overall AdSense optimization.

Experiment With Ad Sizes

Different ad sizes can significantly impact earnings. Try using different ad sizes to find the ones that perform best on your site. The most common ad sizes are 300x250 pixels, 728x90 pixels, and 336x280 pixels.

Experiment with different ad sizes to see which ones generate the most revenue on your site. Remember that larger ad sizes generate more revenue but can also take up more real estate on your site and potentially detract from the user experience.

Following these tips can optimize your AdSense setup and maximize your earnings. Remember, optimizing AdSense revenue is ongoing, so be open to experimenting and making changes as needed. Keep track of your AdSense performance and make necessary adjustments to improve your earnings.

Final Thoughts

Adding Google AdSense to WordPress is easy. All you need is to copy the ad unit script and paste it into your website's desired location.

If you don’t know how to place ads manually, you can use any Google AdSense plugin. It places ads automatically across your website.

As we discussed, it’s better to place ads without a plugin since plugins contribute the most vulnerabilities in WordPress.

If you have a question, don’t hesitate to ask below. I promise you’ll get a reply.

Frequently Asked Questions

Is Google AdSense Free?

Fortunately, Google AdSense is 100% free. You don’t need to pay anything to use its service. Google doesn’t need your money to pay you the money. ?

When Does Google AdSense Pay?

Google AdSense starts releasing payments to publishers from the 21st of each month. Many publishers get payments between 21 to 26 of each month.

For example, if you choose Western Union, you’re more likely to receive your payment on the 22nd of each month or before.

Is Google AdSense Worth It?

Yes, Google AdSense is worth it, depending on the niche you work on. For example, if you write content on the best gaming laptop, you can earn double or triple using the Amazon Affiliate program instead of earning from your Google AdSense. It’s better to find the best affiliate network that pays the highest amount in your niche.

Is Google AdSense Safe?

Google AdSense is 100% safe since Google created it in 2004 and has been improving the product since then — 17 years of continuous improvement.

Some Google AdSense accounts are banned due to the invalid activity when competitors start clicking on your ads.

How to Keep Google AdSense Safe from Invalid Activity?

You can take plenty of precautionary measures like installing Cloudflare and set the security to Under Attack. And block the visitor if he clicks on your ad twice. And don’t show up ads to the countries that are dangerous like Russia.

Can Google AdSense Pay To Paypal?

Unfortunately, Google AdSense doesn’t pay to Paypal. Google AdSense allows you to collect payment from the following methods:

  • Checks
  • Electronic Funds Transfer (EFT)
  • EFT via Single Euro Payments Area (SEPA)
  • Rapida
  • Wire Transfer.

How Google AdSense Calculates Earnings?

Google AdSense calculates earnings based on various factors like the country where the visitors came from, the niche you’re working on, and the ad quality.

For example, if you get most of the USA traffic, you can earn 10 times more than India's traffic.

Did you know Google AdSense has created a calculator that shows you the estimated earning you can earn from Google AdSense depending on your website traffic?

What’s the best AdSense Ad Size?

The best performing Google AdSense ad sizes are the followings:

  • The Medium Rectangle (300×250)
  • Large Rectangle (336×280)
  • The Leaderboard (728×90)
  • Half Page aka Large Skyscraper (300×600)
  • Large Mobile Banner (320×100)
  • Mobile Leaderboard (320×50)

What’s the Best AdSense Placement?

It’s tricky. My trick is to find the ad placement of the best website in your country that has been in the industry for more than a decade because they have cracked the code of earning the most money.

The best-performing ad placement is in the header, before the first paragraph, the last paragraph, on the sidebar, and ad placement every after 10 paragraphs.

WordPress Website
Starting $450 USD
Details
Wix to WP Migration
Starting $450 USD
Details
HTML to WordPress
Starting $450 USD
Details
Webflow to WordPress
Starting $450 USD
Details