Ways to Simplify the Google Analytics Events for Marketo Forms

Ways to Simplify the Google Analytics Events for Marketo Forms

It would be great if in the form builder we could apply the Google Analytic tags so that the events can be tracked as they happen. On the front end it would be 3 fields we would fill in. The code could then auto generate and it would be easier for the marketeers to track/ update.

9 Comments
SanfordWhiteman
Level 10 - Community Moderator

This is very difficult to generalize, though. In order to be safe, onSuccess couldn't fire at all until the GA hitCallback had finished, which depending on what you're actually doing in the onSuccess might add totally unnecessary latency.

Eric_Salamon1
Level 6

I get what your saying. That being said for some coding is a passive skill and if the basic code could be generated based on specific structure it would save time and effort for people who don't necessary know how to get the GA tracking feature working. I managed to get the code working once, but that was a while ago and now I was trying to duplicate my work, but can't find it.

Additionally, lets say you are using a Marketo landing page and want to embed the form so it can auto fill. You won't be able to add the GA code because you would use the form object. By updating the editor to include this capability it would simplify the process for everyone. To your point there should be a selector asking if you want to use the GA tracking code as well. I personally find it to be a great double check for form fills to make sure nothing is dropped.

SanfordWhiteman
Level 10 - Community Moderator

You won't be able to add the GA code because you would use the form object.

What d'you mean here? You can use the Forms onSuccess in a Marketo LP as much as on a non-Marketo page.

Eric_Salamon1
Level 6

You can but you need to put the form as the Java script. If you are using the form object in the editor there is no place to put the onSuccess script.

SanfordWhiteman
Level 10 - Community Moderator

Not at all. Simply add your JS in a <script> tag before the end of the </body>. A named mktoForm/Form element works fine, it's an ultra-common use case.

Eric_Salamon1
Level 6

Are you talking about adding in the code object, where you can drop HTML (or java script accordingly) or are you talking about using the object where all you do is select a form?

SanfordWhiteman
Level 10 - Community Moderator

I'm talking about adding a <script> tag -- could be done in the template (most portable) or via an HTML element on the canvas.

Grégoire_Miche2
Level 10

+1 on this impossibility to generalize, all the more so as I have seen many different ways to implement events in GA, depending on the objectives defined by the SEO/Analytics agencies.

-Greg

kh-lschutte
Community Manager
Status changed to: Open Ideas