简体   繁体   English

联络表格7-Google Analytics(分析)追踪

[英]Contact form 7 - Google Analytics Tracking

I`m trying to track submitted contact forms in google analytics with contact form 7. I tried the following: 我正在尝试使用联系表单7跟踪Google Analytics(分析)中提交的联系表单。我尝试了以下操作:

  1. I placed the code 我放置了代码

    on_sent_ok: "ga('send', 'event', 'Contact Form', 'submit');"

in the additional settings. 在其他设置中。 Does not work. 不起作用。 This method is supported until the end of 2017. The new method is "DOM events", so... 该方法受支持到2017年底。新方法是“ DOM事件”,因此...

  1. ...I tried it with DOM events. ...我尝试了DOM事件。 I placed the code 我放置了代码

    <script> document.addEventListener( 'wpcf7mailsent', function( event ) { ga('send', 'event', 'Contact Form', 'submit'); }, false ); </script>

in the head of the template. 在模板的开头。 Also, does not work. 另外,不起作用。

  1. I also tried a WordPress plugin "Contact Form 7 Google Analytics" and this doesn´t work either. 我还尝试了一个WordPress插件“ Contact Form 7 Google Analytics”,但这也不起作用。 No matter which way I tried: The site doesn´t execute the line: 无论我尝试哪种方式:网站都不会执行该行:

    ga('send', 'event', 'Contact Form', 'submit');

No event appears in the live view of google analytics. 谷歌分析的实时视图中未显示任何事件。 I had this problem a few months ago ( Wordpress and Google Analytics Events ) but this is a new site and i think it`s the same problem. 几个月前我遇到了这个问题( Wordpress和Google Analytics(分析)活动 ),但这是一个新站点,我认为这是同样的问题。 There must be reason? 一定有原因吗?

You can find the new site I am talking about here . 您可以在这里找到我正在谈论的新站点。

I am really happy about any help. 我真的很高兴有任何帮助。 Thank you! 谢谢!

Edit: New hint: After submitting a form there is no "thank you message". 编辑:新提示:提交表单后,没有“谢谢您的消息”。 Nothing happens an the url changes to http://page.xyz/kontakt/#wpcf7-f4-p18-o1 I think this is not normal? 没有任何反应,网址更改为http://page.xyz/kontakt/#wpcf7-f4-p18-o1我认为这不正常吗?

How did you set up event in google analytics? 您是如何在Google Analytics(分析)中设置活动的? Maybe you need to pass a value in ga function. 也许您需要在ga函数中传递一个值。

在此处输入图片说明

If you set a value to 0 here and its "Greater than" selected, then you have to pass a value of '1' in ga send function. 如果您在此处将值设置为0并选择了“大于”,则必须在ga send函数中传递值“ 1”。

You might want to try the Contact Form 7 Google Analytics Intelligence plugin, https://wordpress.org/plugins/cf7-intelligence . 您可能要尝试使用Contact Form 7 Google Analytics Intelligence插件https://wordpress.org/plugins/cf7-intelligence It automates the whole process including goal creation. 它使包括目标创建在内的整个过程自动化。

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

相关问题 Google Analytics(分析)事件跟踪不起作用。 跟踪联系表单7和动态生成的元素 - Google analytics event tracking not working. Tracking Contact form 7 and dynamically generated element 跟踪Google Analytics(分析)中的多个联系表 - Tracking multiple contact forms in Google analytics 在Google Analytics(分析)中跟踪表单提交 - Tracking form submissions in Google Analytics 当我有一个或多个选中的复选按钮时,如何在 Contact Form 7 上启用谷歌分析跟踪? - How can I enable google analytics tracking on Contact Form 7 when I have one or more checked checkbuttons? 如何在没有单独的感谢页面的情况下设置联系表单的Google Analytics(分析)目标跟踪? - How to set up Google Analytics goal tracking of a contact form with no separate thank you page? 谷歌分析与多个联系人 forms 7 转换跟踪问题 - Google analytics with multiple contact forms 7 conversion tracking problem Google Analytics(分析):跟踪灯箱表单的放弃情况和目标 - Google Analytics: Tracking abandonment and goals for lightbox form 表单字段的Google Universal Analytics事件跟踪 - Google Universal Analytics event tracking for form fields 谷歌分析在模态内对ajax表单的跟踪 - Google analytics tracking on ajax form within a modal Google Analytics(分析)事件跟踪-提交表单时的复选框 - Google Analytics Event Tracking - Checkboxes on Form Submission
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM