Forum Moderators: open

Message Too Old, No Replies

Tracking submission of Post form

How can I do this with Javascript?

         

DonQ

1:31 am on Oct 15, 2005 (gmt 0)

10+ Year Member



Posted this query under tracking and logging, and the only answer I got was that it is possible with Javascript.

I want to track the submission of a form (Post) to a payment processor, a simple entry in the logs everytime the specific submit button is clicked will do. Trying to establish cart abandonment rates.

Could anyone tell me where I could find a simple script for this? Been searching for a while and can't seem to find anything. Don't want a complete tracking service.

Any help will be greatly appreciated.

Bernard Marx

3:25 pm on Oct 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Read through this recent thread. The setup you need will be the same (although the naming will be different).

Trigger the logging by including an onclick on your submit button:

<button type="submit" value="submit" onclick="logFunction()">

bsterz

3:09 am on Oct 16, 2005 (gmt 0)

10+ Year Member



And LogFunction might look like:

function LogFunction(){
var submitplchldr = new Image();
submitplchldr = '/images/tracksubmit.gif';
}

OR if you want to do something specific with the event:
function LogFunction(){
var submitplchldr = new Image();
submitplchldr = '/images/tracksubmit.php';
}

Bernard Marx

7:02 pm on Oct 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ME: Read through this recent thread

What recent thread?

[webmasterworld.com...]

Sorry!

DonQ

11:02 am on Oct 18, 2005 (gmt 0)

10+ Year Member



Thanks a lot guys. I will go do some testing...