Sunday, March 26, 2017

Inserting AdSense Code into Wordpress Header/Foot

In a post I wrote a couple of weeks ago, I made note that AdSense was retiring (deprecating) their official Wordpress Plugin, and linked to recommendations made by AdSense - in particular the "QuickStart" Ads option for WordPress users. That's the official recommendation, but they also indicate you can simply paste your code into a text widget, which is fine if you want to put it in a sidebar area. What that won't do is insert code into your header or footer area of your site, so when using a wordpress site to apply for AdSense (or a host account upgrade) if you aren't able to (or comfortable with) editing your php files, you may feel a little lost. There have been a fair number of users coming to the forum asking what they should do now.

I can understand this myself. I've edited php files very few times, and each time felt like I could very easily screw something up, so I'd be pretty uncomfortable editing the header file myself. For those who need an easier solution, there are other plugins available that can do that - insert codes into your header or footer. And there are themes that will allow you to do that directly from a box in the "customizing" options of your theme, without manually editing the php files.

For new wordpress users and non-coders, this might be the best option. At least until you feel comfortable editing your theme files yourself.

Although I can't recommend any particular plugin there are several popular ones you can try (free plugin directory).  There are some things you should consider BEFORE selecting ANY plugin to use with your wordpress site.

  1. Ensure the plugin is compatible with your version of WordPress.
  2. Check to make sure the plugin is being updated and maintained regularly.
  3. Read the descriptions of the plugin and what it does carefully.
  4. Read the developer's information and terms - yes, that's important. You don't want someone else's ads showing up in your site if you use a free plugin supported by ads.
  5. Make sure the developer offers & responds to support for the plugin (even if it's free).
  6. Check the number of "stars" it has, BUT don't rely on that number alone. A plugin might have 5 stars, but may only have had 1 person review it. That doesn't mean it's a great plugin or that people trust it.  It also doesn't mean it's a bad plugin. It may just be a "new" plugin without much exposure yet. If it has thousands of reviews and hundreds of users giving it 5 stars, it's a good bet that's a decent plugin.
  7. Make sure the plugin is easy to use once installed.
  8. Check the number of downloads it's had, and the number of users who have reviewed it. Read the reviews.

If you try a plugin and love it, and the developer offers a reasonably priced "pro upgrade" for it, it's a good idea to pay for the upgrade if you plan to be using it for a long time. You usually get better support, and more functionality with paid versions.

In the end, only you can decide which one is the best one, and most of the time, you can try more than one, just uninstall the one you didn't like and try again, BUT (yes, another but) be careful because poorly coded plugins can mess up your wordpress installation.

Here's links to a few:

Header, Footer & Post Injections
Add-To-All
Header Footer Code Manager

The other option for users would be to choose a theme that comes with customization of the head code directly in the theme. There are some that allow easy integration of other codes into the header, but you're on your own looking for those. I tend to use templates that are simple, without much in the way of frills.

No matter what you choose, you'll still need to ensure that your ad placements don't violate any AdSense policy, so it's a good idea to review those before you get started:

Ad Placement Policies
Ads in a New Window (not allowed)
Code Modification (read this - some things are NOT allowed)



posted by J. Gracey Stinson

No comments:

Post a Comment

Please do not drop links here using monetized URL shorteners or the comments will be marked as spam.

If you want help with an actual blog or website, please just post for help in the Adsense forum, or leave your G+ profile link. I will not publish comments with blog/website or channel links.

Thanks.