I am using onclick="parent.location='#'" to make a table into a link, but will Google Analytics see this as a link or will it cause mayhem in the reports?


If the link is internal to your site, yes Google will track it, because the target page should contain the tracking script as well.

If the link is external, then no. You need to call:

pageTracker._trackPageview('...your url...');

then direct the user to the new page.


From the server's perspective there is no difference between an actual link being clicked and a request sent by JavaScript. Both are HTTP requests. I'd assume that Google Analytics counts them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy