Google Analytics Goals

Goals in Google Analytics are one of my favorite features of this amazing free web analytics software. Goals allow you to track actions and then analyze how different traffic segments convert to these actions. Common actions would be completing a lead form, downloading a brochure, clicking the link for directions, etc. Goals are usually implemented by entering the page url where the conversion occurs (Ex: thankyou.html). So how can we implement the goal tracking on sites where the form is the same url as the thank you page, or where the click leaves the site or goes to a non-html page? These can all be done easily by selecting Exact Match as the Match Type and then inserting a fictitious url like /goal/rfi/ for the Goal URL.

Let’s look at the first scenario where someone completes a lead form. Often forms submit to themselves, so you can’t have the goal conversion on the thank you page because it is the same url. These type of dynamic pages can easily fire off goals we just have to do it a different way. When the form is completed successfully, we just make a javascript call in the onload. Notice the /goal/rfi/ from the Goal URL setup.

<body onload="pageTracker._trackPageview('/goal/rfi/');">

So what if you want to track an exit click or a non-html file download (Ex: PDF Brochure). The idea is the same, you simply call the function from the onclick event handler.

<a href="PrettyBrochure.pdf" onclick="pageTracker._trackPageview('/goal/rfi/');">

Be sure that you have the New Tracking Code (ga.js) not the Legacy Tracking Code (urchin.js)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>