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.

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

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

ADVERTISEMENT

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

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK