How to add Google Analytics to your WordPress Site

The following two tabs change content below.

Donncha Hughes

Sole Trader/ Proprietor
Donncha Hughes is a mentor, trainer and business advisor. I deliver group and one to one training on Wordpress. My background is assisting business with development of marketing, business plans, grant and finance applications. See www.startuphughes.com for more...
Google Analytics

Google Analytics image in Google Play Store for Android Smartphones

A blogpost which explains how to set up Google Analytics on your WordPress website, followed by instructions on how to then create and link to your Google Search Console (Webmaster tools) so that you can upload an XML sitemap for your WordPress site – all of which is recommended for Search Engine Optimisation (SEO)

Google Analytics (GA) is a free service offered by Google that generates detailed statistics about your website’s visitors. It is the most widely used website statistics service – very useful for marketing.

To set up a Google Analytics Account

1. Sign into your Google Account

2. Search for Google Analytics and sign in

3. Create a new ‘Web Property’ for your new website

4. Google will provide a unique ‘Tracking ID’ that you will add to your website to Verify that you own the site. the tracking ID has this format:

UA-XXXXXXXX-1

5. Download a Plugin called Google Analytics for WordPress by WebKinder

6. Copy the tracking ID into the box in the settings of the Plugin… click on Settings in the Plugin or via SETTINGS in the Dashboard.

Google Analytics for WordPress

 

When you go back to Google Analytics, follow the instructions to VERIFY your Web Property.

It does take Google a day or two to start recording Visitor information to your website.

I would recommend to add Google Tag Assistant to Chrome so that you can verify that Google Analytics continues to track your site.

Google Chrome Tag Assistant

 

 

Google Webmaster Tools

You can now open a Google Search Console (formerly known as Webmaster tools) account – this is a free service from Google that shows ‘webmasters’ (yes that is you as you have designed and maintained your WordPress site) how Google sees your site. This is very important to make sure to track errors on your site. You can also combine the data from Google Analytics to get even more insight on visitors.

How to add Webmaster Tools

There are only a few steps:

1. Sign in to your Google Account

2. Search for Google Webmaster tools and go into Google’s official webmaster tools site.

3. Find the RED button that allows you to ADD A SITE

4. You will be asked to verify ownership. You will be using the Alternate Method which is to use Google Analytics. The message may look daunting but all you have to do is click VERIFY.

Google Webmaster tools

If you have followed the instructions in this post ie used the Tracking ID to set up Google Analytics, the next screen should read:

‘Congratulations, you have successfully verified your ownership of … [your website url]’

Adding an XML Sitemap

There is a lot to talk about in Google Webmaster tools  so feel free to explore. The starting point is to add a sitemap.

  1. Download the Yoast SEO plugin … this is a very popular
  2. This automatically creates XML sitemaps for your WordPress website (and blog)
  3. Within the SEO (Yoast) settings tab there is a button to display your XML sitemaps which will be in this handy format… http://www.startupwebtraining.com/sitemap_index.xml .. with your URL replacing my own
  4. Within Google Webmaster tools, Sitemaps is one of there main options displayed on the home dashboard. Click on SiteMaps and you see this screen …

Google Webmaster tools add Sitemap

Type in sitemap_index.xml into the box. You can test to make sure it is ok and then submit. When this is successfully submitted (in seconds) you will know how many webpages are on your site. It will take a day or two for data to appear.

Both Google Search Console and Google Analytics provide loads of information on visitors to your website. This May 2016 article from Search Engine Land is a comprehensive guide to Search Console  while this page from the same site provides the latest on Google Analytics.

 

As always I hope you enjoyed this post, please feel free to leave comments while Social Shares are also appreciated.

regards

Donncha (@donnchadhh)

Donncha Hughes is a mentor, trainer and business advisor. I deliver group and one to one training on Wordpress. My background is assisting business with development of marketing, business plans, grant and finance applications. See www.startuphughes.com for more...

Posted in Wordpress Tagged with: , , , , , ,