Google Analytics is a great tool for tracking the performance of your website. It’s a free service that millions of site owners use to determine things like visitor retention and ad performance. It’s also ideal for WordPress event tracking.
When tracking certain events from your website, you can monitor how people interact with your content. From clicks to scrolls, knowing how visitors behave can help you create content and fine-tune layout ideas on your WordPress website.
It’s especially useful when you’re trying to make money online. Knowing how people interact with your layout can lead to smarter decisions about things like banner placements.
In this tutorial, I’m going to show you how to easily add event analytics to your site using the WP Google Analytics Events plugin. It’s an easy-to-use tool that will help you implement tracking without extensive coding.
Setting Up WP Google Analytics Events
Before you can use this plugin, you will need to set up a Google Analytics account. This is a free service from Google that delivers a lot of data regarding your website.
Out of the many I browsed through, this is probably one of the better WordPress click tracking plugins. It’s quick, easy and works with Analytics without using the Tag Manager or making a lot of adjustments in Google.
Install and activate the «WP Google Analytics Events» plugin.
Click on the «WP GA Events» tool from the left panel.
Input your Google Analytics identification number. This is the number you get when linking your site to Analytics from Google. It will start with a UA.
This click tracking plugin has options available of using the Google Tag manager, global site tags, anonymization and other abilities. For now, we’re just going to create a simple tracking event. So, leave these options set by default.
Scroll down and click the «Save Changes» button.
Click tracking is available in two types: ID and Class. I’m going to demonstrate the «class» ability in your links. This is exceptionally useful if you want to track who is clicking an affiliate link, an «order now» button or any other hyperlink on your website.
Let’s say we have a landing page with a «buy now» link. Perhaps we want to see how many people click this link in real time.
Click the «Click Tracking» tab in the events plugin screen.
Since we want to track a particular link, we want to give this tracker an easy way to identify it. Input a unique title for the Element Name. For this example, I’m going to use «buy-now.» It’s important to keep the letters lowercase and replace any spaces with the hyphen. This is because it’s going to be part of our link in a moment.
Select «class» from the Type drop down window.
Input an Event Category that is easy to identify. Think of it like putting categories in WordPress. If you track more than one link, you can assign them to a specific purpose. For instance, I’m going to name this one, «Call to Action» because that’s what the link represents.
It’s an easy way to track a group of links which have the same overall purpose…much like creating content in WordPress for a specific topic. It also shows up in your Google Analytics screen according to how you enter it in this plugin.
Now, we need to deliver a message regarding the action taking place. Because we are monitoring clicks, I am simply going to call it, «Click.» Enter your Event Action to display in Google Analytics.
The Event Label is a description that also shows in Google Analytics for determining the actions of visitors. You can use any description you wish. For this sample, I am going to put, «A user clicked to see the product page.» Input the Event Label you wish to use.
These are all the elements you need to start tracking. Technically, you don’t even need the label portion. However, it helps to differentiate what each link represents when you make several event triggers.
For now, we’re going to leave the Event Value blank and the Non-Interaction set to «false.»
Click the «Add» button at the end of the event trigger.
Adding the Event to Your Link
Now that we have the event built, it’s time to add it to the link. Otherwise, Google will not see the trigger.
Go to the post or page of the link you want to track.
In the WordPress editor, click the «Text» tab on the top right. We need to add a small bit of code to the link itself. If you already use the Text view, this might already load by default.
Find the link you want to track within the content.
Here is where the class we assigned earlier is used. Remember the «buy-now» class from the step above? We’ll place that directly into the link. This will tell WordPress to inform Google Analytics that an event is happening.
Enter the tracking class at the beginning of the link. This will be after the <a segment of the code. It should look similar to:
Click the «Update» button on your post or page.
When a user clicks the link, it will show up in Google Analytics in Real Time Events.
This works whether you’re modifying a button or a hyperlink. The important thing to remember is the «class» you are assigning.
What About Scroll Tracking?
This plugin also gives you the ability to track scrolling. You can do this in a similar fashion to links by using IDs or classes. This will give you an idea of whether someone is actually reading your content below the fold.
Scroll tracking is an alternative to heatmapping plugins. Instead of showing you colors in response to a person’s mouse movements on your site, Google Analytics collects numbers of people scrolling.
While the free version of WP Google Analytics Events plugin works well to a lesser degree, the pro version has more capabilities. If you use video content such as YouTube or Vimeo on your site, it’ll help keep track of who is watching what.
Good Data Helps Develop Good Strategies
Don’t underestimate the value of good Google Analytics event tracking. It can help you deliver quality content and a superior experience to your visitors. You can also discover problem areas of your site which may need your attention to boost traffic and engagement. It’s all in the numbers, and this plugin uncovers how people are accessing your content.
What kind of tracking plugins do you use on your website? Have you considered heatmap plugins, and would they interest you?