how to install google analytics

How to Add Google Analytics to WordPress

WordPress is the most popular content management system in the world right now and is rightly praised for its ease-of-use, functionality, and range of features that can help to create a website for just about any purpose. If you’re in the business of publishing content, there is no better software than WordPress for allowing you to publish posts with minimum fuss.

While it is important for every website owner to focus on quality content, it is also essential that you know how that content is doing and which areas of your site can be improved to bring in more traffic. This is where Google Analytics is worth its weight in gold.

What is Google Analytics and why is it important?

Before I tell you how to go about installing Google Analytics on your WordPress site, it is only fair that I explain what it is and why I recommend that you have it.

Google Analytics is a web analytics service that is free to anyone with a Google account and provides vital data on the performance of your website by delivering statistics about the visitors to your site. The service is aimed squarely at marketers, who can use the data to improve the user experience and click-through rates by analysing how visitors enter and exit the website.

Why is such a service important to you? Simple – because you want to attract as many visitors as you possibly can to your website. If a specific area of your site isn’t performing as well as it could be, you’d want to know about it – Google Analytics provides this information. Similarly, more focus can be given to areas of the site that attract the most visitors. This service is all about helping you improve you website and generate a better ROI.

Signing up for Google Analytics

Before you set about installing Google Analytics on your website, you will need to first get signed up. To get started you should head on over to http://www.google.com/analytics/ and select ‘create an account.’
Getting an account is a pretty straightforward process; you simply enter your website details, agree to the terms and conditions and away you go. After clicking on ‘create account’ at the bottom of the data entry page, you will be given a code that you should make a note of, or highlight and copy.

Installing Google Analytics on your WordPress Site

There are two ways to install Google Analytics with WordPress: the manual way and the WordPress plugin way. The latter is the easier of the two methods, but I’ll cover both anyway.

Manual installation

Firstly, log in to your WordPress account and go to Appearance > Editor in the Administration panel. As with most JavaScript trackers, Google Analytics can be placed pretty much anywhere on the site. You will need to select something that loads every time on your site; many people choose to add it inside the head tags, but my preferred method is the Footer (footer.php), this way you don’t have to worry about the script slowing down the page, not that it would make too much difference.

So, in your theme editor go to footer.php and click on it. Next, scroll down to the bottom of the code and area in between </div><!–  #footer end  –> and </body> you need to make some space and copy the code that you took a note of. Once this is done, click on ‘Update File’ and you’re ready to go with Google Analytics.

Using a plugin

If you would rather not start messing around with the code, using a plugin offers a much simpler solution. Go to Appearance > Plugins and use the search bar to look for “Google Analytics,” you’ll see that there are plenty of options available; the one you need is ‘Google Analytics for WordPress.’ Click on ‘Install Now’ and when asked for the code, simply enter the UA code and it will take care of the rest. From here you can access all of your settings by using the Dashboard of your WordPress site; just go to Settings > Google Analytics.

Using the Dashboard to see Google Analytics stats

To see your Google stats you will have to login to the program; however, if you want to make life a little bit easier for yourself you can keep a close eye on landing pages, page views and keywords right from your WordPress Dashboard. To do this, all you need is the Google Analytics Dashboard plugin. You’ll find this by using the search box on the Plugin menu of your administration panel.

Benefits of Google Analytics

WordPress is one of the most SEO friendly content management systems on the market and with Google Analytics installed, you can really fine-tune your website for maximum exposure. Google Analytics is not a miracle worker and cannot carry out the necessary site changes on your behalf, but with the data provided, it is a whole lot easier for you to improve your business. Some benefits of using the service include:

  • Targeting online visitors: Analytics tracks the kind of visitors that are coming to your site and the kinds of keywords that are being used. This data will help you better cater to the demands of your target audience.
  • Customise your website: The tracking tool is great for exposing discrepancies in your website, helping you identify niche areas and improve landing pages.
  • Enhance your marketing campaign: Finding out links and keywords that are being used by visitors will help you improve other areas of your marketing strategy such as link building and email marketing.
  • Improve your website design: your WordPress site can be improved no end by the analytics reports provided, allowing you to tweak or even complete redesign your site to benefit the user.

The world of online business is extremely competitive; your rivals will be using Google Analytics to stay ahead and you should too.