How to Easily Track Events in WordPress with Google Analytics eBuilderz featured image

Having GA in your website, you can track your source, page views, time spent on-page, and much more. If you want detailed info about these reports, then you will require event tracking. In this post, we going to discuss the benefits of event tracking. We will also show you the various ways available for you to add it to your site and analytics event tracking.

What is Event Tracking?

Event tracking refers to measuring how users engage with your website. Visitors interact with your site by playing a video, clicking a button, filling out forms, and more. Know who, where, and how they do this allows you to understand your target audience better. Event tracking also gives you insights on how visitors interact with your forms.

By tracking file downloads using event tracking, you will know how many of your users viewed a file. You also get reports on which button was clicked the most. If you didn’t know, event tracking is not the same as link tracking. If you want to track links in your website, you need to the link’s UTM source.

These reports are important as they allow you to know how users behave on your website. If you feel like you are not doing enough, you change a few things to improve user experience. By changing your strategy to suit the user, you will increase engagement leading to more conversions.

Getting Started

The first thing for you to do is set up and install GA on your website. Not familiar yet about GA and how it works? Don’t worry, our guide on how to use add analytics event tracking will help you. You can dive right into event tracking if you already have GA on your site.

Upgrade your GA to Universal Analytics Code

Your website has two versions of GA. Google wants GA users to get rid of the older version and embrace the new one. This is done by removing the older code and replacing it with the latest ‘Universal Analytics Code’

Those using the code below are good to go since it’s the newer version:

Sorry to burst your bubbles, but if your code doesn’t look like this, it’s the older version. You need to upgrade your code, and don’t worry; we have details on how to do that. If you don’t have access to advanced features in GA, switch to the new code. This is done in the account’s property settings section.

Le t’s now move to the next step of you already have this new GA code.

Also, you can read Increase Conversion Rate by Adding a Multi-Step Form In

Creating Your Event in Google Analytics

Creating your Event is the first thing you need to do in your GA account. Once you’ve logged in to your dashboard, click on the Admin link at the top. For multiple websites, ensure that you are viewing the site you want to add the Event.

analytics event tracking-admin 1

Google Analytics Dashboard

You will find three columns on the admin page, and here you’ll need to click on the ‘Goals’ link. This is found under the ‘View’ column.

analytics event tracking-analytics-goals

Once you are done with that, click on the ‘New Goal’ button to create a goal. Go to the Goal Setup options, and after selecting the custom option, click on the Next button to proceed.

analytics event tracking- new goal

You’ll be brought to the Goal Description step to provide a title for your custom goal. You’ll do this to simplify the goal in GA.

Next, select Event under the goal type, and proceed to the next step by clicking on the Next button.

analytics event tracking-goaldescription

The final step is to give the goal details by entering the Event’s conditions. After matching all conditions, GA will count a conversion.

The goals will activate when you click on the Save button. When you have done all this, you will then be able to track for an event in Google Analytics. After that, your website will track this Event and send reports to GA.

How to Add Custom Event Tracking using the MonsterInsights Plugin

You can also add a custom link tracking in your website using a plugin. In this case, we’ve chosen MonsterInsights as a plugin since it’s the best Google Analytics plugin. Users can leverage this plugin to breakdown info in the simplest way possible.

The new Custom Link Attribution feature was introduced by this plugin to help users add analytics event tracking. To benefit from this feature, you have to use the latest version of the plugin. One of the benefits of this feature includes finding the effects of call-to-action buttons. This helps you to know whether they are working as expected or not. You can also add custom analytics event tracking to other links to know how users interact with them.

Adding a custom event analytics tracking in your website using this plugin is quite easy. You can do this by adding these data-variable tags to the 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>

The moment you finish adding them, you will start getting detailed link reports from this tool. We are going to use the sidebar call-to-action button as an example for adding custom event tracking.

The following conditions will apply here:

Category: “cta”

Action: “click.”

Label: “buy button.”

The next thing is replacing event category, action, and label with your event conditions. When you finish doing that, your custom event tracking link will look like this:

<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>

Go to the Publisher report now, to check the data from your custom event tracking link in MonsterInsights. While you are there, head over to Insights >> Reports >> Publisher. To view the Top Outbound Links report you created from your custom link, scroll down.

If you created a custom affiliate link, reports plugin allows you to see the number of links by viewing the Top Affiliate Links report. You will also get support for Google AMP pages with the Custom Link Attribution feature. This allows you to accurately track AMP optimized custom links.

See More:- How to Set Up Author Tracking On Your Site by MonsterInsights

How to Add On-click Parameter on Your Link

Another way to add custom event tracking is with the onclick parameter. This method requires a bit of Javascript skills to work.

The format below is used by the on-click parameter:

Onclick=”__gaTracker(‘send’, ‘event’, ‘category’, ‘action’, ‘label’, ‘value’);”

Just like we did with using a plugin, we are going to replace category, action, and value with the event conditions. The final result of the call-to-action button link will look like these:

<a href=http://yoursite.com/pricing onclick=”__gaTracker(‘send’, ‘event’, ‘cta’, ‘Click’, ‘Buy button’, ‘0’);” >Buy Now</a>

You have now finished adding custom events on your website. With the help of GA, you can now track custom events when your site users view or click on the button.

Checkout quick video review on How to Easily Track Events in with Google Analytics

Source:- Simplilearn

Final Thoughts

The best way to grow your online business is to increase the conversion rates on your website. This leads to increased sales and repeat purchases. It’s difficult to achieve this if you don’t know how your visitors interact with your site. Fortunately, adding event tracking in your site will help you understand your readers better. I hope that this guide on how to add event tracking with GA was helpful. Go ahead and install MonsterInsights on your site to see how it works.

Here are a few more topics that you shouldn’t miss:
Angular vs AngularJS [2020]Which one is Best?
How to See the Keywords People Use to Find Your Website

Like this post? Don’t forget to share

Recommended Posts

No comment yet, add your voice below!


Add a Comment

Your email address will not be published. Required fields are marked *