0

Track Google Analytics Events from Your WordPress Site

Step by step instructions to Track Google Analytics Events from Your WordPress Site 

You are most likely utilizing a WordPress Google Analytics module to track your page visits and other movement related measurements as of now yet consider the possibility that you needed to track how frequently a specific catch or connection gets clicked. You can utilize Google Analytics occasion following to get more bits of knowledge into the accompanying sort of situations: 

Does the red catch gets more snap or the green catch? 

Which “Purchase” catch gets the most taps on my business page (the one in the center or the one toward the end)? 

Which adaptation of the standard gets clicked all the more regularly? 

Google Analytics (GA) is a free administration offered by Google that produces nitty gritty insights about the guests to a site. Google Analytics can be modified to track any number of occasions. You should simply alter the code to coordinate your site’s needs. 

Setting up Event Tracking with an Example 

Occasion Tracking is a strategy accessible in the ga.js following code that you can use to record client connection with site components, for example, a catch tap on your site. This is proficient by connecting the strategy call to the specific UI component you need to track. 

To track an occasion (case: a tick on a connection) you have to call the _trackEvent() technique when that occasion happens. The _trackEvent() technique can take up to 4 parameters: 

classification (required) – The name you supply for the gathering of items you need to track. 

activity (required) – A string that is remarkably matched with every classification, and normally used to characterize the sort of client connection for the web protest. 

mark (discretionary) – A discretionary string to give extra measurements to the occasion information. 

esteem (discretionary) – A whole number that you can use to give numerical information about the client occasion. 


A straightforward case delineates how you may utilize the Event Tracking technique to record client collaboration with a connection on your WordPress page. 

<a href=”http://www.tipsandtricks-hq.com/items” onClick=”_gaq.push([‘_trackEvent’, ‘Connection Clicks’, ‘Items’, ‘The item interface on the business page’]);”>Visit Products Page</a> 

The above will track what number of individuals tapped on the “Visit Products Page” interface from that specific page. It will record the occasion in the “Connection Clicks” class with the activity being “Items” and the name being “The item interface on the business page”. 

Case of Tracking Clicks on a Link and Clicks on a Button 

Ensure you have a WordPress Google Analytics Plugin introduced. I prescribe utilizing the Yoast Google Analytics module. 

1) Now simply put the accompanying code in your post or page (adjust the href parameter as you require). This will track an occasion everytime somebody taps the “Visit Products Page” connect. 

<a href=”http://www.tipsandtricks-hq.com/items” onClick=”_gaq.push([‘_trackEvent’, ‘Connection Clicks’, ‘Items’, ‘The item interface on the unique offer page’]);”>Visit Products Page</a> 

2) If you need to track a tick on a catch at that point add the accompanying to your catch’s onclick parameter: 

<input type=”button” name=”submit-catch” value=”Submit” onclick=”_gaq.push([‘_trackEvent’, ‘Catch Clicks’, ‘Items’, ‘The blue catch on the deals page’]);”/> 

The blue hued code above will track each snap of this catch as an occasion. On the off chance that you have a couple of catches on your business page for instance, you can dole out one of a kind messages to each catch and afterward discover which one got tapped the most. 

The most effective method to View the Event Tracking Report in Analytics 

Since you have the following code set up you most likely need to see the report and discover which occasions are famous. Just sign into your Google Analytics account and go to “Content” – > “Occasion Tracking” area to see the occasion following report. 

Make sure to sit tight for a couple of hours before you check your details however (There is a postponement in Google Analytics details). 

Case with WP eStore catches 

A couple of my WordPress Shopping Cart clients have asked me how they can track the “Add to truck” or “Purchase Now” catch clicks. Here is a speedy case that demonstrates to you industry standards to track purchase catch clicks made utilizing the WP eStore module without altering the module code. Basically include the substance of the accompanying connect to your topic’s header or footer. It has one case of each sort of catch click following (“Add to Cart”, “Purchase Now” and “Membership”). 

Google Analytics Tracking Code for WP eStore catch Clicks 

Presently go and execute some occasion following for your site

admin

Leave a Reply

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