Sumbission of marketo forms showing as events in GA, preferably using GTM

Anonymous
Not applicable
I am just wanting to fire an event to GA on the submission of a form. What is the best way to do this?
If possible i would like to use Google Tag Manager to do it.
Tags (1)
24 REPLIES 24
SanfordWhiteman
Level 10 - Community Moderator
@Max S I would not advise using a dumb event listener that may think any submit button click == successful submit.

The only way to get a proper accounting of successful submits that pass validation and reach the Marketo servers is to use the supplied onSuccess event.
Anonymous
Not applicable
Hey James,

With Google Tag Manager, you can setup listeners that tracks Form success on any page GTM is installed on. You can then use that as an event in Google Analytics, or any of the other tags installed.

https://support.google.com/tagmanager/answer/3415369?hl=en
SanfordWhiteman
Level 10 - Community Moderator
I'd do any followup calls in the onSuccess handler because that way you are logging a successful form post, rather than just an attempted one as in onSubmit (not that failure is common, but it's the proper way).
Anonymous
Not applicable
I should also mention, we are using a marketo form in a lightbox over a non marketo landing page