How to Make Event Tracking with Google Analytics Easy in WordPress

How to Make Event Tracking with Google Analytics Easy in WordPress
Image by FreePik

If you run an online business, you are aware of how valuable it is to bring in data given to you from customer interactions and then change your marketing based on the data. You can look at the session length, bounce rate, or even various events to see what users are clicking and what they are interested in on the page. All of this is made much easier through Google Analytics which has a free basic account to help interpret the data coming in.

In this tutorial we use MonsterInsights to track events, click the button to download it for free.

Event Tracking with WordPress

If you want to increase conversions, it is important to start tracking what is happening when users interact with your page. Does it seem like customers abandon their cart at a certain stage in the process? Is your sales funnel working for all demographics or are you losing sales when a user sees the landing page? How effective is one Call to Action in comparison to another? Event tracking gives us the ability to figure out these questions and improve profitability.

Event Tracking with Google Analytics

For Google, an event is a user interaction with your content. If a visitor downloads a new ebook that you are advertising, this would qualify as an event. When somebody clicks on an ad to see more, this can also be measured and is an event. Even playing a video can be seen as an event that a site owner will want to track to make sure they measure how effective their marketing is and how easy it is to navigate their site.

If you are looking at the data for video clicks and you notice that nobody is actually viewing your brand new video, the data is telling you something has gone wrong. Maybe the link to the video is broken and visitors can not click it. Perhaps the navigation for the site is faulty and users were not able to find the video easily to even see it. Data is very valuable to analyze because you can start to determine what is working on your site and what needs to be altered. How can you begin tracking these events? Is the process difficult?

How can you start tracking events with WordPress?

WordPress is the most popular Content Management System right now. It makes it easy to construct websites, build forms, and even track events on your site. The beauty of using the WordPress platform is that you can build a beautiful site without knowing any code. This is because themes and plugins work together to take the confusion out of site building. MonsterInsights has an easy solution for tracking events so that your data can be broken down and it will be easy to see the big picture.

MonsterInsights and Analytics

MonsterInsights and Analytics

MonsterInsights is a plugin for the WordPress platform that makes Google Analytics easier to work with. You can customize aspects of Google Analytics and also track data more easily. Originally designed by Yoast, the plugin was taken over by Syed Balkhi who also controls OptinMonster and WPForms. The name was switched over to a new moniker which is MonsterInsights. You don’t need to know how to code and you can still take advantage of all the rich data that Google Analytics provides.

Ready to get started with event tracking? Click the button to download MonsterInsights for free!

What makes up an Event?

To break down an event that needs to be tracked, let’s look at the three components.

  • Event Category: The name of the object.
  • Event Action: A name for the type of action taken by the user.
  • Event Label: Anything additional you want to be tracked.

With MonsterInsights and these three main parts, you will be ready to start looking at data for page clicks, video views, and CTA figures. 

For example, perhaps you want to see how many visitors have downloaded a new, free ebook that pops up with a form. Track this data using the following:

  • Category: CTA
  • Action: Click
  • Label: Book Download

With these three things in place, Google Analytics will start recording each time the download button is clicked. With this data, you can start to change the form around to see what is more popular and what will get more clicks.

Adding Event Tracking with MonsterInsights

Adding Event Tracking with MonsterInsights

MonsterInsights makes it easy to start tracking things such as downloads and clicks without having any coding experience. If you felt like Google Analytics was confusing in the past, try out MonsterInsights and see how simple it is to start tracking everything on the page.

They have introduced an interesting feature called Custom Link Attribution which is a feature that lets you integrate custom event tracking with your links. You will need to make sure the plugin for MonsterInsights is up to date so there are no conflicts with the software.

The Custom Link Attribution makes it a breeze to start watching how many people are actually taking the call-to-action seriously. If there is a sudden drop in numbers after a recent change, this is a good indication that something went wrong on your site or there is a problem with the creative part of the ad you are using. You can also add event tracking to links in your subdomain to see how much visitors are interacting with these as well. Does it seem that many visitors are using a link for a glossary on your site? This would indicate there is a lot of confusing terminology that they need defined. An ebook offered to help new visitors might be a great idea to increase conversions and pad the bottom line.

HTML Example of Event Tracking With MonsterInsights

Custom event tracking can be done with WordPress by just adding data-variable tags to the HTML portion of the link in question. First, let us consider an example.

<a href=”https://www.superbthemes.com/download” data-vars-ga-category=”CTA” data-vars-ga-action=”click” data-vars-ga-label=”Book Download Button” >Download Now</a>

This may seem complex, but it is easy to break down and you won’t need to learn a lot of HTML or CSS to understand what is happening with this piece of code. 

First you have your <a> HTML element. This stands for anchor and comes with the href attribute. What this will do is create a hyperlink for the website www.superbthemes.com. Notice we are linking to www.superbthemes.com/download which is more specific. We don’t want to just track how many people are visiting the website. We need to know how many people are clicking on the Download Now link to track the popularity. We will imagine that clicking on this link gives a visitor a free ebook. You could use this to inform potential customers or just to collect emails to build up your list for marketing. Now let’s take a look at the three parts that were added to the link which will start tracking clicks.

  • Category – CTA
  • Action – click
  • Label – Book Download Button

You can swap these out for whatever you want to track on your site. In this case, we wanted to see how many times our ebook was downloaded. The category, action, and label are just variables that can become anything you need for tracking purposes.

Checking the Data

Checking the Data

Now that you have created the custom code, you will want to test this out. Click the link that you want to track or have somebody outside of your office use the link. You are adding to the counter and if everything was set up correctly, you will be able to count the number of times this link was used. Head to Publishers report in MonsterInsights. 

Navigate to Insights >> Reports >> Publisher. Scroll down the page until you come to the Top Outbound Links report. Here you can see results for the custom link you set up. That is it. You are now ready to go! Make sure to visit Superb Themes often for more tutorials and tips on improving your marketing and tracking efforts.

Google Analytics & Event Tracking

What is Google Analytics?

Analytics lets you see where your customers are coming from, what device they are using, and demographic information to improve your marketing efforts. Google Analytics can go much further than this though and give you insight into how users are interacting with the site and your Google Ads campaigns. You also have the option of connecting analytics to the Data Studio so that you can construct performance dashboards. These dashboards are a great way to capture a snapshot of metrics you are following so you could easily compare sales between two different branches without pulling several custom reports. Analytics also allows you to tailor the experience to your customer with data you have already gathered.

What is Event Tracking?

To understand what event tracking is, first consider what an event is. In your own life, you have a calendar with events on it such as a business lunch, a birthday party, or a game of soccer after work. These events are all separate and can be tracked with data. You can tally the number of soccer games you had this year or how long the last business lunch lasted. In a similar way, Google can help you track things that happen on your website.

In this tutorial we use MonsterInsights to track events, click the button to download it for free.

Leave a Reply

Hi there, all comments are reviewed & your email address will not be published. Let's have an awesome conversation.