I'm trying to track when a user exits the page using the code below but it doesn't seem to be firing the event:
function storeData(){
_gaq.push(['_trackEvent', 'Application Form', 'exit-form_application_', 4, '', false]);
}
$(window).on('unload',storeData);
I've also tried other ways such as the method shown here but I still can't get it to fire. I have other events which are firing successfully e.g when a form field is completed/skipped but can't seem to get this one to work.
Any idea?