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

Applying For a Job is an Art - Do Not Piss Your Future Off by Making Funny Mistakes

Today, while I was short-listing CVs for the post of Content Writer, I came across several non-professional things that made me to write this post here. I hope all of you will take these suggestions positively so next time you are not being ignored by the Employer. Here are they:  1: The foremost surprising thing for me was, none of the applicants even bothered to write a Cover Letter in the Email. Please don't overlook Cover Letter while applying for a job via Email as it creates a good impression of your professional behavior and attitude towards the particular post. (Note: Most of the CVs are shortlisted on the basis of Cover Letter included in the Email)  2: Make sure what you are applying for. The Job was, say, about Content Writer, and the Subject of most of the CVs was "Application for Software Development.” This would not also help you to get shortlisted.  3. Job Location plays a vital role in your CV selection. In the particular case that i am talking