Event Tracking Plugin for WordPress Websites

Project Inquiry

The more information you provide, the better we’ll understand your project and find the right solutions for you. Or if you’d like to talk to a live person give us a call at 888.217.9502. Talk to you soon!

If you’ve been following our blog you may have noticed how serious we are about gathering user data and reporting it through our client dashboard & Google Analytics. After all, if you’re not able to report the results from your efforts, then what’s the point?

Our digital marketers and developers teamed up to create a WordPress plugin that easily tracks important events on your site—far easier than adding event tracking manually.

The Gravitate Event Tracking plugin offers a more effective method of tracking engagement with specific elements on your site that feed directly to your Google Analytics reports, automatically!

Currently, the plugin is compatible up to version 3.9, but we will be working to ensure its compatibility to the most recent version of WordPress as it continues to update.

How to install Gravitate Event Tracking

To install this plugin, you can search “Gravitate Event Tracking” with the WordPress plugin search or go to our page on WordPress.org to download the plugin directly and install it through FTP.

Once installed, you’ll need to go to the “Plugins” menu and activate it. After activation you’ll be able to configure the plugin via:

Settings>Gravitate Event Tracking

Presets for Gravitate Event Tracking

By default, the plugin is currently set to track when certain file types are selected. The file types are:

Pdf

Doc

Docx

Ods

Odt

Xls

Xlsx

Txt

Zip

Csv

It is also set to track when a button is clicked with the input type set to “submit”—common within contact forms. For assessment purposes, the label is preset to include the title of the element selected and the URL, so during reporting you’ll be able to easily understand “what” element was selected and “where” the selection took place.

We’ve also included a default event titled, “Generic Event Tracker” allowing you can add the class ‘.gtrack’ to any item you wish to track. For example:

Selector – “.track-email” Or you can copy the unique selector for any item on your site and place it here, it doesn’t have to be a custom class or ID.

You are also able to track any link that contains an element so any email link with a[href^=”mailto”] or any telephone link with a[href^=”tel”]. If you use these two, you don’t need to insert any custom id or class selector (skip steps 4 & 5).

Category – “Contact”

Action – “Email”

Label – “Email_{ITEM_TITLE}_{PAGE_URL}”

After you’ve entered data be sure to click “Save Changes”

*The Selector/Element could be from code currently on the site or from a new class added to certain events. If you chose a class, you’ll need to go to each element you want to track and add the class to it. See previous post, “Event Tracking WordPress Edition” step 4 for more information.

If desired, you can copy the labels from the presets as these include the title of the element and URL that the event occurred, but you’ll still want to customize the label slightly based on the Title/Description.

Step 4: Go to your page with the email link on it and edit it viewing the text

Step 5: Inside of the link, add the class that you created earlier, class=”track-email” and make sure it has a title as well, for reporting purposes. If it does not, add the title, which could be the email itself title=”hello”. After you are done be sure to update the page.

After your tracking is set up you should be able to log in to your Google Analytics and go to Behavior > Events > Events Overview and under the category “Contact” you’ll see how many clicks this email has received.

Now that you know how to use the plugin be sure to go to WordPress and download our Event Tracking Plugin for your website. Hopefully this will help you start tracking items on your website and report positive results from your efforts.

Version 1.2.1 Update:

We have updated the plugin and added Advanced Settings page which you can access in the top right of the plugin screen.

The advanced settings now comes with Delay re-capture settings. This allows you to add tracking to elements that get created after load.

This is great if you are importing some javascript that creates elements on your website as those elements are not always available immediately to Gravitate Event Tracking and require a couple extra seconds (depending on internet speed) to load.

If the Elements are not available right away to Gravitate Event Tracking it will re-check for the elements after a period of time which you are able to set.

The Advanced Settings will also be Imported and Exported with the Import/Export feature. Please note that Exporting Settings from version 1.2.0 will not work importing in version 1.1.1 or lower. But you can Import settings from 1.1.1 or lower into version 1.2.0

Version 1.4.1 Update:

We have updated the plugin and added more default settings. The default settings include:

All Submit Buttons

All Form Submissions

All External Links

Resized Screen

Scrolled

Scroll Depth

These presets should allow your team to track more user behavior on your website and analyze this behavior.