Are you looking for an easy way to set up custom events in Google Analytics? With custom events, you can track additional information that’s not possible by default in Analytics.
They offer a deeper understanding of how people use and interact with your website. You can get insights like which form gets the most conversions, which videos your users click on, or which files they download.
But setting up custom events can be tricky, especially for beginners. That’s because it requires coding if you try to configure them manually.
So, in this article, we’ll guide you on how to track Google Analytics custom events using two methods. You can skip ahead to any method you’re interested in:
- Automatically Track Custom Events Using ExactMetrics – The Easy Way
- Manually Set Up Custom Event Tracking in Google Analytics
Let’s start with a brief introduction to Google Analytics custom events.
What are Custom Events in Google Analytics?
To understand custom events, you should first know what events are. Any interaction a user makes with your content like clicking on a link can be measured as events in Google Analytics.
More examples of events include downloading a file, clicking on a CTA button, clicking on a mobile ad, submitting a form, and playing a video.
But since Google Analytics doesn’t track these interactions by default, you’ll need to configure them manually.
For this, you should know how custom events work…
How Does Google Analytics Custom Events Work?
Custom events work by recording different variables whenever a user interacts with your content. They help in identifying what the interaction was, how many people clicked on it, and more.
So, a custom event contains the following elements:
- Event Category – This is the name you want to give to the interaction a user makes like downloads or form.
- Event Action – Through Action, you can see what type of interaction was made, such as clicking a link.
- Event Label – You can summarize what the event was about using Labels, like was it a Buy Now button or Download Now button.
- Event Value – If you want to assign a monetary value to interaction, then using Value you can do that, but this is optional.
Now, are you ready to learn how to set up custom events in Google Analytics? Let’s start with the easy method…
Track Custom Events Using ExactMetrics – Easy Way
Like we said earlier, Google Analytics won’t automatically track your custom events. You’ll need to hire a developer who could insert the custom tracking codes on your website to record events.
But ExactMetrics changes all that!
It’s the best premium Analytics WordPress plugin and it’s the simplest and quickest way to set up custom events in Google Analytics.
That’s because ExactMetrics automatically tracks custom events out of the box for a number of interactions. You don’t have to manually configure them in Analytics.
Here are some of the custom events it tracks instantly once it’s installed on your WordPress website:
If you offer different downloadable content like PDF files, Excel spreadsheets, documents, or PowerPoint presentations, then you’d want to know how many people downloaded them.
Through custom events, you can exactly do that. And ExactMetrics automatically tracks your download file links and shows you a dedicated report inside your WordPress dashboard.
To view the report, go to ExactMetrics » Reports » Publishers and then navigate to Top Download Links.
Outbound Link Clicks
Not many WordPress plugins will tell you which links your visitors click to leave your website. This is where ExactMetrics comes in handy. It will track your outbound links right out of the box.
Using the data from the report, you can then try to create content on your own website, so people don’t exit to another site. Or you can replace an external link with an affiliate link, so you get more conversions.
In the Publisher’s report, you can view your Top Outbound Links.
Affiliate Link Clicks
Next to your outbound link clicks, you can also see your top affiliate links in ExactMetrics. You can set up affiliate link tracking in WordPress using the plugin and it will show you which affiliate partners are best.
You can use the data to identify your most converting affiliates and then promote them more on your site. Or you can create new opportunities and get more lucrative deals from your top affiliates.
Do you have different forms on your website like a contact form? If yes, then you would want to know how they’re performing.
Through custom events, you can track them in Google Analytics and see which one is doing better than the rest. And with ExactMetrics Forms addon, you can automatically track their conversions on your WordPress site.
For more details, follow our guide on how to track form conversion in Google Analytics.
Telephone Number Link Clicks
The next event that ExactMetrics tracks automatically is your telephone link clicks. If you have a phone number on your site that people can use to contact you, then you’d want to know how many users clicked on it.
ExactMetrics will track this without needing any additional configuration. You can then view the report in Google Analytics under Events.
Email Link Clicks
Just like phone numbers, ExactMetrics also tracks your mailto links on your website.
Mailto links are your hyperlinked contact email address. When a user clicks on them, it opens their default email client (like Outlook) and composes a new email with the address already filled in.
Since this is a way people interact with you, you’d want to know how many people click on it. So, you can deliver the right message and solution at the right time.
These were some of the custom events that ExactMetrics tracks in Google Analytics. But what if you want to configure them manually? Here’s how you can do that…
Manually Track Custom Events in Google Analytics
Now, before we start with the manual method, do note that it requires coding. So, if you’re not familiar with editing code, we recommend that you stick with the method we described earlier.
To get started, you can add custom event tracking in Google Analytics using the onclick parameter. These are details that you can add to your custom event code, so you exactly know which event your visitors interacted with.
Here’s what an onclick parameter looks like:
onclick=”__gaTracker(‘send’, ‘event’, ‘category’, ‘action’, ‘label’, ‘value’);”
You’ll have to replace the category, action, label, and value fields in the parameter. For instance, let’s create one for a call to action button on your website:
- Category – Enter CTA so you know it’s a call to action button
- Action – Since we want to see how many people interacted with the button, you can enter click
- Label – To know which button the user clicked, enter the name or text of the button, like Buy Now or Read More
- Value – If you want, you can assign a monetary value to your interaction
Once you’ve entered these details, add the onclick parameter at the end of your HTML code and it will look like this:
<a href=”http://example.com/pricing” onclick=”__gaTracker(‘send’, ‘event’, ‘cta’, ‘click’, ‘Buy Now button’, ‘0’);” >Buy Now</a>
With the code ready, you can now insert it on your website, so Google Analytics can start to track your custom events.
And that’s it!
Using the methods in this post, can set up advanced tracking in Analytics and better understand your audience.
We hope you liked our article on how to track Google Analytics custom events. You can also go through our guide on how to properly set up Google Analytics for WooCommerce.