Tracking form submissions in Google Analytics

2019-08-26 09:04发布

问题:

This is probably a simple question, but I am new to Google Analytics. I am trying to track submissions on a form on my website using the following:

<form class="email" action="" method="post" onsubmit="_gaq.push(['_trackEvent', 'form', 'submitted', 'free first exam', 'true']);">

Where would I find the data for this event in the GA dashboard? I want to know how many times this form was submitted. I can't seem to locate where in the dashboard this is stored.

回答1:

If you are tracking the form submission as an event, you would find that in your reports under Behaviour > Events. Just confirming though, your syntax is for classic Google Analytics. If you are using Universal Analytics, then the syntax would be this:

onsubmit="ga('send', 'event', 'form', 'submitted', 'free first exam');"

You may also want to read this post: Analytics.js Form onsubmit Event Tracking which gives you more information about form submissions in GA, as you may need to ensure that the event is sent before going to the conversion page. This is done using a hitCallback.