On a single-page website with 3 forms (contact form 7 from wordpress), when one of these forms is submitted, I send a data layer event to Google Tag Manager:
on_sent_ok: "dataLayer.push({'event':'formSubmit'});"
In GTM i created a custom event trigger which fires when it gets the event "formSubmit". To sepearte the 3 forms from each other and use a sepearte tag for every form i filter the trigger with the id of the form:
Now the event trigger cant trigger because gtm.formSubmit is not fireing. I just get the formSubmit event and no gtm.FormSubmit.
Any idea how i can get a separate trigger for all the 3 forms?
To get a different trigger for every form i now use a different dataLayer.push event for all of these forms:
So now i dont need to filter the form id in GTM i can just trigger when one of these events is firing. This works perfectly, the event is firing when contact form 7 is submited correctly and its not triggering when the submit button is clicked.