Goal Tracking with Google Analytics

06.23.2007

I’ve been tracking RateMyApartments.com through Google Analytics for about a half year now and have really enjoyed seeing how the website has been growing. Still, only recently did I implement goal tracking to see how people are navigating through the stages of viewing an apartment, then the rating form, then actually clicking the submit button on the rating form. Because I don’t really sell anything on RateMyApartments.com, a rating is the closest it comes to a goal. If someone rates an apartment, that means more content for other viewers, which in turn makes the website more useful and successful.

One reason for my post today is because it took me a while to figure out how to track goals for my website, due to its fairly complex structure. I extensively use Apache’s rewrite engine to manipulate the address passed from the browser. For example, while you see this address in your browser address bar…

http://www.ratemyapartments.com/ratings/UT/Brigham-Young-University/
Academy-Arms-119/rate_now.php

…it actually goes through the rewrite engine and comes out at the server end looking something like…

http://www.ratemyapartments.com/rate_now.php?
state=UT&school=Brigham-Young-University&apartment=119

The problems arise because it looks like I have several (30,000+) rate_now.php pages. For example, here are two:

http://www.ratemyapartments.com/ratings/UT/Brigham-Young-University/
Academy-Arms-119/rate_now.php

http://www.ratemyapartments.com/ratings/UT/Brigham-Young-University/
Glenwood-135/rate_now.php

So how do I make both of the following addresses correspond to the same step in the goal funnel? I’m glad you asked. If you sift through Google Analytics documentation, you’ll eventually trip over the this page:

How do I set up goals and funnels for dynamically generated pages?

It’s the gold pot at the end of the rainbow. What I do is embed a piece of code into rate_now.php…

1
2
3
4
5
<script type="text/javascript"><!--
_uacct = "UA-895132-1";
urchinTracker("/rating_funnel/step2.html");
urchinTracker();
// --></script>

…which makes both of these addresses…

http://www.ratemyapartments.com/ratings/UT/Brigham-Young-University/
Academy-Arms-119/rate_now.php

http://www.ratemyapartments.com/ratings/UT/Brigham-Young-University/
Glenwood-135/rate_now.php

…now appear to Google Analytics like…

http://www.ratemyapartments.com/rating_funnel/step2.html

Don’t be tricked. Step2.html doesn’t really exist. Nor does the directory rating_funnel. But Google Analytics now thinks that it exists, and no matter which rating page you are on, regardless of the specific apartment, it thinks you are at http://www.ratemyapartments.com/rating_funnel/step2.html. You can then set up that address as your second step in the goal funnel process and you’re good to go.
To give you a little peak, here is a small portion of the information that can be gleaned from having such a setup:

Goal Tracking

Goal Funnel

Tags: , , ,


Leave a Comment

Your email address is required but will not be published.




Comment