If you are wondering how to install Google Analytics on your WordPress website – wonder no more! This easy tutorial will have you up and running in minutes.
Obtaining a Google Analytics account and installing it in your website is not as complicated as it seems! There are also alternatives to Google Analytics which can help you even dive further into your data to get a more diverse picture of a visitor use.
Below is a simple tutorial written just for beginners on how to set-up and install Google Analytics on your websites.
Create A Google Analytics Login
If you do not have an existing Google account you will need to create one before moving on to the steps below!
Sign in to your Google account and go to https://www.google.com/analytics/
In the upper right you will see a dropdown labeled Sign In from there you will select click Google Analytics – you should then see the screenshot below if you are not logged into Google
Once you login for the 1st time you should see a page that looks like this
1. Sign Up Form
Click the SIGN UP button you see on the right to begin creating your account.
The next screen should look like the one below and you will need to complete the necessary fields.
ACCOUNT NAME: Formal name of your business
WEBSITE NAME: Actual name of your website
WEBSITE URL: your full url – you should use www if it is standard in your URL
INDUSTRY CATEGORY: You will want to choose the category that most closely resembles your industry – this is useful as it can provide you a baseline of how similar businesses in your segment are performing compared to you
TIME ZONE: Select your country and time zone
DATA SHARING SETTINGS: We uncheck them all – but this is a personal choice
Click the Get Tracking ID button.
2. Installing Analytics Tracking Code In WordPress
Once you click the get tracking ID button you will see a service agreement that you will need to accept before moving on!
After accepting the terms, you should be sent to a page that looks like this:
In there you will see the area that says “This is your tracking code. Copy and past it into the code of every page you want to track.”
So you will copy and paste the exact code that is in the box from the starting < script > to the closing < /script >
On WordPress you can copy and paste the code in the footer.php file just before the < /body > tag. This will ensure that the code is implemented on EVERY page of the website. There are also plugins that you can use but we try to not use plug-ins for simple things like this!
In MOST WordPress installations you can do the following:
1) Go to APPEARANCE > EDITORS in the WordPress administrative area
2) In the right side you should see a file called footer.php – click on that (be sure you keep a copy of the code that is in there in case something goes wrong!)
3) You may see something like this at the bottom of that page:
If so you will copy and paste the code just above that tag so you should have something like this when you are done.
If you cannot access your footer.php file through your admin area as noted above – then you can also do it via FTP.
If that is not an option, then you may be better installing a plugin where you can just enter your Google Analytics ID if you do not have a tech person to assist you.
Using A Plugin
Here is 1 plugin that can simplify your life and allows you to easily add analytics without messing with any code – again, we do not use it, but it seems well maintained and has good reviews: https://wordpress.org/plugins/google-analytics-dashboard-for-wp/
3. Confirming Google Analytics Is Installed
It may take some time for Google Analytics to begin showing results or even show that it is install properly.
When you go into the TRACKING CODE area – you will see a notice on top of the page that will give you a status.
For example, below is a screenshot showing that my tracking is not installed – even though it is! So be patient. If in a day or so you are not seeing any data – or this message is still showing, then you should take a peak at your installation!
You can also visit Sitechecker and enter your URL to ensure that it is properly installed and activated.