I have a contact form that is submitted via ajax and upon a successful submission, a thank you/success message is displayed.
Additionally, I've set up a goal (Goal Completion URL) in my Google Analytics account for visits to a thank you page.
This page does not exist.
Any thoughts/suggestions on how I can set up tracking successful form submissions via this method?
Step 1: First, log in to your account and select the website or property on which you wish to track form submissions. Step 2: Click on Admin. Step 3: After that, navigate to Goals, which is located under the View column. Step 4: Click on the + New Goal button.
How to Track Form Data in Google Analytics. Once you've enabled form tracking, you can review form activity and data in your Google Analytics account. Google Analytics can record anything from page views to button clicks. Formstack automatically creates these events on your form when you enable the plugin.
You can use virtual pageviews. For each step of the process, add a call to
_gaq.push(['_trackPageview', '/ajax-contactForm/PAGE-or-STEP-NAME.html']);
This will register as a pageview and can be used as a step in the goal.
See virtual pageviews in the GA docs.
Or, to set it up as an event goal as Eduardo suggested, see The New Google Analytics: Events Goals
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With