Re: [Proto-Scripty] can Request be used to track navigation clicks asynchronously?

2010-02-17 Thread Daff

Hi Mark,

Just discussing this with a collogue and we came up with another idea, 
still using asynch AJAX, but place it in the receiving page, then all 
the calling page has to do is place the appropriate click event into a 
cookie that is persisted across the page transfer. The new page then 
checks to see if the cookie is present and immediately (probably as part 
of the onload) fires the asynch AJAX, and deletes the cookie.


Just a thought.

Regards.

daff
SOFTWARE ENGINEER

andrew 'daff' niles | spider tracks ltd |  117a the square
po box 5203 | palmerston north 4441 | new zealand
P: +64 6 353 3395 | M: +64 21 515 548 
E: d...@spidertracks.co.nz mailto:d...@spidertracks.co.nz 
W: www.spidertracks.com http://www.spidertracks.com



Mark Palmer wrote:

Thanks for the thoughtful suggestions...

@djmangus - I already have this working synchronously, but I'm trying 
to do a/b testing on things like pricing and conversion rates, and the 
extra delay does affect abandonment rates, especially over slow/dialup 
connections.



Jeff C - I've looked at google analytics,which did add support for 
true async tracking.
GA seems too heavy-weight for what I want to do, at least in the sense 
that there's a significant learning curve.  


more specifically, what I tried doing was this, in the tracking function

function track (tolink,xparams)
{
new Ajax.Request ( 
serverurl, 
{ 
method: 'get', 
parameters:  xparms,

onLoaded: function(ok) { location.href = tolink;   }
}  
);

}

The above triggers the actual navigation in the completion callback.
If I use onLoaded, it behaves synchronously and will wait for the 
server to reply.

If I use onLoading, the data doesn't get sent at all..

From the docs, I'd expect onLoaded to do the trick as it gets called 
|onLoaded| (maps on Request sent)


What I need is something like this, which will trigger the navigation 
after the data is sent but not wait for the server to respond...


thanks

 



On Tue, Feb 16, 2010 at 6:47 AM, Jeff C car...@gmail.com 
mailto:car...@gmail.com wrote:


@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 d.man...@gmail.com
mailto:d.man...@gmail.com 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
manfmnantuc...@gmail.com mailto:manfmnantuc...@gmail.com
 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 http://script.aculo.us
group.
 To post to this group, send email to
prototype-scriptaculous@googlegroups.com
mailto:prototype-scriptaculous@googlegroups.com
 .
 To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com

Re: [Proto-Scripty] can Request be used to track navigation clicks asynchronously?

2010-02-16 Thread DJ Mangus
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 manfmnantuc...@gmail.com
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 prototype-scriptaculous@googlegroups.com
 .
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com
 .
 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 prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] can Request be used to track navigation clicks asynchronously?

2010-02-16 Thread Jeff C
@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 d.man...@gmail.com 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 manfmnantuc...@gmail.com
 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 prototype-scriptaculous@googlegroups.com
 .
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com
 .
 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 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 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 prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] can Request be used to track navigation clicks asynchronously?

2010-02-16 Thread Mark Palmer
Thanks for the thoughtful suggestions...

@djmangus - I already have this working synchronously, but I'm trying to do
a/b testing on things like pricing and conversion rates, and the extra delay
does affect abandonment rates, especially over slow/dialup connections.


Jeff C - I've looked at google analytics,which did add support for true
async tracking.
GA seems too heavy-weight for what I want to do, at least in the sense that
there's a significant learning curve.

more specifically, what I tried doing was this, in the tracking function

function track (tolink,xparams)
{
new Ajax.Request (
serverurl,
{
method: 'get',
parameters:  xparms,
onLoaded: function(ok) { location.href = tolink;   }
}
);
}

The above triggers the actual navigation in the completion callback.
If I use onLoaded, it behaves synchronously and will wait for the server to
reply.
If I use onLoading, the data doesn't get sent at all..

From the docs, I'd expect onLoaded to do the trick as it gets called
onLoaded (maps on Request sent)

What I need is something like this, which will trigger the navigation after
the data is sent but not wait for the server to respond...

thanks




On Tue, Feb 16, 2010 at 6:47 AM, Jeff C car...@gmail.com wrote:

 @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 d.man...@gmail.com 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 manfmnantuc...@gmail.com
  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
 prototype-scriptaculous@googlegroups.com
  .
  To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  .
  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
 prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
  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
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 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