Does anyone have thoughts of how to best track the different pages in a form? I'd like to use my google analytics account to track completed submissions verses incomplete. I imagine I could track my thank you page as completed. But is the thank you page track-able? Or do I need to place some custom code in the thank you page that gets passed to google?
What's the best way to track form pages in GA?
I would probably do it with custom event tracking: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
So on the thank you page body copy, you can just add some JS to tell google that a successful submission has been received, something like: _gaq.push(['_trackEvent', 'Forms', 'Submitted', '<NAME OF FORM>']);
Hope that helps.
Thanks Bart, I though I could also load in an iframe with a blank pre-titled page.
Thanks Bart, I though I could also load in an iframe with a blank pre-titled page.
Yea you could do that as well, I guess it depends on how you want the stats to show in GA.
I'm wanting to pull the stats into Squiz using a core Google Analytics API. All I'm after is a count of daily submissions so I can chart it over a 30 day period, so it doesn't really matter which way to collate that count.
I took your advice and went with the in-page code which works a treat.
<script> (function($) { $(document).ready(function() { pageTracker._trackEvent('onlineForm', 'Submitted', 'myForm'); }); })(jQuery); </script>