Forum Moderators: DixonJones
For example, to log every click on a particular link to www.example.com as a pageview for "/outgoing/example_com" you would add the following attribute to the link's tag:
<a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview('/outgoing/example.com');">
It is a good idea to log all of your outbound links into a logical directory structure as shown in the example. This way, you will be able to easily identify what pages visitors clicked on to leave your site.
Have you searched through Google Analytics help for this topic?
Tagging does not work well with this kind of inbound situation. You might have to analyze your server logs.
Are you trying to figure out
1) when an external site links to an old URL on your site which you have since 301 redirected to a different page on your site? or
2) when a link on your site to an external site links to an old page on the external site which results in a 301 firing on that external site to redirect your link to a different page on the external site (or another external site)? or
3) something else?
#1 is fairly straight foward. You should be able to look for page requests where the referer is an external domains for which your web server(s) returned a 301.
#2 I think would require something crawl your sight for external links, request those pages to which you link, and check the return status for a 301 instead of a 200.
[edited by: ZydoSEO at 7:07 pm (utc) on Nov. 25, 2008]
when you search your content area for "/outgoing/example.com"
it will show you how many visitors clicked that link to go outside of your domain...
the 301 on the other side should not make a difference.
when you tag your outbound link as such:
<a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview('/outgoing/example.com');">
this will count how many times someone clicked the outbound link.
it works for my site just fine.
i have an outbound link to a medical site that is not my domain... it wouldnt matter if the link was a 301 redirect, its only tracking how many times someone clicked that link.
i think that is what you are looking for.