Correct way to implement visitor tracking?

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

    #1

    Correct way to implement visitor tracking?

    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.

    thx

    Robert.


  • Robert Oschler

    #2
    Re: Correct way to implement visitor tracking?

    "Lasse Reichstein Nielsen" <lrn@hotpop.com > wrote in message
    news:k78ooxdz.f sf@hotpop.com.. .[color=blue]
    > "Robert Oschler" <no_replies@fak e_email_address .invalid> writes:
    >[color=green]
    > > I have some links that lead to external sites. I like tracking them so[/color][/color]
    I[color=blue][color=green]
    > > can see what my visitors are interested in, and therefore provide them[/color][/color]
    more[color=blue][color=green]
    > > content in those areas in the future.[/color]
    >
    > Some of us would call that "snooping on my browsing habits" and would
    > do our best to foil you scheme (or just avoid your page entirely).
    > I trust it you have a "privacy policy" that tells people that you log
    > their browsing?
    >[color=green]
    > > I don't see how server scripting + URL arguments would work without an
    > > intermediary page for off-site links.[/color]
    >
    > Not for off-site links, no. You have to go through your own links.
    > I didn't think you would try to log off-site links.
    >[color=green]
    > > Or am I misreading something?[/color]
    >
    > Nope.
    >[color=green]
    > > If I have to use the URL + "search argument" method, wouldn't I have to
    > > create an intermediary page to intercept those links and record the[/color][/color]
    tracking[color=blue][color=green]
    > > info, rather than the direct links I have now?[/color]
    >
    > For pages in your domain, if they are processed on the server, you
    > don't need a client-side redirect. You can send the new page directly,
    > and just log the extra information.
    >
    > /L
    > --
    > Lasse Reichstein Nielsen - lrn@hotpop.com
    > Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
    > 'Faith without judgement merely degrades the spirit divine.'[/color]

    =============== =========

    Lasse,
    [color=blue]
    > For pages in your domain, if they are processed on the server, you
    > don't need a client-side redirect. You can send the new page directly,
    > and just log the extra information.[/color]

    Oh yes! I wasn't thinking there, thanks.

    --

    Robert Oschler


    Comment

    Working...