简体   繁体   English

联系表格7 ajax目标跟踪

[英]Contact form 7 ajax goal tracking

I've setup goal tracking on my site to track a contact form submission on ajax submission, I'm pretty sure I've done the on send ok right, but I must be missing something. 我已经在我的网站上设置了目标跟踪,以跟踪ajax提交中的联系表单提交,我很确定我已经完成了on send ok,但我必须遗漏一些东西。

Here is my goal tracking: 这是我的目标跟踪:

Category: PPCForm
Action: Sent
Label: ppc
Value: =100

and here is my on sent ok: 这是我发送好的:

on_sent_ok: "ga('send' , 'event' , 'PPCForm' , 'sent ', 'ppc' , 100);"

and i've made sure i have the correct analytics code in the header... 我确保我在标题中有正确的分析代码...

    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-code-here', 'auto');
    ga('send', 'pageview');

But when ever I do a submit on the form, my goal count doesn't increase, the event increases and i can see that the event has happened and the form has been submitted but the form goal just doesn't increase. 但是,当我在表单上提交时,我的目标数量不会增加,事件增加,我可以看到事件已经发生并且表单已经提交但表单目标不会增加。

Have i done something wrong? 我做错了什么吗? I've searched past page 1 of google and not seen anyone else with this problem, all of my other forms seem to be working correctly. 我搜索了谷歌的第1页,没有看到其他人有这个问题,我的所有其他形式似乎都正常工作。 and showing goals met, but just not this one. 并显示目标,但不是这一个。

If anyone can help that would be awesome. 如果有人可以帮助那将是非常棒的。

Looks as though this is correct, however it takes a few hours for the number of goals to show - the best thing to do is to go onto live tracking and see live conversions. 看起来这是正确的,但是要显示的目标数量需要几个小时 - 最好的办法是进行实时跟踪并查看实时转换。

I was looking in the wrong place in google analytics for the results of the form. 我在谷歌分析中找错了地方的结果。 Hope this helps anyone else who might think their contact form is broken. 希望这可以帮助任何可能认为他们的联系表格被破坏的人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM