Click here to get back home

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

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Help with logging stata of external link visits from my site. KiwiBrian 04-12-2005
Get Chitika Premium
Posted by KiwiBrian on April 12, 2005, 7:04 pm
Please log in for more thread options


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





Posted by Andy Dingley on April 12, 2005, 6:32 pm
Please log in for more thread options


wrote:

>As I am not a professional programmer I would appreciate any pointers,
>examples, or any type of help in achieving my objective.

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%2F%2Ffoo%2Ecom%2Fbar%2Fbat%2Ehtml%3Fp%3D1%26q%3D23

which is simply the URL encoded form of
http://foo.com/bar/bat.html?p=1&q=23

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.


Similar ThreadsPosted
Menu links in frame not working after I link to external site using IE January 18, 2008, 7:18 pm
Force CSS on external site? December 13, 2004, 6:00 pm
Re: External CSS and HTML 2.0 July 24, 2008, 11:06 pm
External Links not showing. June 24, 2005, 10:21 pm
How to publish external content in a div August 21, 2007, 7:05 pm
External style sheet a no go June 4, 2008, 3:35 am
Opening External Page in My Frameset September 22, 2004, 4:28 am
Embedding external content - impossible? May 10, 2005, 6:45 pm
Can you display content from external URL in table? August 24, 2007, 3:02 pm
How can I over-ride external CSS inside HTML file? July 11, 2004, 5:55 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap