For any online business to yield success, one needs to put strong, well-focused marketing efforts and needs to track every piece of the business so as to know how well it forwards its benefits.

For the WordPress users, here is a great gift for online businesses, i.e Event Tracking with Google Analytics. It helps easily to track and measure the important links and call-to-action buttons in the web pages.

How to implement google analytics event tracking on your website?

Most of the people use google analytics code to track visitors, which helps to track how many organic vs paid visitors came to your website.

Using analytics code you can also know the conversion rate looks like – how many people downloaded your pdf, or even interacted with your promotional banners and links on your website?

Yes, you can track every event on your website with google analytics event tracking.

which provides endless customizable features that allow you to track specific user interactions with categories, labels, value and actions

you can track any website elements with google analytics event tracking, including:

  • Links clicks
  • Pdf downloads
  • Form submissions
  • opt-in popups 
  • Image clicked
  • Video Plays

For beginners, it should a difficult task for the setup process. 

Here I am going to introduce a plugin’s feature that is very good enough to track and measure the success of your business. That’s the MonsterInsights plugin custom link attribution feature helps to track and measure the links.

In my article, I am going to share how to set up and add Google Analytics custom event tracking in WordPress with the help MonsterInsights Plugin.

There are two ways to add the Google Analytics custom event tracking. One is the traditional approach of adding onclick parameter on the link and the other is the adding custom event link tracking with MonsterInsights.

It’s your choice to go with.

Event Tracking with Google Analytics

Events are nothing but the user interactions on the clickable elements of the website such as downloads, flashcards, button clicks and video plays etc. Each and every event can be tracked easily by viewing the page displayed.

Moreover, it helps to know whether your site visitors are engaging with the site content or not. The tracking feature can help to get through the ups and downs of the website and optimize your content accordingly, so as to boost conversion rates.

For more illustration, I am going through a simple example here. Please have a look.

Consider a website, promotes an e-book in the sidebar widget with a BUY button option. If you want to know how the users are interacting with the subject, simply add custom event tracking to simplify your work and to elevate the sessions and clicks it gains.

Basically, there are 3 major components for the events. They are 

  1. Event Category- CTA:
  2. Event Action- Click
  3. Event Label-: Buy Button

If you want to add call-to-action button event tracking, you need to specify the above event conditions, so that Google analytics records everything as the custom events. This is how one can make their business tracking simpler and easier.

Now let’s see the actual part i.e how to set up WordPress event tracking.

Setting Up Google Analytics Custom Events Tracking in WordPress

As all of us aware that Google Analytics will track only the page views and if you want to know the user interactions or conversions placed, you need to set up the custom event tracking.

Custom event tracking in WordPress can be done in two ways.

  • Using MonsterInsights custom link attribution
  • Adding the onclick parameter in the link manually

Using the MonsterInsights custom link attribution is easy when compared with the adding onclick parameter manually. Without any coding knowledge, you can use the MonsterInsights feature to track and measure user interactions. Whereas the manual process of adding the onclick parameter requires some coding knowledge.

Adding Custom Event Link Tracking with MonsterInsights

MosnterInsights is one of the best Google Analytics plugins in the current market that makes your job easy. With the help of the custom link attribution feature, you can add custom event tracking for your custom links easily. All the thing you required is to install an updated version of the plugin to grab this wonderful feature.

This feature also helps you to track the CTA buttons, site conversions, track sub-domains to know the user’s expectations and interests.

In order to add the custom event tracking for your custom links with the MonsterInsights, you need to add the following data variable tag in the HTML of the link by specifying the category, action and event label.

<a href=”https://www.eknowledgetree.com/” data-vars-ga-category=”cta” data-vars-ga-action=”click”  data-vars-ga-label=”Buy button” >BUY NOW</a>  

Once you add the data variable, MosnterInsights will track your links and provide the detailed reports of the custom events happening in the website.

Event Tracking with Google Analytics

 

Adding the onclick parameter on the link manually

In order to add the onclick parameter, you need to have coding skills especially javascript skills.

Below is the format for adding the onclick parameter in the link.

onclick=” -gaTracker(‘send’ , ‘event’, ‘category’, ‘action’, ‘label’, ‘value’);’’

You need to replace the category, action and label with your values to extract the output.

<a href=”https://www.eknowledgetree.com/” onclick=” -gaTracker(‘send’ , ‘event’, ‘cta’, ‘click’, ‘buy button’, ‘0’);’’>BUY NOW</a>  

Now the Google analytics will generate the reports when the site users do an action i.e view or click on the button. Based on user interactions, one can easily estimate their business progress.

With the help of the above tracking code, we can measure outbound links and forms

when a user clicks on the link it will redirect to the landing page on your website, here event record pageview hit as the user arrives. Google will figure out from the backend where exactly user came from and where the user navigated to by using google event tracking code. if you use only google analytics we will not get actions and events data.

Now the Google analytics will generate the reports when the site users do an action i.e view or click on the button. Based on user interactions, one can easily estimate their business progress.

How to access your events reports using google analytics console

Now go to google analytics dashboard and click events under behaviour in the left sidebar.

Behavior reports

There you will find submenu options to view your event reports:

Behaviour reports

Overview: This report gives you a detailed report of your total events and actions with label information, you can also find high-level data related to your website total unique events user interacted with your elements you are tracking.

Tops Events: This report shows popular events on your website, with top event categories, event actions with total impression and also shows event label information.

Pages: These reports provide a list of pages have events which you are tracking on your website.

Events Flow: You can view a visualization of your user experience.

Try out MonsterInsights custom link attribution feature which is very simple and easy to use for custom event tracking in WordPress.