How do you track GA events on Marketo form submit?

Anonymous
Not applicable

How do you track GA events on Marketo form submit?

Hi Community,

I was wondering if you can help answer the question of being able to edit the HTML of the form embed?

Sample CTA button on a Marketo form:

<button type="submit" class="mktoButton" onclick="ga('send', 'event', 'category', 'action', ‘label');">CTA</button>

In red is what we'd like to add...

How do you you track ga actions on form submit?

Thanks in advance!

Best,

JP

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: How do you track GA events on Marketo form submit?

Have you searched the Community?  I've posted and linked to a recipe for this a few times.

Anonymous
Not applicable

Re: How do you track GA events on Marketo form submit?

Hi there, I've done a few searches, but didn't find something that was exactly what I was looking for =\

Can you share a link to the post that you've shared?

What keywords were used?

SanfordWhiteman
Level 10 - Community Moderator

Re: How do you track GA events on Marketo form submit?

Here's one with the keywords "ga onsubmit": Google Analytics Pageview Form OnSubmit.  Be sure to note my last comment there about hitCallback.

Anonymous
Not applicable

Re: How do you track GA events on Marketo form submit?

You could also use the bullt-in functions in Google Tag Manager to track your form submissions, among many other things.

Ben

SanfordWhiteman
Level 10 - Community Moderator

Re: How do you track GA events on Marketo form submit?

Not at all. If you do not use the Marketo Forms event model, you're doing it wrong and are guaranteed to lose hits. Please don't advise approaches that ignore the event chain.