Proper Link Tracking Strategy and Exit Page viewing time method?

Discussion in 'HTML' started by Robert Oschler, Sep 4, 2003.

  1. 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.
    Robert Oschler, Sep 4, 2003
    #1
    1. Advertising

  2. 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
    Robert Oschler, Sep 5, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2FuZHk=?=

    Code to Exit Web App and Exit Internet Explorer

    =?Utf-8?B?U2FuZHk=?=, Aug 3, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    7,896
    =?Utf-8?B?U2FuZHk=?=
    Aug 5, 2005
  2. Joe Smith
    Replies:
    4
    Views:
    65,838
    sandeep1976
    Nov 8, 2006
  3. Replies:
    2
    Views:
    453
    Jeff Epler
    May 31, 2005
  4. Dr Nic
    Replies:
    0
    Views:
    89
    Dr Nic
    Sep 7, 2006
  5. Ben Amada
    Replies:
    5
    Views:
    124
    Richard Cornford
    Mar 11, 2007
Loading...

Share This Page