Reuben Yau got fed up with not being able to see the full url in Google analytics. For example instead of seeing forum/showthread.php you'll now be able to see exactly which thread it was. Basically if you use Analytics, it's a good hack to use. Original Post Here: http://www.reubenyau.com/google-analytics-hack-obtaining-full-referring-url/ Digg submission here: http://digg.com/software/Google_Analytics_Hack_obtaining_full_referring_URL
As far as I've seen there's no drawback. The reason I used to put it in the footer was in case Analytics went down or something like that but the script should simply be ignored if analytics is down soo that should be fine. Anyone else know of any risks to putting the code in the header?
Awesome hack, i get a ton of my traffic from random forums, and when i go to see if they're writing something good or bad, the thread is nowhere to be found... dugg.
Mmm... I think that's not the proper way to do it, to be true. If you do this you're gonna mess your stats, and a URL like http: //www. example.com/myfolder/ will look in you stats like http: //www. example.com/myfolder/ http ://www. myreferer.com/forum.php?id=xx If you want to do that it's better doing the following (while there's much more organized ways, this will do the job). I'm translating from Spanish, so I'm sorry if something doesn't match exactly. Go to your account and select "Edit Settings (configuration)" in the profile you want to track full referers. The go to filters, "add new filter to profile", "Advanced". Fill as follows (no quotes!): Field A -> Extract A: "Referer" - "(.*)" Filed B -> Extract B: leave empty Send results - constructor: "User defined" - "$A1" Field A is Mandatory, Field B is not, Overwrite results: Yes. Case Sensitive: No Save and it done. Wait a few hours and then look at: Marketing Optimisation, Visitor Segment Performance, User Defined. It's there. Another GA tip is: if you want to experiment, duplicate the profile which you are using for the tests, so you do not break the data you have. You can have many duplicate profiles for the same website and then just delete them and re-use. And another one: have a quick look in to urchin.js and you'll see easily you can get local SE's such as google.co.uk, google.nl, google.es... displaying properly in the reports, not only a generic Google. Many things can be done by using filters properly, but it needs testing. My cents.
The report in my version of analytics shows this thread for example as: /http://forums.digitalpoint.com/showthread.php?t=220136 It has a leading slash, but that's it. I did try using filters before, but I never got it to work, have you? I used this method of putting the referrers into the top content report because I thought that the variables were stripped by the analytics urchin.js script so Analytics never sees them.
Hi there, Yes, I've used this method and it works. The only downside is that then, in the user-define report, you will see ALL the referers, including search engines, so this can be a long list. This is why I said there's better ways to do it. If you like playing with Analytics, the analytics blog http://analytics.blogspot.com has some links which really interesting.
I am really leery of putting tracking code near the top of the page. What if tracking is slow(er), the meat of your page will show up slow as well. IMO, the hack in the original thread may work well for a hobby site, or a site which has some awesome information that its visitors can't live without. But for those who run serious, professional, money making sites the analytics javascript belongs where urchin recommends it. Below the fold, where a user looking at the meat&potatoes can't care less that some overloaded analytics server is busy getting the image. For e-commerce sites, competition is literally one click away and a few millisecond delay may reduce conversion rate. Even if it doesn't, a harried, high traffic site owner won't be able to sleep at night thinking it may. Sorry to belabor the point...but there's a reason people recommend you place their code in a certain place on the page(and believe me, google/urchin is not stupid). I manage click fraud(www.sofizar.com) and use www.zaralyzer.com . I have found that atleast some of the "fraud" is correlated with slow load time and also site uptime issues. -Z