How to track Webform module submissions as goals in Google Analytics
I use the webform module on almost all of the Drupal sites that I develop. It may not be the most elegant solution (although you can make it look almost any way you want with a bit of theming), it makes creating contact forms dead simple.
With every form I create I also want to track those submissing using goals in Google Analytics. It's pretty important to track everything you can on your site so you can drill down into that information if you need to at a later date. Most people are happy just to look at the daily visits and maybe even go as far as the traffic sources in Google Analytics, but this usually doesn't provide much actionable information.
To setup a goal in Analytics, click Edit next to the profile and click Edit next to the goal you would like to setup (G1 if you don't have any already setup).
If you're using the Webform module, the goal URL is going to be http://www.yourdomain.com/node/<nid>/done where <nid> is the node id for your webform. You can also find this out by doing a test submission and copying the URL, but make sure you leave off the ?side=X otherwise it won't work.
Another thing that you might want to do with the webform module is change the path of the thank you page to be something a little more user friendly. To do this, goto Site Building > URL Aliases > Add Alias. Enter the path of the current thank you page (node/<nid>/done) and the path you want to use (eg contact/thanks).


Comments
Post new comment