Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics and IE Browser

Anyone can explain me why below works in Firefox but not in IE.

function bookingSubmit(myform) {
 _gaq.push(['_linkByPost', myform, true]);
 return true;
}

<form id="booking-form" action="https://myurl.com" method="get" onsubmit="return bookingSubmit(this);">
<input type="text" name="whatever"/>
<input type="submit" name="Send"/>
</form>

Thanks!

like image 747
Matias Avatar asked Jul 20 '10 14:07

Matias


2 Answers

Might be a silly question, but where is the GA code that defines _gaq? Head, or body of your document?

like image 187
sevenseacat Avatar answered Nov 12 '22 12:11

sevenseacat


I'm not 100% certain, but I think there is a bug affecting this method in IE when you pass in an argument to append the cookie values to the hash portion of a URI.

like image 42
Gavin Doolan Avatar answered Nov 12 '22 14:11

Gavin Doolan