如何为Ajax表单提交设置Google Analytics(分析)目标 [英] How to set up Google Analytics Goal for ajax form submissions
问题描述
我有一个通过ajax提交的联系表,提交成功后,会显示感谢/成功消息.
I have a contact form that is submitted via ajax and upon a successful submission, a thank you/success message is displayed.
此外,我还在Google Analytics(分析)帐户中设置了一个目标(目标完成网址),以访问谢谢"页面.
Additionally, I've set up a goal (Goal Completion URL) in my Google Analytics account for visits to a thank you page.
此页面不存在.
关于如何通过这种方法设置跟踪成功的表单提交的任何想法/建议?
Any thoughts/suggestions on how I can set up tracking successful form submissions via this method?
推荐答案
您可以使用虚拟综合浏览量.对于该过程的每个步骤,请添加一个呼叫
You can use virtual pageviews. For each step of the process, add a call to
_gaq.push(['_trackPageview', '/ajax-contactForm/PAGE-or-STEP-NAME.html']);
这将注册为浏览量,并可用作目标的一步.
This will register as a pageview and can be used as a step in the goal.
请参阅 GA文档中的虚拟综合浏览量.
或者,按照爱德华多(Eduardo)的建议,将其设置为活动目标,请参见新的Google Analytics(分析):活动目标
Or, to set it up as an event goal as Eduardo suggested, see The New Google Analytics: Events Goals
这篇关于如何为Ajax表单提交设置Google Analytics(分析)目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!