Skip to content
Home » Blog of Donncha Hughes – Startup Web Training » How to add Google Analytics to your WordPress Site

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...

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 (a point I will return to at the bottom of this article)

Graphic Information from Google Analytics
Information from Google Analytics

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

Using Phlox Theme – Adding GA Tracking ID

Some Themes have a facility to link to Google Analytics in a few clicks, for example the Phlox WordPress Theme which is highly recommended. When you install the Theme a message pops up to suggest that a plugin called “Phlox Core Elements” be installed. This now seems to be called ‘Shortcodes and extra features for Phlox theme‘. Go ahead to install and activate. This will allow you to add your Google Analytics Tracking ID within Phlox Customise ie you dont need any other plugin.

Phlox Core Elements Plugin

From the WORDPRESS DASHBOARD >>> APPEARANCE >>> CUSTOMISE /// GENERAL /// GOOGLE API KEYS & SEO… copy in the tracking ID provided by Google Analytics.

Steps to set up Google Analytics in Phlox Theme.

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 Google Search Console

There are only a few steps:

1. Sign in to your Google Account

2. Search for Google Search Console tools and go into Google’s official Search Console 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 Search Console 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.

Google Analytics is critical for marketing

Both Google Search Console and Google Analytics provide loads of information on visitors to your website – fundamental to monitoring your online marketing and understanding your customers. While Google Analytics may seem complicated it is just a matter of diving in to see what it can do.

If you’ve ever taken a quick peek at Google Analytics, you were probably thinking to yourself, “What is going on here? Where do I even begin?” Even if you’ve taken more than a quick look, this analytics and tracking giant can be quite overwhelming.

Ultimate Beginner’s Guide to Google Analytics (2020 Interface)

There are lots of excellent resources to learn about both Google Analytics and Search Console to include the Ultimate Beginner’s Guide while I highly recommend the online training from Google Analytics Academy.

Google Analytics for Beginners

This May 2016 article from Search Engine Land is a comprehensive guide to Search Console

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

regards

Donncha (@donnchadhh)

WordPress Glossary and Terms

Check out upcoming Training Dates delivered by Donncha Hughes for LEO Galway – SEO and Creating a Business Website using WordPress – book direct via LEO Galway.