Google Tag Manager Form Fill Out Tracking
I’ve been trying to place a script on our Marketo landing pages so we can track form submissions. Please note: I’m a very poor developer, so I had to try researching everything I could for this information.
I found a blog post that I thought had my answer (wpromote.com/blog/setting-up-google-analytics-event-tracking-for-marketo-landing-pages/). However, it’s not working properly. Here’s the Javscript I put together:
<script language="javascript">
- window.onload=function(){
- document.getElementById('mktoForm_1341').onClick="ga(‘send’, ‘event’, { eventCategory: ‘marketo’, eventAction: ‘form-fill’, eventLavel: ‘test1’});"}
</script>
And nothing’s firing properly upon a successful form completion. Here is the landing page I’m testing this all out with: http://pages.na.industrial.panasonic.com/Grid-EYE-Landing-Page-lella-test.html
Can someone help me troubleshoot this issue? Thank you!