@DJ Mangus: That would have been my simple solution too. Capture the click event, do my ajax mojo, and then forward them. But like you mentioned, it will most likely affect the user experience.
@manfmnantucket: Have you ever thought about using google analytics? It offers the generic visitor info (how many visits, from where, keywords, etc). But they also have event tracking[1][2]. Once the page is loaded you can track simple events. For example, when a user stars and stops a flash movie. I use it to track when someone rates a picture in my photo gallery, track what icons are clicked on my google maps, and track all the clicks on outgoing links from my site. It has been very useful so far. Just a thought. [1] http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html [2] http://code.google.com/apis/analytics/docs/tracking/eventTrackerWrappers.html - J e f f C o n k l i n - - AOL IM - a14piece - http://www.getoutsidenj.com - http://www.carabs.com - J e f f C o n k l i n - - AOL IM - a14piece - http://www.getoutsidenj.com - http://www.carabs.com On Tue, Feb 16, 2010 at 3:27 AM, DJ Mangus <[email protected]> wrote: > Don't see why not though it'd slow down the user experience a bit (not > necessarily a good thing). > > Have the onclick block, send data to server, server responds, then in > the Ajax callback send user to the destination via window.location > > Note: I haven't done this, it's just an off the top of my head > suggestion. > > Sent from my phone so please pardon any spelling errors. > > On Feb 15, 2010, at 8:28 PM, manfmnantucket <[email protected]> > wrote: > >> Hi all, >> >> I'm trying to use Prototype to do asynchronous click-tracking... that >> is, to >> log a server record each time a user clicks a link to navigate to >> another page. >> >> I've set the link onclick up to call a simple function which makes an >> Ajax.Request to send the data >> without blocking. >> >> However usually the server never gets the data, I think because the >> current page Unloads before >> Request can complete. >> >> What's the correct way to accomplish this? Is there a way to make page >> Unload wait until the >> Request is sent (but not until the server responds)?? >> >> thanks! >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Prototype & script.aculo.us" group. >> To post to this group, send email to [email protected] >> . >> To unsubscribe from this group, send email to >> [email protected] >> . >> For more options, visit this group at >> http://groups.google.com/group/prototype-scriptaculous?hl=en >> . >> > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
