In this tutorial, I will show you how to create and link a Google Analytics Account to your WordPress website using the Rank Math plugin we installed in a previous session.
Here’s a list of topics I will be covering:
- What is Google analytics and How does it Work
- How to setup Google Analytics
- Property Setup in Google Analytics
- How to add google analytics to WordPress
- How long does it take for google analytics to start tracking
Before we dive into the setup process, let me explain what Google Analytics (GA) is.
What is Google analytics?
Google analytics is a software offered by Google themselves that allows webmasters like yourself, to track and view various metrics relating to your site.
Once you register your website with google analytics, you will be able to login to your site’s dashboard and see various data relating to your website.
Data, such as, the number of visitors your site is getting, which pages are performing best, where visitors are coming from etc.
Is Google Analytics Free?
Yes, this tool is absolutely free and is offered as part of Google’s suit of free software to help webmasters improve their websites.
Google also offers a paid version of their Analytics which is called Google analytics 360. This is a marketing platform for medium and large Businesses. GA360 allows the Marketing teams of corporations to track the results of their paid marketing campaigns.
As an independent webmaster you will not need this. The free Google analytics will give you all the information you need for SEO ranking purposes.
How does Google analytics Work?
The tracking operation retrieves data about the page request through various means and sends this information to the Analytics server.
Sounds complicated right? Don’t worry. With the use of our Rank Math SEO plugin, connecting our website to GA will be a piece of cake.
Before we do this, however, we need to setup a Google Analytics account.
How to setup Google Analytics
I’m assuming you don’t already have an active account with Google Analytics, so I’ll show you how to create one first.
- Go to ‘analytics.google.com’.
- Click on the Blue ‘START MEASURING Button
- Create a new account name.
- For Property Name input the name of your site.
- Choose the timezone of where you physically located.
- Choose the currency.
- Click on ‘Show Advanced Options’
- Turn on ‘Create a Universal Analytics property’ (far right on/off lever)
- Insert the name of your website in the Website URL fields.
- Choose ‘Create a Universal Analytics property only’
- Press NEXT
- Select your industry, Business Size and Measure Customer Engagement..
- Click CREATE
Go to https://analytics.google.com/ and click on the blue START MEASURING button.
This takes you to the Account set-up page.
First create a new account name. I suggest you give it the same name as your website. So, in my case it will be ‘WP Website Wiki’.
Choose the data sharing options you want to allow google to track. I just tick all options because I don’t mind sharing my data with google, especially since this should help them improve their services and give me more precise data on my website.
Click on the NEXT button.
Property Setup in Google Analytics
Next is the Property Set-up.
Property refers to your website, so for Property Name input the name of your website once again.
Reporting Time Zone refers to the time zone they will use for the charts and graphs in their reports. I suggest you choose the time-zone of where you physically are located.
Then choose the currency you prefer to track your earnings with.
Now, I like to use the Old Analytics Version, which is much easier to follow, in my opinion. To ensure you get access to this click on SHOW ADVANCED OPTIONS.
Turn on ‘Create a Universal Analytics property’ (far right on/off lever)
Insert the URL of your website in the Website URL fields. This should include www and .com, or .net or whatever your TLD is at the end.
As an option choose ‘Create a Universal Analytics property only’
Next section is About your Business or Business Information.
First select your industry, i.e., the niche that your site is in. Then for Business Size, if you’re an individual just choose, Small.
Next part choose ‘Measure Customer Engagement with my site or app’.
Now click CREATE.
A pop-up window will come up requesting you to accept the Terms and Conditions etc.
Choose the region you are located in from the drop-down menu at the top and Tick the box next to the sentence ‘I also accept the Data Processing Terms as required by GDPR’.
Now scroll down and tick the second box, next to the sentence ‘I accept the measurement controller ….’
Finally click on the I ACCEPT button.
With the steps mentioned above, we have just created a Google Tracking ID that will allow google to track the information passing through our website and relay that in the GA Dashboard for us to view.
How to add google analytics to WordPress
In this next section we will connect or add google analytics to our WordPress site.
After creating the Google Tracking ID in the previous step, GA wizard should have sent you to the page where you can find the info you need to connect the Google analytics account to your WordPress website.
You should see the Tracking ID and Website Tracking Global Site Tag.
You can always retrieve your tracking ID information by logging into Google analytics, clicking on the Admin COG wheel (bottom left corner of the GA Home page).
Once in the Admin page, click on the TRACKING INFO link.
Before we can start using the GA dashboard, we need to link the Google analytics Tracking code to our WordPress site. For this we will use our favorite SEO plugin, Rank Math.
If you have been following my other previous tutorials, you should already have this plugin installed. If not, you can find the details here.
- In WP dashboard click on Rank Math in the side Menu
- Find the card that says ‘Analytics’ and click on the ‘Settings’ Button in that card.
- Click on ‘Connect Your Rank Math Account’
- Log in with the same email used to create your Google Analytics Account.
- Click on all Data options to allow viewing and press ‘CONTINUE’
- Go on the ‘Analytics’ Tab on Rank Math and choose the account from the drop-down menu, choose the property and choose ‘All Website Data’ from the View drop-down option
- Switch the ‘Install Analytics Code’ to ON. Click on SAVE before next step.
- In the Analytics section Click on the ‘Exclude logged-in users’ option.
- Now scroll down and SAVE
To insert the GA tracking code to our WordPress site go to your WP dashboard and go on Rank Math in the side Menu.
Find the card that says Analytics and click on the SETTINGS Button in that card.
If you have not yet connected your google account to Rank Math you will need to do the following steps:
- Press on the CONNECT YOUR RANK MATH ACCOUNT
- Log in with the same email account you created your Google Analytics account.
- Click on all the data options, to allow viewing and press CONTINUE
You should now be seeing the ‘Analytics’ TAB section of the General Setting under Rank Math in your WP dashboard
Go on the ‘Analytics’ Section and choose your GA account from the Account drop-down menu, choose the relevant website from Property drop-down menu, and choose ‘All Website Data’ from the View drop-down option
Switch the ‘Install Analytics Code’ to ON and a new drop-down option should come up.
Now scroll down and press on SAVE CHANGES.
Scroll back up to the Analytics section again and Click on the EXCLUDE LOGGED-IN-USERS option. This will exclude yourself from the visit counts in Google Analytics.
Now scroll down and SAVE again.
The Analytics code should now be installed on your website. You can verify that this is working because the small circle next to Analytics Title in Rank Match Dashboard turns Green.
You’re done, and you can now benefit from all the insights that Google analytics provides.
How long does it take for google analytics to start tracking?
Google Analytics will start tracking immediately once the tracking code has been installed in your WordPress site, as we did in the steps above.
Just log into your GA dashboard and start looking around to familiarize yourself with the dashboard and the different reports that it offers.
Google offers free training on their analytics. You can access their training in the Google Analytics Academy.
Not only does GA track the number of visitors you get to your site, but it also provides key insights into how your WordPress site is performing and suggestions on how you can improve your site to rank better in Google search.
With Google Analytics you will be able to track everything happening on your site, from how much traffic your website is getting to where that traffic is coming from.
Other metrics you can track, include, how visitors are behaving, track mobile traffic vs desktop traffic, identify trends and much, much more.
If you’ve been following our tutorials, in consecutive order, you should now have both Google Analytics and Google Search Console activated and linked to your website.
Not only are they linked to your WP site, but they have also been linked to Rank Math, the SEO plugin we installed to ensure our WP site is optimized for Search Engine rankings.
In the next tutorial we will be working on another important SEO element; Page Speed setup.
For a full list of my WordPress tutorials, check out this page.