Site icon ThinkMaverick

How to Easily Use Event Tracking in WordPress with Google Analytics

How to Easily Use Event Tracking in WordPress with Google Analytics. thinkmaverick

If you’re reading this, you’re probably already using Google Analytics to track page views, bounce rates, and average time spent on pages and other traffic-related metrics on your WordPress site.

 

If not, no worries… you can set up Google Analytics in WordPress right now.

 

Check out this article, I’m going to show you exactly how, step by step!

Article: How to Set Up Google Analytics in WordPress: A Step-By-Step Guide for beginners

 

Google Analytics is a free website analytics tool that provides enormous streams of data to improve your small business.

 

To truly understand the results of your marketing efforts, you may want to track beyond basic traffic metrics.

 

That’s why you’ll need to use Google Analytics Event Tracking to get more in-depth insights into your audience. With Event Tracking, you’ll know exactly how your users are interacting with on-page elements such as forms, buttons and videos.

 

Remember, you can’t (accurately) improve things you can’t measure.

 

Setting up custom event tracking in WordPress can be hard, so MonsterInsights took extra effort into making the setup process really easy.

 

As we continue our series on MonsterInsights plugin, I’ll show you how to set up Google Analytics Event Tracking on your WordPress website, in the easiest possible way.

 

 

What is Event Tracking in Google Analytics?

Google Analytics Event Tracking is a feature that allows you to easily track and measure user interactions on your website. And Google Analytics tracks this in the form of “Events”.

 

It can track all kinds of different things such as video plays, file downloads, button clicks, mobile ad clicks, Flash elements etc.

 

Why You Should Add Google Analytics Event Tracking in WordPress?

Event Tracking helps you to analyze your visitors’ interaction effectively.

 

With the help of MonsterInsights, you’ll be able to measure the effectiveness of your most important content, links and call-to-action buttons.

 

By figuring out what’s working—and what isn’t—on your site, you can make adjustments, optimize your less effective content, add content that generates more user engagement, boost your sales and improve overall success.

 

Let’s see how you can get the most out of MonsterInsights Event Tracking:

 

If you have an embedded video on your product page, you can see how many visitors are actually playing the video.

 

If you offer file downloads (printables, PDFs, ebooks etc) to your visitors, you can track how many users downloaded the file.

 

You can even track which of your button get the most clicks.

 

The more you track user behavior on your website, the more you’ll be able to optimize your strategy to further engage, interact and delight your visitors and achieve your business goals.

 

Anatomy of Events

Before we go any further, let’s take a quick look at the anatomy of Events. Each Event has 3 main components:

 

For example, you want to set up a call-to-action button event tracking on your site, you can add conditions like this:

 

How to Setup Google Analytics Event Tracking with MonsterInsights

As you may already know, Google Analytics only allows you to track pageview hits (primary dimensions and metrics).

 

To track Event hits (user interaction), you’ll need to create custom event tracking.

 

One of the easiest ways to do that is to use the MonsterInsights Google Analytics plugin.

 

MonsterInsights is a free plugin that helps you connect your site with Google Analytics with just a few clicks (without any code).

 

If you purchase MonsterInsights Pro, you’ll gain the ability to easily add Google Analytics Event Tracking to your WordPress buttons within your WordPress dashboard.

 

Adding Custom Link Tracking with MonsterInsights

Use the MonsterInsights’ Custom Link Attribution feature to add custom event tracking to your custom links is pretty easy and straightforward.

 

With MonsterInsights Event Tracking, you can track your call-to-action (CTA) buttons (such as “Buy” buttons) and other important links such, measure conversions and see how users behave on your site.

 

Step 1: Install MonsterInsights and Connect it to Google Analytics

To get started, you’ll need to install MonsterInsights and authenticate it with Google Analytics.

If you aren’t sure how to do it, check out this post to learn how to install MonsterInsights plugin.

Once you install and activate MonsterInsights in your WordPress, you can start setting up Google Analytics Event Tracking.

 

Step 2: Add Tags to the HTML of your link.

Next, add the following data-variable to the HTML of your link

<a href="https://www.example.com" data-vars-ga-category="Custom Category" data-vars-ga-action="Custom Action" data-vars-ga-label="Custom Label" >Example</a>

 

When done correctly, MonsterInsights will automatically track your site links and give you detailed reports.

 

As an example, we’re going to add custom event tracking on a sidebar call-to-action button. Say, we want to link the sidebar call-to-action button is to a pricing page: https://www.thinkmaverick.com/pricing.

 

We set the event conditions as below:

 

Next, you’ll need to replace the event category, action, and label with your event conditions. Once it’s done, your complete button HTML would look something like this:

 

<a href="https://www.thinkmaverick.com/pricing" data-vars-ga-category="cta" data-vars-ga-action="click" data-vars-ga-label="Buy button" >Buy Now</a>

 

That’s it. Now every time a user clicks on your sidebar call-to-action button, it will trigger the event you are tracking.

 

Step 3: View Your Event Tracking Report

Sit back, relax and let MonsterInsights take care of the rest. Come back after 1 week to see your Publishers report in MonsterInsights.

 

To do that, login to your WordPress admin, go to “Insights” > “Report” > “Publisher”.

 

Now to view the data from your custom event tracking link, head over to the Publishers report in MonsterInsights. Here, you’ll be able to see the “Top Outbound Links” report if you add a custom link (like the one shown in the pricing example above)

 

If you’re making money with affiliate marketing, this is particularly useful. You can create a custom affiliate link and see which links get more clicks and the total numbers of clicks under “Top Affiliate Links” report.

The Custom Link Attribution feature also supports Google AMP pages, so you can precisely track your AMP optimized custom links.

 

Alternative: How to Add custom Event tracking by using the onclick parameter.

If you’re not using MonsterInsights, it’s possible, though a bit time-consuming, to manually add onclick Parameter on your link.

 

If you’re not-so-tech-savvy, it’s best to go with the easiest method- using MonsterInsights.

 

If you have some Javascript skills, then by all means, follow the steps below.

 

Here’s the format of the onclick parameter you need to add to your links:

 

Next, let’s add the onclick parameter to your link by replacing category, action, and value with the event conditions we set before.

 

Then, this is how the call-to-action button link will look:

Done. Google Analytics will start tracking your custom events when your visitors click on the button.

 

Conclusion

There you go. If you’re just looking for the easiest and hassle-free way to track users interaction on your WordPress, then MonsterInsights allows you to quickly get started with zero coding skills. Plus, you can manage and view all your reports directly within your WordPress dashboard.

 

Implement this tracking tool, understand your analytics, improve your site and marketing strategies, you’ll be well on your way to make your business a success.

 

Are you ready to track button clicks on your WordPress site?

 

What do you think?

How do you track user activity while they are on your website?

Do you use a Google Analytics plugin like MonsterInsights? Why or why not?

Do you have any questions about Event tracking or any issue with setting up the tracking tool for your WordPress site? Tell me in the comments.

 

Also, read:

 

Last but not least, if this post was of any help to you, please share it on Facebook, Pinterest and Twitter.

A quick share from you would seriously help the growth of this blog.

Thank you so much!

I live and breathe making an income online. 

I’ll be sharing more ideas and guides soon. Stay tuned.

If you haven’t already, sign up here to receive my emails.

Exit mobile version