开发者

How to use Google Analytics with jQuery form

开发者 https://www.devze.com 2023-04-06 16:56 出处:网络
I\'ve a form that sends the data to the server via jQuery开发者_开发问答. Usually, with a thank you page, it\'s easy to track the submitted forms using Google Analytics but since there is no thank yo

I've a form that sends the data to the server via jQuery开发者_开发问答.

Usually, with a thank you page, it's easy to track the submitted forms using Google Analytics but since there is no thank you page (because the data is sent asynchronously), how can I track those forms submitted ?

Thanks !


You should be able to use Google Analytics' trackPageview function in the function called upon form submission.

_gaq.push(['_trackPageview', '/choose/a/path']);
0

精彩评论

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