google analytics event tracking wordpress plugin

How to Create Easy Event Tracking with Google Analytics in WordPress

Normally you can track page views, referral source, time spent on-page, and much more by simply installing Google Analytics WordPress plugin. But you want to know more about what happens on your website rather than except mentioned above. I mean in-depth insights, for this you will need to use google analytics event tracking.

In this article, I will explain to you how to set-up event tracking on WordPress?

The event tracking helps you to track and measure the results of your most important links and call-to-action buttons (ex: download e-books).

For event tracking, you’d have to manually add in a bunch of event tracking code because Google Analytics doesn’t track links and button clicks by default.

No worry, MonsterInsights track custom event inside the WordPress dashboard it will collect your links and button clicks tracking. and supply the collected data to Google Analytics you analyze the on Google Analytics in details.

For this you will need to have latest MonsterInsights pro plugin.

Benefits of google analytics event tracking on WordPress.

By default Google Analytics track only page views, referral source, time spent on-page, and some other. Except for these, you have many other links on your website.

  • Affiliate links: This one is an outbound link Google Analytics does not track this link.
  • Add to Cart buttons will lead your customers to buy a product from your store.
  • Form Submit buttons will help your users to send a message using your online contact form.
  • File download buttons will help your users to download files from your site.
  • Outbound links will redirect your readers to other websites (resources) you want them to go to.
  • Call-to-action buttons will take your users to your product landing pages, and other important conversion pages.
  • Click to call buttons are great for generating leads.

Above mentioned all link Google Analytics does not track them out. But you want to track these links also. By MonsterInsights you can easily track these links and send data Google Analytics.

Google Analytics event tracking set-up

google analytics event tracking tutorial

After install and activation of MonsterInsights, need some basic settings for easy event tracking.

Goes Insights > Settings > Engagement make sure the “Enable MonsterInsights events tracking” is enabled.

google analytics event tracking tutorial

In this article we setting up MonsterInsights Custom Link Attribution.

In this Custom Link Attribution, you can easily track your custom links inside your WordPress dashboard.

This is an example Event conditions:

  • Category: “Download”
  • Action: “click”
  • Label: “Download pdf”

You can replace your own event category, action, and label with your event conditions.

Then your custom event tracking link will look like the one  below:

<a href="" data-vars-ga-category="download" data-vars-ga-action="click" data-vars-ga-label="Download pdf" >Buy Now</a>

Now your custom event ready. If a user clicks this kind of link on your website. The data will send to Google Analytics by MonsterInsights.

You can see the report inside WordPress and detailed in Google Analytics.

Go to Insights » Reports» Publisher. Next, scroll down and view the Top Outbound Links report. The report seems like in the picture below

Final thoughts

This shows you how to google analytics track the event of your WordPress website.

We hope you can now easily track the custom link of the WordPress website inside the WordPress dashboard.

Want to know if visitors have read your post in full or left it out from half? The scroll depth article helps you in detail.


I am Sunil Ilanthila Website Designer and Graphic Designer Specialised in WordPress Web Designer and also a Blog Writer.

Leave a Reply