How to track visitors on your WordPress website using the tracking scripts?

Prathamesh Sakhadeo

Prathamesh Sakhadeo

If you are running your website, chances are you have already heard about the tracking scripts like Google Analytics, Hotjar, Facebook Pixel or Heap Analytics; but if you don’t know what these scripts do, then not a problem.

Let me give you a brief about Google Analytics first.

What is Google Analytics?

What are visitors doing on your pages? Which pages are they visiting? How much time are they spending on your pages? From which geographical location they are coming? From which channel they are coming?

These are some of the critical metrics for any website. More crucial if your whole business model works on your online presence.

All this data is provided by Google Analytics. And it doesn’t just give the data of a visitor after the site visit, but it also provides the real-time data.

All in all, Google Analytics is a must have for your website.

How to install Google Analytics on your website?

1. Create an account on Google Analytics

We need to get our unique tracking script from Google Analytics before we can install it on our website. For that, you can go to analytics.google.com and register yourself first.

You can signup using a free Gmail id or a G Suite id. If you don’t have one, you can get it for free. By the way, Google Analytics does provide both a free account and a paid premium account. But a free account will be more than enough for us.

signup for google analytics

2. Create a property in Google Analytics

One you click signup you will be redirected to the following page. Enter the relevant information like your website URL. The account name and website name are for just identification purpose and does not affect tracking.

create a new property

get tracking id

Once done, click Get Tracking ID. You will be asked to agree with the data collection terms and conditions. You need to accept them to move forward.

google analytics tracking id

Google will give you a unique tracking id. We are going to use this id for tracking.

3. Install the tracking id on the WordPress website

Now the important part. There are a couple of methods using which you can install the Google Analytics tracking script on your website. One involves directly copy-pasting the tracking script in the header of the website.

The simple approach though is using the plugin. And as usual, there are hundreds of plugins for this. We are going to use Analytify.

Analytify comes in two flavours, one is free, and other one paid. Right now, we will go ahead with the free version of the plugin.

First, go to the WordPress plugins page, and search for Analytify.

install analytify

Click Install Now and then click Activate.

Then click on the Analytify in the left-hand side menu in the WordPress admin.

analytify

For the tracking to work, the plugin should know what the tracking code provided by Google is? On this screen, you can either click Allow and Continue, or you can choose to click skip this step. Again this step doesn’t affect tracking.

connect analytify

On this screen, you need to click Log in with your Google Analytics Account.

g suite connect

Here you need to select the account which you used while creating the Google Analytics account.

g suite allow

Click allow here, so that Analytify will have access to your Google Analytics account. After allowing Analytify access to your Google Analytics account, Analytify fetches the details of your account. And you will get the following screen.

analytify connected

On this screen, you have to select the Profile for posts. In the dropdown menu, you will see the property you had created in Google Analytics. You can choose not to choose the profile to the dashboard. But there is no restriction on selecting the same property.

However, we are going to be the sole user of the dashboard or probably your team members. And there is a high chance that you don’t want to track yourself or your team members.

The most important thing, make sure you toggle Install Google Analytics tracking code to Yes. 

This will make sure that the plugin is adding the tracking script to your website. Otherwise, you will have to do it manually. But then the whole purpose of installing the plugin is defeated.

Now you can see the visitor analytics either by clicking the Analytify dashboard inside the WordPress admin, or you can visit analytics.google.com.

Hotjar

The next script we are going to use is Hotjar. While Google Analytics track how visitors came? From where they came? How much time did they spend on each page? Etc; it doesn’t give information on what they did on that page.

To track the on-page activity of users, we will be using Hotjar. Hotjar does have a free version, just like Google Analytics. However, it is a bit limited. But for now, it will be more than enough.

So what exactly do Hotjar tracks?

Actually speaking Hotjar tracks multiple things. But the significant things are heatmaps, and the other one is video recording. Yes, that’s right, Hotjar records the video of what the user does on a particular page.

What are heat maps?

Let me show you the image. That will be easier to understand.

hotjar

Heatmaps show you what the hot areas are and what are the cold regions. Hot areas are where the visitors have clicked the most, whereas the cold areas are the least popular areas on a particular webpage.

Heatmaps are a great research tool; you can get the data regarding what’s popular and what’s not.

The above screenshot shows the click heatmap. But there are multiple types of heatmaps.

  1. Click Heatmap
  2. Scroll Heatmap
  3. Move Heatmap

Scroll Heatmap shows what the hot areas where most users are scrolling and where they are ignoring the content.

scroll heatmap

Scroll heatmaps show us how good is your content position. Let’s say there is one important CTA on the webpage, but it is in the cold region. So probably you can move it to a different place to get the desired attention.

[thrive_leads id=’2278′]

So all in all Hotjar happens to be a great tracking tool as well as a research tool.

There are other tools as well, but to start with you should install at least these two tools.

Share this post

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email
Share on whatsapp
Scroll to Top