To show Google ads on your site you need to place AdSense ad code on your pages. Whether you’re new to AdSense or looking for a refresher, this guide will help you through the steps to implement ad code on your site.

Ad code: A snippet of HTML that when placed on any page of an approved site shows Google ads in a specific ad layout and format.

Subscribe to Newsletter

Subscribe to our daily curated newsletter to receive the latest of GetAdsense top Adsense Solution delivered to your email inbox.

Subscribe to Newsletter

Subscribe to our daily curated newsletter to receive the latest of GetAdsense top Adsense Solution delivered to your email inbox.

Once you’ve copied the ad code from your AdSense account, the next step is to paste it in your page’s HTML source code. How you go about this will depend on the tools that you use to edit your site.

Before adding the ad code to your page, please make sure that your page complies with the AdSense programme policies. If your page doesn’t comply with these policies, Google reserves the right to disable ad serving to your site and/or disable your AdSense account at any time.

HTML editors
Many publishers use a design-enhanced HTML editor like Macromedia Dreamweaver (also know as WYSIWYG or “what you see is what you get” software). To ensure your ads work properly, make sure that you paste the ad code into the HTML source code of your page using the editor’s HTML view or HTML insert function.

This Might Also Interest You:   How to Paste Adsense Code in WordPress

You might see errors if you paste your ad code into a WYSIWYG view such as a “Design” view. Once you’ve pasted your code, check for any additional tags inserted by the software or changes in the line breaks, as they might cause your ads not to show correctly.

If you can’t find the HTML source code of your page in your editor, please visit the help centre or support group for your HTML editing software.

Issues with ad code implementation
Once you’ve placed your ad code, Google recommends 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:

  • 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).
  • 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.
This Might Also Interest You:   My Adsense Account Disapproved

How to insert ad code in 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 and 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. Google recommends not editing theme files directly.

Note: 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.

This Might Also Interest You:   Google Adsense Conditions

Before adding the ad code to your page, make sure that your page complies with the AdSense programme policies. Note that Google may disable ad serving and/or disable your AdSense account at any time if Google find your site or ad placement isn’t in compliance with Google policies.

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.
  • 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 Ads page in your AdSense account.

How to Get and Copy Your Ad Code

You get and copy ad code from the Ads page in your AdSense account. How you generate your ad code will depend on whether you’re using Auto ads or ad units.

This Might Also Interest You:   How to Create Secure Password For Google Account

Select an option below and follow the instructions to get and copy your ad code:

Auto Ads
To generate your ad code you first need to set up Auto ads for your entire site. If you’ve already done this, you can get the ad code for Auto ads by following these steps:

  • Sign in to your AdSense account.
  • Click Ads.
  • On the ‘Auto ads’ page, click Set up Auto ads.
  • In the ‘Set up Auto ads on your site’ box, click Copy code.

What to do next
After you’ve copied your ad code, the next step is to paste it between the and tags of your page.

Ad Units
To generate your ad code you first need to create an ad unit. If you’ve already created an ad unit, you can get your ad code by following these steps:

  • Sign in to your AdSense account.
  • Click Ads.
  • Click Ad units.
  • In the ‘Existing ad units’ table, find the ad unit whose code you want to get.
  • Hover over the ad unit and click Get code Embed.
  • Copy all of the ad code.
This Might Also Interest You:   What is AdSense?

What to do next
After you’ve copied your ad code, the next step is to paste it into the HTML of your page.

Thank you for visiting Getadsense.com. Share or comment on this article.

Subscribe to GetAdsense Newsletter

Discover Google AdSense top secrets to making more money using AdSense ads on your sites. We deliver all the essential soultion direct to your email inbox. Subscribe to GetAdsense today.

Subscribe to GetAdsense Newsletter

Discover Google AdSense top secrets to making more money using AdSense ads on your sites. We deliver all the essential soultion direct to your email inbox. Subscribe to GetAdsense today.