How to add Google AdSense in WordPress? –

Hosting Mautic QuickStart -50% with support in Spanish
24 hours and free training

Send up to 1,000,000 emails/year. Mautic support in Spanish 24 hours, 365 days

When it comes to making the work done to position our blog, corporate website or online store profitable, our first thought, and main reason for the effort, is the sale of our services or products.

But if we have managed to generate considerable visitor traffic, it can be interesting as a monetization strategy. include advertising from others on our website. And the easiest way to do it is via insert Google Adsense in our WordPress.

What is Google Adsense?

is a free platform from Google that allows you to lend your website so that advertisers can show their graphic ads on the web. Google Ads Display Network in exchange for a commission.

Advertisers pay Google a certain amount for each click that a user makes on the ad based on a bidding system.

A percentage of the economic benefit that Google obtains from these ads is directly transferred to your Google Adsense account.

This distribution percentage is usually 68%, that is, for every €100 that advertisers pay for clicks on the ads on your website, Google pays you €68.

Before starting the process of registering an account and inserting Google Adsense ads in WordrPress, it is important that you read them to see if you comply with them, otherwise your account will not be activated.

Sign up for Google Adsense

Creating a new Google Adsense account is relatively simple and the information requested is quite basic:

  1. First you must say in which domain you are going to insert the ads. The indicated url cannot be a subdomain or have folders.
  2. Once the account is active, you can add other domains and subdomains where you want to insert ads and manage everything from the same account.

    You must also indicate the Google account to which your Adsense account will be associated.

  3. In the next step you select the country and you must accept the terms and conditions of the platform.
  4. And in the last step you must add the data for the payment. At this point they ask for your postal address and payment profile, which is the same for all Google platforms.

Once you have completed these four steps, you access the platform and you must verify that you are the owner or have access to the website of the domain you have indicated, for this you are provided with an HTML code that you must insert in your website:

Insert Google Adsense codes

In order to display the ads on your website, you must insert two groups of HTML codes on your website.

  • One is the one referring to the ads themselves, for each ad you must enter where you want an HTML code that Adsense provides you to be displayed. But we will see this in the next point of this post.
  • And the first HTML code that you must enter is the one that allows you to validate that you are the owner or have access to the web, and also loads a java script library necessary for the ads to work.

You have to enter this code between the labels of your website.

Do I have to know programming to be able to insert these codes or do I have to ask a programmer? You don’t need to, luckily WordPress has different options to make this task very simple.

Although if you have sufficient knowledge it is not a bad idea to introduce it without a plugin, always with due precautions and remembering that any modification in the code of your template if you have not created a child theme will be lost when you update it, so we recommend this tutorial for .

I will show you several options so you can choose the one that suits you best.

3.1 Through template settings.

Some of the within its configuration section allow us to add code to the footer, head and other parts of the web.

Each template manages its configuration in a different way, but I find it interesting to tell you how it is done in , from it has opted for this topic due to the possibilities it offers, since they are very interesting both in terms of design and performance.

In the administration area of ​​your WordPress you must look for the DIVI section > Theme Options > Integrations.

You will see that you have a space to paste the generated code in your Adsense account.

3.2 Enter the code through a plugin.

Perhaps this is the most used option, there are different plugins that allow you to enter code both in the head, footer and in other parts of your WordPress.

One of the most installed is .

Once installed and activated you can insert Adsense HTML code From the Settings > Insert Headers and Footers menu:

You have much more information about in this article.

3.3 Through the Site Kit by Google plugin.

This is a plugin developed by Google itself that allows you to link to your website the different Google platforms such as Search Console, Adsense, Analytics and .

Once the Adsense account is linked to your website, either by entering the HTML code in the template, through a plugin or by inserting the ads into the website.

It is important to know that even if you have linked the website with the Adsense account, it may take up to two weeks for the activation of the account to become effective and for the ads to be displayed.

Place Google Adsense ads in WordPress

We can start inserting the ads in the sections of our website that we choose even before Adsense verifies and activates your domain. They just won’t show up.

