Jump to content

Google Analytics track form submissions using jQuery


foevah

Recommended Posts

I have added the following jQuery after the google analytics code:

$(document).ready(function() {
$("#pre-book").attr("onSubmit", "pageTracker._trackEvent('Signup Forms','AMF Signup','Newsletter',2.0);");
});

 

this picks up the form with id pre-book and it adds the onSubmit code to it:

onsubmit="pageTracker._trackEvent('Signup Forms','AMF Signup','Newsletter',2.0);"

 

i did this yesterday and submitted my details into the form but when I look in google analytics event tracking overview this hasn't been detected?

 

does anyone know what I am doing wrong?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.