verbb/formie

Having problems with tagmanager

Opened this issue · 3 comments

Question

Hi, There is something that triggers my tag in tagmanager to register multiple 'form_start' and 'form_submit' when submitting a form wether it is a success of failed submit. What does trigger these events to happen?

I am kinda confused to where to look for. Could there be anything I am overseeing?
It is just a pretty basic form that uses {{ craft.formie.renderForm(form, formSettings) }} to render the form

See this, when I submit you see in the tagmanager that it is triggering multiple times. A marketing person at out client said this was triggering wrong results in their Meta pixel thing that is connected.

Screen.Recording.2024-10-09.at.14.13.36.mov

Could you suggest me anything about this?

Additional context

No response

Formie doesn't emit those events out of the box, do you have any settings in your form for this? You can find those in the form builder, by editing a button at the bottom of each page. The Advanced tab has a "Enable JavaScript Events" setting.

What Formie version are you on?

I tried removing all connected JS for forms that I wrote and also all form settings that include the load of some JS. The "Enable JavaScript Events" is turned off but it is still happening like that. I am on version 2.1.28

In the networktab there are effectively 4 requests that are being sent:
2 for the form_start
2 for the form_submit

Screen.Recording.2024-10-10.at.09.23.27.mov

So there is nothing that can be formie related for this problem?
I have no clue what could be the reason for this to happen, I'm not really into tagmanager to know how this all works 😅

So all I can say is that there's no in-build events fired by Formie for form_start or form_submit, so tracking down where they're being fired from is a good start. That should lead us to at least start figuring out why they are triggering twice when they shouldn't.

Seems strange the events are still firing with your JS disabled. Is there anywhere else that it could be being triggered from in your project?