The way to place the ads is to enter the HTML code that is generated when creating an ad in your Adsense panel where you want the ad to be displayed.

4.1 Obtaining the HTML code of the ads in Google Adsense.

This post is not intended to be an Adsense guide so I am simply going to give some indications of where to obtain the code.

To get the code you must first create the ads on the Adsenses platform itself.

From your platform in the menu on the left you have the “Ads” section. This is where you will create the ads.

You have several possibilities, you can let Google place the ads where it considers best on your website and create the ads, or you can create the ads adapted to the position where you are going to show them.

If you decide to create them yourself and choose where to place them, once the ads are created they appear in the list in the same “Ads” section.

By clicking on the <> symbol that appears in the different options of the list, we can obtain the HTML code that we must enter exactly in the position where we want the ad to appear on our website.

You can see in the image that it gives us the code for the website but it also provides us with the code that must be inserted if we have an AMP version of our website.

How do we enter the HTML code of the Adsense ads in WordPress?

Well, we have two possibilities without the need to know programming.

  1. Insert the HTML code of each ad by means of a in the sidebar, footer or any widget area, or also inserting it in the text of a post or page.

    This option limits us to inserting it only on those sites.

  2. Another option is to use a specific plugin to insert Adsense ads in WordPress. In this case, it will allow us to insert the ads in different spaces, positions that would be impossible without programming.

    I mean inserting them between the list of blog posts, in the search results or in the list of categories. As well as being able to differentiate on which pages it is placed and on which it is not.

4.2 Insert Adsense ads in WordPress without using a plugin.

If we want to insert an ad in the sidebar, footer or any widget area we will use the Custom HTML widget.

From the Appearance > Widgets menu, and we drag the HTML widget Customized to the position where we want the ad to appear.

Y we copy the HTML code in the space to insert code.

If we want to insert it in a blog entry or a page we must paste the HTML code in the position where we wantbut we have to have the editor set to HTML mode.

And if you are using DIVIthis topic has its own module to add code that you can insert into any page or post.

4.3 Insert Adsense ads in WordPress using a plugin.

In the WordPress repository there is a wide variety of plugins to insert Adsense ads. Most of them have a free version and also a premium version.

Of all of them I think it offers quite a few configuration options and at the same time it is simple and intuitive to configure.

This plugin allows you to insert ads from Adsense, from Amazon, even created by yourself. And it allows you to insert them in many positions within the web.

Once the plugin is installed and activated you can start inserting the ads. You will find the administration page in the main WordPress menu > Settings > Ad Inserter.

We find a page divided into tabs, visible from 1 to 16, and each one corresponds to the configuration of an ad, within each tab there are three clearly differentiated spaces and in which we are going to implement the conditions of each ad:

  • Space to paste the code.

    This is where we must paste the HTML code that we have obtained when creating the ad in our Adsense account.

  • In the intermediate space we must choose in what type of page we want to insert the ads.

    We can choose Blog Posts, Pages, Home Page, Search Page, Category Pages, Archive/Tag Pages.

    Both the Search Page option and Archive/Tag Pages refer to pages with post listings.

    The first refers to the WordPress search results page. And in the second case it refers to the page where the posts are listed, that is, the blog page, listed by category or by tag.

  • In the third space we must indicate the specific place within the type of page chosen.

    In the dropdown we have all the options that the plugin offers. Keep in mind that not all options can be applied to all page types, but the plugin allows you to select it even if it cannot be used.

    This can lead to confusion, for example the “Among Posts” option can only be used on pages where post listings are displayed, ie on “Search Pages” and “Archive / Tags Pages”.

    Once these three steps are configured, we may want to further restrict where the ads are displayed. For this we have the “Lists” button that allows us to choose between categories, labels, taxonomies, entry IDs, Urls, Uri Parameters, Referrals and Clients (operating systems).

Conclusions

Inserting Google Adsense ads on your blog or corporate website can be a good alternative for generate extra income in your business model.

It is relatively easy to create an account and be able to insert the ads in…

See also  How to integrate PayPal Express in WooCommerce
Loading Facebook Comments ...
Loading Disqus Comments ...