If you use Google Analytics and you’ve ever tried to determine what URLs are referring to your site, you may have noticed that the report only includes the file name portion of the URL, excluding the query string. If your referrers are dynamic forums and bulletin boards, this makes it impossible to tell what message or thread has linked to your site. All you may see are a bunch of referrals from “/forums/viewtopic.php” since the full article path is encoded in the query string.

Reuben Yau came up with a nice hack that solves the full-referrer problem. The hack uses urchin’s manual javascript tracking mechanism, typically used to track flash events, to register a page view with the full referring URL as the title. Just update your tracking code with the following:

<script src="" type="text/javascript">
<script type="text/javascript">
_uacct = "UA-XXXXXX-X";

After you’ve made the change, you’ll start seeing referring URLs showing up in the main content reports (as opposed to the “referring source/cross segment performance/content” report). They’ll look a little different from typical content, as the content name will contain a full http:// URL. You can then filter the report for “http:” if you only want to view the referrer data.

Google Analytics Full Referrer Tracking –Link.