6

I have a Google Tag Manger container that contains a Facebook Pixel injector tag and a regular form submission tag (with standard form submission trigger). However, when the submit button of a form is clicked (resulting in invalidation thus no submission), the gtm.formSubmit event is fired with the elementUrl as 'https://www.facebook.com/tr/'. This event is captured by Tag Manager's standard Form Submission trigger, thus resulting in a false-positive form submission.

I had to confirm the Pixel as the cause by pausing the injector tag and testing. Of course the tag was not triggered.

I don't understand why the Pixel is firing this event on submit button click.

I would normally circumvent the issue by submitting the form via AJAX with a custom event name, but the nature of the site requires the forms navigate the user to a separate page. If I really can't prevent the Pixel from firing the event, I suppose I could use JavaScript to post via AJAX and manually navigate to a markup-stored URL, but I'd rather avoid that.

2 Answers 2

4

I just tried setting up the default form submission trigger in a client's GMB container and was having the same problem. After a little digging around in Preview mode, I came up with the following solution:

Create a second Form Submission trigger and select "Some Forms" under "This trigger fires on". Then set it to fire on submissions where the Click URL contains "facebook". This sounds counter-intuitive at first, but you'll need to use this trigger as an 'Exception' on the Tag you do want to fire. Screenshot below (notice I used RegEx to also block Snapchat since that one is also triggering the gtm.formSubmit event. Blocking trigger set up

This works because if you look at the 'Variables' tab in Preview mode on the gtm.formSubmit event, it shows https://www.facebook.com/tr/ as the Click URL.

Click URL

Hopefully this makes sense and solves your issue as well!

1

I was having the same issue, hopefully, I came here and saw the Casey's answer that makes me understand the error and how to solve it. But instead of creating a second form, I preferred to have only one trigger. So I followed the first steps that Casey showed us and setup the following inside "Some Forms" radio button:

Click URL | does not equal | https://www.facebook.com/tr/

This way my trigger is activated only in URLs that's not match the Facebook URL bug. And gladly this will solve the issue with only one trigger instead of two.

Not the answer you're looking for? Browse other questions tagged or ask your own question.