Forum Moderators: DixonJones

Message Too Old, No Replies

Google analytics doesn't report a few links

...... wonder if this is the reason ...............

         

getxb

9:28 pm on Nov 13, 2007 (gmt 0)

10+ Year Member



We have a thousand odd links that looks like .. www.example.com/ex5/?/test_x.html Or in other words have this /ex5/?/ included in those links. Google Analytics doesn't report clicks on those links as I find in the Site Overlay report. Why is it so? As I found from the robots.txt file /ex5 is 'Disallow'ed specially for User-agent GoogleBot. Can this be a reason? Or may be some cookie probs as 'ex5' is itself a part of an inbuilt tracking system.

Please shed some lights.

Regards,
getxb

alexnero

4:26 am on Nov 14, 2007 (gmt 0)

10+ Year Member



Anything you "Disallow" in ROBOTS.TXT will be ignored by the bot(s).

(Including all files in the directory, as well as all subdirectories.)

You have the "ex5" folder explicitly disallowed, so it ignores the folder & all HTML files contained / generated in it.

Receptional

10:57 am on Nov 14, 2007 (gmt 0)



Robots.txt won't be your problem in this case, Sure - the urls won't be in Google's search index, but that should be independent of whether they get tracked. I don't use Google analytics much I am afraid, so I am not that much help, but what on EARTH do you have urls like that for?

www.example.com/ex5/?/test_x.html

That isn't exactly... best practice syntax. a "?" in a URL indicates that a parameter is about to follow, so I would expect a sytax like:

www.example.com/ex5?source=test_x.html not /?/ <<< That's just bad code!

Anyway - a faitly sure way to fix that woudl be to eliminate the? altogether so that the uri looked like:

www.example.com/ex/test_x.html

then Google Analytics wouldn't assume everything after a? is a variable.

getxb

11:58 am on Nov 14, 2007 (gmt 0)

10+ Year Member



Thanks for your valuable thoughts and yup we ARE working on (much needed) url 'clean-up' as much as possible.

Again one more confusion .. say we do make the url look like www.example.com/ex/test_x.html Now if someone clicks on www.example.com/ex/test_x.html from test.html, (as per the present convention of our site) will lead to www.example.com/test_x.html (redirection) and /ex will continue to be disallowed in the robots.txt

In this case will I get to see the click patterns of link www.example.com/ex/test_x.html in the Site Overlay report for page test.html

Receptional

12:12 pm on Nov 14, 2007 (gmt 0)



AAaaaaah!

so everything after the? means that the url is being redirected! I get it now.

For Google analytics code to run, the page needs to load with the URL you want to track. If you redirect, this usually happens before the code loads - so Google analytics won't pick up the redirect.

So you are aiming to be clever and 301 tracking urls. That makes sense.

I have no idea how to do that using GA, but here's the what I do on my preferred tracking system... we set the tracking element as a cookie, which CAN be done before the page loads, then deliver the 301, then we pick up the cookie on the redirected page and feed that into our tracking code when the page loads.

Took a bit of cracking though! It eliminates any chance of dupes and results in cleaner URLs for the users. the theory is that it should also help Google out... but I never tested that logic in isolation.