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

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

AiOTA - Ai Art Generator

Ai art generator,art generator,stable diffusion,avator maker,text to photo,text to photo AI,ai photo Minor Changes in UI on Home Screen  Use AiOTA Ai text to image art generator to convert your text into an image and create abstract avatars. Immerse yourself in the world of creativity with AIOTA, the ultimate AI Art Generator and Abstract Avatar creator app for iOS. Harnessing the power of artificial intelligence, AIOTA brings your imagination to life by transforming text prompts into stunning artwork and enabling you to craft unique abstract avatars that reflect your individuality. AI Art Generator: AIOTA's AI Art Generator is a groundbreaking feature that allows you to generate beautiful and captivating artwork by simply providing text prompts. Whether you want to visualize a concept, evoke an emotion, or simply explore your creativity, AIOTA's advanced algorithms analyze your text and translate it into vivid, visually stunning images. Discover a wide range of artistic styles...

Career Planning and Management

Having a passion or dream to satisfy, is a step ahead of planning. So, have an objective that will keep you directed and target driven, and satisfy your need to be the best. Career is what one aspires to be, or where one wishes to see himself/ herself after a certain period of time. Thus, it relates to a number of things like your interests, abilities, skills, capacities, and a lot of constraints. So, give enough thought to build a life time career objective, and have a clear vision to monitor the plans. Essentials of career planning and management: Here, find a list of things which needs to be considered while preparing a good career plan, and determining career objectives. Clarify your doubts and relevant queries with respect to life time goal, to plan the jobs to be held throughout your career. It assists in determining growth and development probabilities.   Interests, passion for work: Think about your interests and skills, the area that fascinates you t...