Skip to main content

How to Set Up Event Tracking in Google Analytics

Google Analytics’ Event Tracking is a great tool for monitoring activities on your site that aren’t related to a specific URL destination.
Whereas Google Analytics typically tracks activities on your site related to page loads, Event Tracking tracks actions where no URL destination is recorded, such as clicks on social media links or PDF downloads.

How to Install Event Tracking

Before you can add Event Tracking to your site, you need to make sure that you’re using the new Asynchronous Google Analytics tracking code.
The biggest difference is that the new code is placed at the top of your page, just before the closing </head> tag in your HTML file, whereas the traditional code is placed at the bottom of your page, just before the closing </body> tag.
If you’re not using the new code, here’s how to install it.
If you have a large site with a lot of events to track, you’ll need to install the Event Tracking code in the <head> section of your site. To do this, read Google’s Guide to installing Event Tracking.
For a smaller site, however, you can insert the HTML directly onto your page within the link. The formula is:
<a href=“http://www.url.com” onClick=“_gaq.push([‘_trackEvent’, ‘Category’, ‘Action’]);” target=“_blank”>Name of Your Link</a>

1. How to Track Social Media Links
Here is how you can track links to your social media profiles or other websites that you link to.
This link:
<a href=“https://www.facebook.com/facebookpagename” target=“_blank”>Follow us on Facebook</a>
Becomes:
<a href=“https://www.facebook.com/facebookpagename” onClick=“_gaq.push([‘_trackEvent’, ‘Follow’, ‘Facebook’]);” target=“_blank”>Follow us on Facebook</a>
When people click on this link, it will show up in Analytics under Content > Events. “Follow” will be your Event Category and “Facebook” will be your Event Action.

2. How to Track PDF Downloads
If you have white papers or registration forms on your site, here’s how to track the number of times they are downloaded.
This link:
<a href=“http://url.com/registration-form.pdf” target=“_blank”>Download the registration form.</a>
Becomes:
<a href=“http://url.com/registration-form.pdf” onClick=“_gaq.push([‘_trackEvent’, ‘Download’, ‘Registration Form’]);” target=“_blank”>Download the registration form.</a>
When people click on this link, it will show up in Analytics under Content > Events. “Download” will be your Event Category. “Registration Form” will be your Event Action.

2. How to Track Member Sign Up via a Popup Window
If you use popup windows on your site, here’s how to track activity within them, such as member sign up, member sign in or contest entry submission.
Within the form action code, you will have something like this:
<input type=“submit” name=“LoginButton” class=“submit” id=“sign_in” value=“Sign Up” />
And you’ll change it to this:
<input onClick=“_gaq.push([‘_trackEvent’, ‘Join’, ‘Sign Up’, ‘linkURL=homepage’]);” type=“submit” name=“LoginButton” class=“submit” id=“sign_in” value=“Sign Up” />
This means that the button for “Sign Up” has extra code behind the scenes that says on clicking the button, tell analytics that an event occurred in the category called “Join”, and that event action was a “Sign Up” submission. Label that entry as coming from the “homepage”.

So if you have sign up across multiple pages, you could track what exact page the visitor was on when they signed up. But, if the sign up pop-up is only accessible from a single page, you can remove ‘linkURL=homepage’ from the code.
When people click on the sign up button, it will show up in Analytics under Content > Events. “Join” will be your Event Category. “Sign Up” will be your Event Action.

Once you have Event Tracking set up, if any of the actions you’re tracking are related to business goals, you should have them listed as conversions in the Goal section of Google Analytics.

And don’t forget, you can set up Events as Goals in Google Analytics.

Popular posts from this blog

Speak and Translate Translator

  Voice, Text, Photo & Camera Translator App. Speak and Translate to translate any language easily. translate,translator,translation,speak and translate,voice translator,interpreter,idioms,phrases Speak & Translate – Efficient Language Translator and Voice Interpreter for All Languages in the World. Perfect Voice, Text, Photo and Camera Translator app. Speak & Translate is an innovative communication application that provides a unique way to translate and interpret all languages of the world. Speak and Translate is a free voice to voice translator for users who frequently need to translate one language into another. The app also can be used as an effective dictionary tool to find meanings of words of all languages in the world. By just simply speaking in your language, the Speak and Translate Voice Translator will auto detect your language and will translate and interpret it into the desired language quickly. In short, Speak & Translate will convert your speech into...

Nudge - Notes and Reminders

"Get a nudge when you need it! With Nudge, create reminders and notes for all aspects of your life. Stay organized and on track, download now." Nudge is an intuitive and powerful app that helps users stay organized and on top of their daily tasks. With Nudge, users can easily create reminders and notes for all aspects of their life, whether it's personal or professional. The app allows users to add textual, photo or voice notes and reminders, making it easy to capture and remember important information. Whether you need to remember to pick up groceries, pay bills, or complete a work project, Nudge has got you covered. With its clean and user-friendly interface, Nudge is simple to navigate, and you can easily manage and prioritize your tasks. You can also set due dates and times for your reminders to ensure that you stay on track. Nudge also offers the ability to customize your reminders with different colors and icons, making it easy to differentiate between tasks and eve...

30 Day Home Workout Plan

 30 Days Workout and Fitness App is an Excellent Application to Help Your Body Stay Tuned and Fit with Diet Plan and Perfect Exercises. 30 Days Workout and Fitness app is an excellent application to help your body stay tuned and fit. If you are someone who is committed forward to get in shape, then 30 Days Workout and Diet plan app can help you achieve everything in 4 weeks. The application is simple. It gives you a 30 days plan to perform on daily basis with specific set of exercises. As you go along with the days, you will see the improvement in your fitness. The body will start to get in shape and you will start improving on your stamina and strength. 30/28 Day Workout Plan: This plan includes Workouts to do from Day 1 to Day 30. All the exercises in this plan are detailed in the form of Animation. Also more help is added as YouTube tutorial to help you perform the exercises accurately. All you need is to perform the exercises as per given plan. Here is the list of Days and Work...