Tracking in Universal Analytics - Contact form 7

2019-09-10 13:05发布

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条回答
疯言疯语
2楼-- · 2019-09-10 13:22
on_sent_ok: "ga('send', 'event', 'Contact Form', 'sent');"

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

查看更多
登录 后发表回答