Show Full Referring Source in Google Analytics

Technology
Show Full Referring Source in Google Analytics

analyticsreferrer_20070410.jpg
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="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-XXXXXX-X";
urchinTracker();
urchinTracker(document.referrer);
</script>

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.

Discuss this article with the rest of the community on our Discord server!
Tagged

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK