Tracking in Universal Analytics - Contact form 7

为君一笑 提交于 2019-12-12 02:59:35

问题


I have contact form 7 on a site. With classic analytics I had this in additional settings..

    on_sent_ok: "_gaq.push(['_trackPageview', '/goals/enquiry-sent']);"

And it tracked fine as a destination goal. As soon as I updated to Universal analytics (including the demographics tracking), I then updated the code to:

    on_sent_ok: "ga('send', 'event', 'category', 'action', 'label');"

and also tried

    on_sent_ok: "ga('send', 'pageview', '/your/url');"

and I just can't get either of them to track.

Any ideas would be much appreciated!!

Thanks,


回答1:


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

This works for me. Replace "Contact Form" with something you want.



来源:https://stackoverflow.com/questions/25166025/tracking-in-universal-analytics-contact-form-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!