Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having problems with tagmanager #2084

Open
lennonpuype opened this issue Oct 9, 2024 · 3 comments
Open

Having problems with tagmanager #2084

lennonpuype opened this issue Oct 9, 2024 · 3 comments
Labels

Comments

@lennonpuype
Copy link

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

@engram-design
Copy link
Member

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?

@lennonpuype
Copy link
Author

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 😅

@engram-design
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants