Using onsubmit or onclick with Google Analytics
-
Hello,
I set up Google Analytics event tracking on the FSCF “submit” button by adding code to “Submit button input attributes” (FS Contact options > Advanced).
I have two questions about this:
– When using FSCF, is it better to add event tracking to the onsubmit or onclick attribute?
– If I use onsubmit, is it necessary to use FSCF’s redirect delay in order to make sure the Analytics JavaScript fires & reaches Google before the page redirects? Would this be necessary if I used onclick?
I would place the event tracking code into onclick, but I don’t want to overwrite the code that FSCF automatically puts there, in case that code is altered in a future FSCF release.
- The topic ‘Using onsubmit or onclick with Google Analytics’ is closed to new replies.