auto-gtm-form-abandonment
auto-gtm-form-abandonment copied to clipboard
do i need to change gtm.formSubmit
hi, thank you for the automate tracking script.
I do have one questions.
I am using contact form 7, and the form submit event is default "gtm4wp.contactForm7Submitted".
And I just want to know if i need to change the event name gtm.formSubmit in your script to my event name?
Thank you.
Also, another quick question:
In the Action, it is showing
null:your name>your email
what is the correct value of this null parameters?
Regargs,
Matthew
If You setup the built in event gtm.formSubmit in your page (and contact form can fire the trigger) you don't need to change anything.
Also, you can change 'gtm.formSubmit' for 'gtm4wp.contactForm7Submitted' in this section:
function isFormSubmitEvent(e) { return e.event === 'gtm.formSubmit' }
This null is the form name, you just need to add a name to your form to replace this null. If the contact form plugin don't let you do this, change "name" for "id" in:
var formName = form.getAttribute("name") ---- line 25 and return e['gtm.element'].name ----- line 52
this should work for you!
Sorry my english, i'm a brazilian.