How to track a React form submission with Google Tag Manager?

Hello all,

I am using Formik for my forms and I am not able to track with Google Tag Manager when a form is submitted. I use the trigger Form ID but I think it does not work because I use React and therefore the page is not refreshed, if you know what I mean.

I know I could add Google Analytics code to track that event but I would really like to do it with Google Tag Manager to avoid adding code always I want to track something.

Thank you in advance and regards

submitted by /u/dejavits
[link] [comments]