Trying to figure out the best way to add a custom fb event via GTM that tracks when a person starts to fill in a payment form. The only info for form tracking that I have found is based off of form submissions. Does anyone have any insight on how I can accomplish this?
My ideas are:
- track if the input area in the payment form is null or not
- track clicks inside of the input area
- track onkeyup events inside the input field
Thanks for the help!
To track when a user starts to fill out a form, you could have a form-level event listener that removes itself the first time it's called (so it only fires once).
Here's a small example:
If you also want to know when someone starts filling out a form but does not submit it, you could use a combination of a "first input" event like above and window.beforeunload.