Exciting News! Flipper Code is now WePlugins! Same commitment to excellence, brand new identity.

How to Install the Google Analytics Plugin for WordPress

Sandeep Kumar Mishra
Sandeep Kumar Mishra
in Posts > Tech
July 23, 2013
5 minutes read
How to Install the Google Analytics Plugin for WordPress

Event Tracking is a powerful feature in Google Analytics that lets you apply custom event tracking on any elements or parts of your web page. For example, you can track the number of clicks on your logo, the number of clicks on your “buy now” button, and so on. This guide will walk you through the process of setting up and using Event Tracking on your WordPress site.

How to Install Google Analytics Tracking Code on a WordPress Site

If you have already installed the Google Analytics tracking code, you can skip this step. However, for those who haven’t, we’ll show you an easy way to do it using a WordPress plugin. Follow these steps to install the Google Analytics code:

1. Install and activate the Google Analytics plugin for WordPress.

2. Navigate to the plugin settings and paste your Google Analytics code as shown in the screenshot below:

Google Analytics WordPress

How to Apply Custom Event Tracking for Google Analytics

Now it’s time to apply custom tracking to elements on your site. First, decide which elements you want to track. You will need to add an extra class to these elements. The class nomenclature should be as follows:

track_category_action – Here, “category” is the Event Category, and “action” is the Event Action. Take a look at the image below to understand this better:

Custom Event Tracking Examples

The following examples will help you understand how to use this plugin and its functionality. For any questions, feel free to post a reply below.

Case Study – Suppose you have a blog and you want to track how many visitors clicked on your logo.Class Name Should be: track_logo_clicks

Here, Event Category is logo and Event Action is clicks.

Case Study – Suppose you have an advertisement and you want to track the number of clicks on your advertisement.Class Name Should be: track_advertisement_clicks

Here, Event Category is advertisement and Event Action is clicks.

Case Study – Suppose you’re running an osCommerce solution and have a cart, and you want to track how many visitors clicked on the “buy now” button.Class Name Should be: track_buynow_clicks

Here, Event Category is buynow and Event Action is clicks.

Case Study – Suppose you have a form and you want to know how many times the form was submitted.Class Name Should be: track_form_submit

Here, Event Category is form and Event Action is submit.

 

Though you may decide on appropriate Event Category and Event Action titles as per your needs, if you’re using this plugin and don’t understand how to track an element, you may contact us and we’ll apply that for you.

Premium Plugins Bundle

Premium Plugins Bundle

Unlock all our top WordPress plugins in one easy bundle — Easy to use, no coding required and dedicated support team.
Get the Bundle - Instant Access
Sandeep Kumar Mishra

Sandeep Kumar Mishra

Sandeep Kumar Mishra writes about WordPress and Artificial Intelligence, offering tips and guides to help you master your website and stay updated with the latest tech trends.

Explore the latest in WordPress

Trying to stay on top of it all? Get the best tools, resources and inspiration sent to your inbox every Wednesday.