Help with logging stata of external link visits from my site.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • KiwiBrian

    Help with logging stata of external link visits from my site.

    I am using Statcounter to log site visits
    Upon enquiring whether the service logged visits from my site to external
    sites using site links I was given the following information:-
    "You have to provide a means to capture that information.
    There are 2 ways to do it: onClick event handlers placed on all the links to
    external pages with an appropriate javascript function which will perform
    the logging before redirecting to the external link or, better yet, to
    channel each page meant to be linked through an intermediate page
    (perferably written in php) where you log and then redirect to the desired
    external link.
    Using php instead of javascript ensures that even those who disable
    javascript will be channelled in that manner."

    As I am not a professional programmer I would appreciate any pointers,
    examples, or any type of help in achieving my objective.
    Hoping someone can help
    Brian Tozer



  • Andy Dingley

    #2
    Re: Help with logging stata of external link visits from my site.

    On Tue, 12 Apr 2005 18:04:49 +1200, "KiwiBrian" <briantoz@ihug. co.nz>
    wrote:
    [color=blue]
    >As I am not a professional programmer I would appreciate any pointers,
    >examples, or any type of help in achieving my objective.[/color]

    Do it the second way (server side). Mainly because it's _much_
    easier to maintain your page content. You'll need to change all your
    externally pointing links to have URLs of the form:
    http:///redirector.php?url=http%3A%2...p%3D1%26q%3D23

    which is simply the URL encoded form of


    The redirector page itself is probably downloadable from somewhere.
    You only need one for the whole site and it just needs to log simply
    the referrer page and the target URL. before performing a 301 redirect
    to the supplied URL.

    It's even optional to bother doing any logging - you could always pull
    this information from the main server logs.


    If you do it with events on the page, it needs to have scripting
    running on the clients and it also needs more changes made to each
    page of content.

    Comment

    Working...