Hello all,
I've reviewed a good handful of posts regarding Incorporating Google analytics Events with Marketo actions but I'm struggling to find a solution I think could be helpful for many of us.
Some good posts on GA and Marketo I've reviewed so far, which I recommend:
But here is what I'm looking to do, and the above do not seem to clearly address or answer what I'm looking for:
I'd like to track and event for "Marketo Form Load" and then an event for "Marketo form submit" within google analytics to review our web conversion rates and establish GA goals& goal flows around our Marketo embedded forms.
My main question: Is there anybody currently doing this, or is there a better way/ reason I should stop exploring this implementation?
If it seems like a decent approach to the community, I need some support making it happen.
Below are some details on my scenario and how I'm trying to track this.
Current tracking:
My goal:
This will allow me to see all the data of the web sessions leading to that form completion and set up goal paths etc on GA.
here's the JS that runs in the global form Rich text.
<script>// <![CDATA[
MktoForms2.whenReady(function(form){
form.addHiddenFields({"latestFormFillWebpagec":document.location.href});
// populates the hidden field that is critical to sending users to the appropriate url/ .pdfga('send', 'event', 'Form', 'Form Loaded');// I thought this would do the trick for tracking form-loads but GA isnt picking it up
})
// ]]>
</script>
Thanks in advance! I know this is complicated and extensive, but I think it could help a lot of folks!
Are you asking if this is a good idea (yes, it certainly seems to have application for conversion tracking) and/or are you asking for help with the code at the bottom of the page (with the comment that it is not sending the event)?
Thanks Jason,
1. Yes, I'm looking for some affirmation. Not finding the answers already had me feeling like I was missing something.
2. Yes, I'm looking for support with the code as well.
So running that code inside of rich text in an embedded form works for the hidden field value getting populated, but not for the GA event.
I think I've seen folks utilize the JS API commands at the embed/ load form snippet. Should I give it a shot there?
You have two glaring race conditions in your code that prevent it from working.
One is that you aren't guaranteeing the availability of the GA library when MktoForms.whenReady executes.
Two is that (if you added the equivalent code onSuccess) you are not ensuring that the GA hit is logged before redirecting the browser to the next page.
I have been writing up this very frequently seen situation on my blog, so if you can sit tight I'll explian it further there.
Was this ever answered? Similar to Martin, I also would like to implement something like this for our company but run up against a wall.