Last Updated on
If you need to find out how to set up event goals in Google Analytics, it is not that difficult.
Adding a custom tracking event in Google Analytics allows you to help measure and track specific events on your website.
For example if you are running an advertising campaign, you may want to track what social platform people clicked your link and what actions they took on your website.
These are important call to action features you can measure and optimize for your own business or for clients.
In this Google Analytics event tracking tutorial we’ll show you How to set up event goals in Google Analytics with both a WordPress plugin and also by creating a custom link.
Google Analytics event tracking tutorial – Choose the best option that suits you
Using MonsterInsights To Create A Custom Link Attribution
The first step is to download the MonsterInsights Google Analytics plugin.
MonsterInsights provides a custom link attribution features, that enables you to track your call to action links and find out if they are relevant for your sites conversions.
It allows you to add features to your links to find out how users are interacting with your website, based on the origin of the link.
SEOBetter: Step-by-step How to grow your traffic to 70,000 unique visitors in 11 weeks.
Get this eBook PDF for free (RRP $9.95 on Amazon Kindle), plus new updates and thoroughly tested online marketing techniques by subscribing to my newsletter.
You can also sign up to our newsletter with Facebook (quicker and easier)
This is the simplest way on learning how to set up event goals in Google Analytics on WordPress.
Start by adding data-variables to your HTML link for example:
<a href="https://www.seobetter.com" data-vars-ga-category="SEOBetter" data-vars-ga-action="Custom Action SEOBetter" data-vars-ga-label="Custom Label SEOBetter" >SEOBetter Courses</a>
For example if I created this link on my WordPress website for advertising, I would create the custom labels, so when I share the link, I know where that traffic is coming from on Google Analytics.
Once you have added the tags to your link, MonsterInsights will automatically pick them up and render them for Google Analytics.
Google Analytics event tracking tutorial for CTA button on WordPress
Another example may be setting up a widget on your website with a call to action button.
For example say the button leads to a contact form you want a user to fill out.
Create the widget and call to action button and link it to your contact page:
Here, we’ll use the following event conditions:
Category: “CTA” Action: “Click” Label: “Contact Us”
You you will need to update your event conditions on the links, so your customer tracking should now look like:
<a href="https://www.seobetter.com/pricing" data-vars-ga-category="CTA" data-vars-ga-action="Click" data-vars-ga-label="Contact Us" >Contact Us</a>
It is as easy as that.
Now when someone fills out your contact form, you can track the process in the Google Analytics event flow area.
If you need to have a quick glance at your custom event tracking link, head over to the publishers report in MonsterInsights.
Go to Insights > Reports > Publisher.
If you scroll to the footer you can view the top outbound links report to get all the data on the Google Analytics event tracking onclick info.
If you were wondering how to set up event goals in Google Analytics, then this guide should give you a bit more of an insight of how to do it and what’s involved.
We created this how to set up event goals in Google Analytics guide so users can track their landing pages more efficiently.
Once you know the exact Google analytics events flow of your website and what lead to a conversion you can tweak your advertising campaigns and UX designs to push more traffic to the pages and widgets that are giving the best results.
Adding Google Analytics Event Tracking Onclick without a plugin
Adding a Google Analytics event tracking onclick without a plugin can be a bit more complicated.
The onclick parameter goes in the following format:
onclick="__gaTracker('send', 'event', 'category', 'action', 'label', 'value');"
To setup Google Analytics event tracking onclick for this pink we need to replace the values of category, action and value.
The call to action button link should now look like the following:
<a href="http://seobetter.com/pricing" onclick="__gaTracker('send', 'event', 'CTA', 'Click', 'Contact button', '0');" >Contact Us</a>
This is how you would track events manually on each link for Google Analytics reports.
Google Analytics will now track your custom events when a user clicks on your button.
Google Analytics event tracking not working?
If you are trying to track your outbound link clicks using Google Analytics and you have been completely unsuccessful in getting it to register anything, then you have a few options.
If you are using WordPress download MonsterInsights and install the Google Analytics plugin and follow this guide.
The second option is to download the Google tag assistant for Chrome.
This is a free tool from Google which is really helpful in debugging Analytics.
When you are modifying your links and are still thinking “why is Google Analytics event tracking not working?”, from my experience “Events” take longer than usual to appear in Reports section.
Double check your GA codes to make sure you only have 1 code installed as well as this can bring up issues with tracking events.
It also might be the case of not working because you have two different codes. Try removing one and then test again.
What are the Google Analytics event tracking best practices?
The Google Analytics event tracking best practices will tell you a few things. The first is that you need to determine in advance all of the elements you want to analyze.
Users should know how to show video UI interaction, menu’s, embedded gadgets and load times. You should always implement a consistent and clear naming convention for all of your links and events.
A summary of the Google Analytics event tracking best practices
- Always include event tracking for CTA’s through each Google Analytics event flow
- Use event labels, event categories and event actions on all of your links
- Always set which events you want to track by identifying in advance all the elements you want to track within your report
- Always be consistent with your naming and set event tracking for all personalized experiences
Setting up event can help any website when you want to optimize the UX for your landing page.
Once you know what elements and links people are click on your website to perform an action (or conversion) you can tweak your designs features to increase your customer conversion percentage
If you enjoyed read this guide on how to setup event goals in Google Analytics then you will really enjoy reading our other posts. Be sure to check out our Website Auditor review, website promotion ideas post and high traffic low conversion tips for your business.