This plugin adds tracking code for Google Analytics to your WordPress <head> section, so you can authorize your site in Google Webmaster Tools.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
analytics-head
README.md

README.md

Analytics Head

This plugin adds tracking code for Google Analytics to your WordPress <head> section, so you can authorize your site in Google Webmaster Tools.

Current version: 1.6.0

More informations

This plugin adds tracking code for Google Analytics to your WordPress site. Unlike other plugins, code is added to the <head> section, so you can authorize your site in Google Webmaster Tools.

There are many Google Analytics plugins for WordPress. I used a few of those myself and it worked well. The trouble began when I willed to use Google Webmaster's Tools.

It turned out that I can authenticate the ownership of the website using my Google Analytics account. Where's the catch? Google Webmaster's Tools expects that the code will be located at the <head> section and all the plugs have placed it at the very end of the page (apart from this case - very rightly).

Therefore, I created a plug-in called "Analytics Head", which places tracking code in the <head> section of the webpage. Of course you can put it in the footer at any moment, if you like.

For developers

You may use following actions:

pp_google_analytics_head_before pp_google_analytics_head_after

And one filter:

pp_google_analytics_head_output

Please note that those features are disabled by default. If you want to use them, you must turn it on using plugin options page.

Authors

License

Copyright 2013-2016 phylax.pl £ukasz Nowicki https://phylax.pl/

Licensed under the GPLv2 or later: http://www.gnu.org/licenses/gpl-2.0.html