How to Add Google Analytics to WordPress

If you’re a regular WordPress blogger or webmaster, you’re more than likely well aware of how important gathering accurate statistics about your website is. That’s why learning how to add Google Analytics to WordPress is crucial in the development of your website or blog.

Adding Google Analytics to your #WordPress site isn’t as hard as you may think.

What Exactly Is Google Analytics Anyways?

Just in case you’re asking yourself what Google Analytics is, and what exactly it does, don’t worry because we have the answers you’re looking for. Google Analytics is a super useful service offered by Google that helps users track and report their website’s activities. This service has been around for over a decade and a half, launched by Google way back in 2005.


Not only is the tool helpful to webmasters using computers, but it also allows its users to gather their usage data from Android and IOS apps. That means you can use Google Analytics right from your mobile phone. Google Analytics is also integrated with Google Adwords, which gives users the privilege of being able to track and review online campaigns and advertisements which they are participating in.

So, Why Use Google Analytics with WordPress Anyhow?

The are many reasons why people should use Google Analytics with their WordPress. The tool is not only beneficial to you, but it is also beneficial to your visitors as well because it allows you the insight needed to optimize your WordPress blog. Google Analytics enables you to understand your target audience and helps you determine the necessary strategies to reach them successfully. Also, it comes for free, so there is basically nothing holding you back from trying it out.

Why Use Google Analytics with WordPress

How to Add Google Analytics to WordPress

Adding and using Google Analytics with WordPress is relatively easy if you’ve spent much time behind the keyboard. Even if you’re still wet behind the ears as far as technical stuff goes, you shouldn’t have any issues installing Google Analytics to your WordPress.

Before installing Google Analytics to WordPress, regardless of how you do it, make sure to backup your WordPress theme and site data. That way, in case something goes wrong, you can easily revert your WordPress back to its former state. This may seem a bit extreme, but believe us, you’ll be directly editing the code for your WordPress site, that means a mistake as small as a misplaced comma could bring you crashing down. Just to be safe, be sure to make a backup!

First Step

To get started, you’ll need a Google Analytics tracking code. You can achieve this by logging into your Google Analytics account and simply selecting the website which you’re needing the tracking code for.

Next, click on view Google Analytics and then navigate to the “Admin” button located on the left-hand side of the taskbar. Once you click the button, you’ll be redirected to a page displaying the tracking code.

Now you’ll be able to get the find the tracking code on in the website’s tracking section. The simplest way to receive the code is by copying it and saving it manually.

Second Step

After you have received the tracking code for the WordPress blog or website you’re adding Google Analytics too, you’re almost finished. All you need to do at this point is to enter your site’s dashboard and find your way to the “Appearance” button.

Once on the Appearance tab, find the “Editor” button and click on it. Find the header.php file on the right side of the screen under the Templates section and then click on it. Now you can paste the tracking code that you have copied.

Double or triple check your work, as simple as it is, and then click the “Update File” button. And that is it! Now you’ve installed Google Analytics to your WordPress.

The Best Plugins for Installing and Running Google Analytics on WordPress

The right plugin makes the world of difference in most things concerning website or blog management these days. If you run a WordPress blog or website, then you already know how important organic traffic is. In fact, if you want your WordPress to be successful, it will be at the mercy of organic traffic. Analytics lend insight to the behind-the-scenes aspects you would otherwise have no idea about.

Google Analytics is free, and it is very powerful, what is there to lose from giving it a try? If all that is at stake is the success of your WordPress site or blog, learning how to add Google Analytics to WordPress as part of your overall strategy for success should be a no-brainer.

That said, here are four plugins that are practically guaranteed to knock your socks off as far as installing and running Google Analytics on your WordPress are concerned.


AnalytifyWith close to half a million downloads to date, Analytify is known to simplify Google Analytics perhaps more than any other plugin. While other Google Analytics plugins require you to manually copy and paste your header in order to link your WordPress account to your Google Analytics account, this beastly little app has a single-click authentication system.

This state-of-the-art plugin for WordPress and Google Analytics takes care of many issues such as lack of coding experience automatically, allowing for much less stress and more organic traffic. Now, what blogger or webmaster doesn’t want that? In addition, Analytify has a free version as well as a pro version, so pick one and give it a shot!

Full Picture plugin

Next up we have a new kid on the block – Full Picture plugin. This one is a bit different than all the other ones listed here because it is an all-in-1 plugin. It means that it not only lets you add Google Analytics to your site (in 2 versions – the latest and the previous one) but also 9 (!) other web-analytics tools… and a cookie notice! The only thing that this plugin is missing (at least for the moment) is an in-admin dashboard with statistics. It makes up for that with the number of features though. Not only can you track basic things like traffic numbers, campaigns, and their sources but you can also track form submissions, affiliate links, contact links, AdBlock use, and even popup views.

Google Analytics WD

Google Analytics WDLast, but not least, is the Google Analytics WD plugin. The plugin is one of the best, providing everything from tracking codes to a diverse range of overview, email, and tracking reports. One of the best benefits of the Google Analytics plugin for WordPress is that its a freemium. Meaning, you never have to pay a cent to use it!

A few of the most significant features of Google Analytics WP include a user-friendly and aesthetically pleasing dashboard and a vast range of options including access to interesting information about your WordPress like page views and other statistics. It comes with Google AdSense and e-commerce features as well.

A Final Word About How to Add Google Analytics to WordPress

Now that we’ve covered the basics of Google Analytics, including how to install them on your WordPress, you should have a pretty good grasp on things. You should also have a clear understanding of how important it is for the success of your blog or site.

After reading through the plugins above, you are now ready to select the one that works the best for your specific WordPress setup. The next step is to start using Google Analytics and reaping the rewards that come along with doing so. If you’re one of the impatient folks who can’t work on the Google Analytics details, we suggest checking out Pocket Insights that can give you everything you need in much simpler form.

Do you have a favorite Google Analytics plugin for WordPress? Or perhaps a tip for manually installing Google Analytics to WordPress? If so, leave a comment in the box below!