-
- 932 Posts
You could always use the FormItSaveForm hook if you wanted to record the form submissions and keep track of the count per form.
-
- 463 Posts
Thanks, but I already save the form data, I just want to track it so our Marketing Dept can measure their click throughs and whatever else they are doing with the data.
-
- 118 Posts
You can create a goal in Analytics and register a form submission with a JavaScript call.
You can initiate the JavaScript call sheet manually on successful form validation or with a Form of hook.
No code examples to hand as using phone but felt if you want to see this on a contact form from one of my sites.
Looks like you almost have all the pieces already. Instead of listening to wpcf7mailsent, listen to submit and add the event listener to the form, instead of document. That should do the trick to log it in to Google analytics events.
-
- 463 Posts
Sorry been working on a totally separate project and forgot to follow up.
Thanks Mark I will look into that.