Call Us: 512.271.5221


How to add Event Tracking with Google Analytics


Normally when I want to use Conversion Tracking for Google Analytics and Google Adwords for a form, I just track the link of the "Thank You" page.  However, I needed a way to track users clicking the button to use our ZenDesk form. To do that, you need "Event Tracking."



1. Login to you Google Analytics for your site and click on ADMIN.


2. Under VIEW, click on the GOALS link.



3. Click on CREATE NEW GOAL.


4. Give the goal a title, then choose EVENT as the type.



5. For the category, I used the name of the form I am trying to track.


6. For action, I just put "Click"


7. For label, I put the text on the button since I have a few variants, but it might be any other factors you want to track (ie location, size, color of button, etc)


8. Since we are just checking whether they clicked it or not, there is not quantative value (like how long they watched a video for). Set "Use the Event value as the Goal Value for the conversion" to NO.



9. Using the example I made, that translates to this for the code:

<a href="#" onClick="_gaq.push(['_trackEvent', 'Maintenance Signup', 'Click', 'Request More Info']);">Request More Info</a>


10. You will want to replace the "#" with your real link.


11. For this to send data, you also have to get the Google Analytic Event Driven snippet and add it to your site. I just did this in the "debug" module position and put the code snippet in using Sourcerer.


12. That snippet is below and you will want to replace the UA-XXXXX-X with your Google ID:

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);




Author: Alexis Priddy Categories: Search Engine Optimization

About the Author

Alexis Priddy

Alexis Priddy

Alexis moved to Waco in 2008 after five years in the United States Army as a military police officer.  Web design was a hobby that grew into a passionwhile she was in the military.  She is the founder of, a reference website for Army personnel that averages over 25,000 unique visitors a month.  When she sold that website to a national marketing firm, she decided to venture out and start YellowWebMonkey Web Design in 2009.  She has a Bachelor of Science degree in Psychology and Computer Science Engineering from the United States Military Academy at West Point, NY.