We’re big fans of Google Analytics here at Crescent Digital and here’s how we manage to track form submissions from Contact Form 7 in Google Analytics as events, which we add as goals.
This means that we can say that for example, ever visitor who sends a message is worth £200. We track this as an event which we add as a goal in Google Analytics. This allows us to be much more efficient with customer acquisition. This may show us that 2% of visitors send us messages which means that 100 visitors are worth £400 or 1 visitor is worth £4. If running PPC campaigns, these are important metrics.
This is what you need to do:
- Make sure that you have Google Universal Analytics set-up for your site and you are using Contact Form.
- Edit the contact form you are using and add the following code to the Additional Settings field:
on_sent_ok: “ga(‘send’, ‘event’, ‘Contact Form’, ‘sent’);”
- In Google Analytics, select Admin -> Goals -> New Goal and set up the fields exactly as shown in the screenshot:
(only 2 fields are mandatory, Category & Action. Set them to ‘Contact Form’ and ‘sent’ respectively.
It will take 24hrs+ to start logging / verifying if you have just set it up.
- After this has been running for 24hrs , in Google Analytics, navigate to Behavior -> Events, where you should see logging happening from the contact form as below:
- Event Tracking – Web Tracking (analytics.js) https://developers.google.com/analytics/devguides/collection/analyticsjs/events
- Contact Form 7 http://contactform7.com