Total Pageviews

Sunday 14 October 2018

AdSense Code implementation guide ,How to insert ad code in your WordPress site

Code implementation guide
How to insert ad code in your WordPress site



There are several ways to place AdSense ad code into your WordPress site. Below, you'll find information about some of the ways that you can do this.

Connecting your WordPress site

If you're new to AdSense, one of your first tasks is to connect your site to AdSense. This requires you to copy the code on your AdSense homepage and paste it into the HTML of your page, between the <head> and </head>tags. To do this in WordPress, you can either:
  • Use a plugin to insert the code. You can use one of the plugins that lets you make changes to the 'header' of your site
  • Or, place the code through your WordPress theme settings. We recommend not editing theme files directly.
Your existing plugin or theme may have a feature for inserting the code. Here’s some additional resources from partners that you may be already using:
Be aware that not all themes and plugins allow you to insert code into your site's header. Note that Google is not responsible for malicious third-party themes or plugins.
Before adding the ad code to your page, make sure that your page complies with the AdSense programme policies. Note that we may disable ad serving and/or disable your AdSense account at any time if we find your site or ad placement isn't in compliance with our policies.

How to add Auto ads code

Auto ads are a family of ad formats that offer a simple and innovative way for you to monetise your content. To complete the steps to set up Auto ads on a WordPress site, you need to copy and paste the Auto ad code between the <head> and </head> tags of your site. Auto ad code is the same type of code that you added when you connected your site to AdSense. You can use any of the options described in the Connecting your WordPress site section above to add your Auto ad code.

How to add ad unit code

Make sure that you've already created the ad units that you need in your AdSense account.

Code implementation guide

Common issues with ad code implementation



Once you’ve placed your ad code, we recommend that you check your ads to make sure that they're working correctly. A good way to verify that you've correctly implemented your AdSense ad code is to check the ad code in your browser's source code view:
  1. Open the page that contains the ad code in your browser, and then view your page's source code (e.g. in Chrome, click View, Developer and then View Source).
  2. Compare the ad code in your page's source code with the ad code from your AdSense account.
    Your ad code should appear exactly as it does in your AdSense account.

Common issues with ad code

Ads might not appear on your site if you find any of the following issues with your ad code:
  • Your ad code doesn't appear in its entirety, for example, there's a missing <script> or <ins> tag.
  • Your ad code displays all on one line.
  • Your ad code has extra HTML tags within it.
If you notice any of these issues, you should replace the broken ad code with fresh ad code copied from the My ads page in your AdSense account. Find out how to get and copy the ad code.
If you're looking for help with implementing responsive ad units, see our technical considerations for responsive ad units.

Get more help

If you need further assistance with implementing ad code into the design of your pages, we suggest trying the following Google search terms:
If you're currently using WYSIWYG software or any other HTML editing software, we suggest referencing your software manual or contacting the product's technical support team for assistance.
You might also be able to find HTML assistance in the AdSense Help Forum. Many AdSense publishers share their knowledge and experiences in this forum, so feel free to post your own questions and search or browse for answers about ad code implementation.

No comments:

Post a Comment