开发者

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="wh开发者_StackOverflow社区atever"/>
<input type="submit" name="Send"/>
</form>

Thanks!


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


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.


Confirm that you have placed the Google Analytics code in the <head> of your page.


This seems to be working fine for me in IE6+.

<form id="booking-form" action="https://myurl.com" method="get" onsubmit="_gaq.push(['_linkByPost', this, true]);">
  <input type="text" name="whatever"/>
  <input type="submit" name="Send"/>
</form>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