Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Proper Link Tracking Strategy and Exit Page viewing time method?

Reply
Thread Tools

Proper Link Tracking Strategy and Exit Page viewing time method?

 
 
Robert Oschler
Guest
Posts: n/a
 
      09-04-2003
This is my current strategy for tracking hyperlink clicking by a site
visitor (Internet Explorer example):

Using Javascript I:

Attach an event to the document "onclick" handler.
When a click occurs, the Javascript "onclick" event hander I assigned,
checks to see if the event srcElement (or its parent in the case of a "font"
element) is a hyperlink (tagName = "A" or "a").
If so, I build a URL with the search arguments set to the information I wish
to record.
I find a specific IMG element on the page and set it's SRC property to the
URL I built.

If the hyperlink opens a new window using the "_blank" target, this works
flawlessly. If however a new window is not opened, the transaction is lost.

It's as if the IMG element SRC property setting never actually happens.

Is there a way to make this work? Or do I have to create tracking codes for
each hyperlink and change all the URL's to go to a pre-emptive document that
records the click, before showing the desired web page.

Also, is there any way to track how long a visitor leaving your site was on
a the last page they were viewing? I know that most tracking packages can
track a visitor as they move around your site, but how about the page right
before they leave? I've been told that you can do it in the
"onbeforeunload" or "beforeunload" event handlers because any HTTP requests
made during the event handlers will not be processed by the browser. Tests
I have run seems to bear this out (or at least it's _very_ erratic). Is
there a way to do this kind of exit page view tracking?


thx

Robert.


 
Reply With Quote
 
 
 
 
Robert Oschler
Guest
Posts: n/a
 
      09-04-2003
Typo correction:

"I've been told that you can do it in the..."

should be

"I've been told that you can't do it in the..." (can't not can)

thx



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exit code of a batch (using exit /B) Joe Smith Java 4 11-08-2006 12:25 PM
Code to Exit Web App and Exit Internet Explorer =?Utf-8?B?U2FuZHk=?= ASP .Net 7 08-05-2005 01:55 AM
Tracking Someone Tracking Me Edw. Peach Computer Security 4 07-07-2005 05:50 PM
exit after process exit ajikoe@gmail.com Python 2 05-31-2005 08:11 PM
What's the difference of return 0; exit(0);exit(1) QQ C Programming 5 05-10-2005 10:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57