How to Easily Use Event Tracking in WordPress with Google Analytics

Last Updated on

Event Tracking in WordPress

Do you want to set up Google Analytics custom events tracking in WordPress?

It helps you to measure the results of your most important links and call-to-action buttons.

However, the setup process of event tracking is a little difficult for beginners, so you can use Monsterinsights plugin custom link attribution feature.

In this post, you will know who to set up Google analytics custom tracking in WordPress using Monsterinsights.

 

Why Use Google Analytics Custom Events?

Events tracking allows you to track how your site visitors are interacting with site content.

Tracking your events helps you to know the most important content and measure conversions, so when you have accurate data you can customize content that boost your sales.

For Example, You have added a banner to your site and now you want to know how many people are interacting with it.

Then, Custom event tracking allows you to track how many people visited your content.

There are 3 main components of event tracking.

  • Event Category: Typically the name of the object user interacts with for example, “CTA” for call-to-action buttons.
  • Event Action: The name of the type of interaction for example, click on the buttons.
  • Event Label: Additional information about the events you want to track for example, Buy Button for your sidebar.

If you want to track call-to-action button event tracking, you can add event conditions like.

  • Category: “CTA
  • Action: “Click
  • Label: “Buy Button

Once you do that Google Analytics starts recording your call-to-action clicks as a custom event.

Click Here to Get MonsterInsights Pro

 

Set Up Google Analytics Custom Events Tracking in WordPress

By default, Google Analytics tracks only page view hits like primary dimensions and metrics so you should set up a custom event tracking to measure event hits like users interactions with content.

You can set up Google Analytics custom event tracking in WordPress using Monsterinsights.

This plugin simplify the whole process of setting up event tracking in WordPress. It takes hardly 5 minutes to set up event tracking.

If you have zero coding skill even you can do this yourself. Now let’s see how to add custom event tracking in WordPress.

 

Add Custom Link Tracking with MonsterInsights

Monsterinsights is the best WordPress Google analytics on the market. It helps you to install Google analytics with WordPress in an easy way.

It has a new custom link attribution feature to allow you easily add custom event tracking to your custom links.

With new custom link attribution feature you can track your call to action (CTA) buttons and find out how relevant they are for your site conversions.

You can add event tracking to other important links such as your sub-domains and see how users interact with those links.

It’s so easy to add custom event tracking to your WordPress links with monsterinsights.

All you need to do is add the following date variable to 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>

 

Once you successfully added the tags, monsterinsights will start tracking your WordPress links and provide you with detailed reports.

Let’s take an example, suppose the sidebar call to action button is a link to pricing page https://www.example.com/pricing

Here we will use following event conditions 

  • Category: “CTA”
  • Action: “Click”
  • Label: “Buy Button”

Next, you will need to replace the event category action and lebel with event conditions then your custom event tracking link will look the one below.

<a href="https://www.example.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 to view the data from your custom event tracking link, lead over to the publisher report in monsterinsights.

Go to “Insights»Reports»Publisher. Next, scroll and view the links report if you created a custom link, the one for pricing in the example.

outbout links-google anlaytics custom events

And if you created a custom affiliate link you can view the top affiliate link report to see the number of clicks.

The custom link attribute feature also supports the Google AMP page, so you can track your AMP optimized custom links.

Congrats, you have successfully added event tracking in WordPress.

I hope this article shows you how to set up Google Analytics custom event tracking to WordPress.

 

If you have any questions. Do let me know in the comments below.

Leave a Reply