How to Easily Use Event Tracking In WordPress with Google Analytics

Event tracking is a very powerful insight to track and measure a particular section of your website. Which marketers use to conclude data-driven results for maximum ROI.

By default Google Analytics only tracks website visitors and doesn’t give you any other insight related to the sidebar elements or for any links.

To track such engagement you have to create custom even tracking inside Google Analytics.

However, this is a technical process but with “MonsterInsights” you can easily set up this.

What is Google Analytics Custom Events?

Custom events are user’s interactions it can be anything like click on a button, watching any video, impression on a certain part of your website.

To discover how users are engaging with such content on your website you need to create custom event tracking inside your Google Analytics.

These insights are very useful from marketing perspective and for A/B testing.

For example, you have placed a banner for a Free eBook download at the header of your website and you want to know how users are engaging with the banner you need to set up a custom event tracking for this.

To set up custom event tracking you need to set event conditions like the below:

  • Category: “CTA” (Call to Action)
  • Action: “Click”
  • Label: “Download”

Setting up these values inside GA requires a bit of coding knowledge and for most people, it can be a tedious task.

But with MosterInsight plugin anyone can add these parameters without any hassle.

Let’s get into it,

How to create Custom Event Tracking in WordPress using MonsterInsights

Using Google Analytics can be hard sometimes and not all the user of GA knows how to get GA to work effectively for their website. What data to read and what data is useful.

To fill this gap the MonsterInsights team has introduced their plugin. This MonsterInsights has made using GA easier for everyone.

MonsterInsights has recently launched a new feature i.e. “Custom Link Attribution” which allows you to track the engagement of any banner, link, or section on your site.

With this feature, you can easily add custom attribution and see how users are interacting with those content. This is very useful data to discover the user’s interest on your website.

You can easily add custom attributes for any links with the help of MonsterInsights.

Just add the following data variable tags to the HTML of your link:

<a href="" data-vars-ga-category="Custom Category" data-vars-ga-action="Custom Action" data-vars-ga-label="Custom Label" >Example</a>

Once you replace the variable tags with the right one Monsterinsghts will begin tracking that event easily and provide you with the detailed report.

Let’s take our previous example, where we need to track the download clicks for a header banner you need to change the respective variables.

Let’s say the CTA button is linked to the download page “” and the other event conditions will be similar to the previous ones i.e.

  • Category: “cta” (Call to Action)
  • Action: “Click”
  • Label: “Download”

Once we replace these custom attributes our HTML string would be like this,

<a href="" data-vars-ga-category="cta" data-vars-ga-action="click" data-vars-ga-label="Download button" >Download</a>

This is all what you have to do. It’s easy,

isn’t it?

Now to view the reports, head over to the MonsterInsights then Insights>> Reports>> Publisher.

Now scroll down to the “Top Outbound links” report to view the report of the newly added Download link.

You can also add such custom attribution for your affiliate link also and measure the link clicks.

The Custom link attribution feature also supports AMP pages, so you can easily track AMP customized links.

Wrapping Up

Adding Custom Link Attributes is a very vital thing to find the actual data for any Outbound link.

By adding such attributes you can easily figure out how users are engaging with the link, it is also useful for A/B testing of a link.

Say a banner isn’t working on the header but it may work in the sidebar, you can easily find out this by adding custom event tracking with the help of MonsterInsights Plugin.

If you don’t have installed this click here to get “MonsterInsights

Have any doubts? let me know in the comment section, I’ll help you out.

Leave a Comment