Sending Analytics Page View or Event in Contact Form 7

As mentioned in my other post about Google AdWords and Contact Form 7: Google AdWords Conversion Tracking in Contact Form 7, Contact Form 7 does not create a thank you page after form submission. But we still want to track it in Analytics.

There are some ways to track form submission by using:

  1. Google Analytics – Event
  2. Google Analytics – Page Views

Tracking using Google Analytics Event

To do this, you have to go to the contact form and open Additional Settings tab and the following snippet.

You can customize the Analytics Event snippet according to your requirement. For more documentation, read Google Analytics for Web – Event Tracking.

Your Additional Settings tab should look like below:

contact-form-7-additional-settings-analytics-pageview

 

Please note that you have to use ga.js instead of the old analytics file.

If you are using _gaq, you can read tutorial by Contact Form 7.

 

Tracking using Google Analytics Page View

Like before, go to a contact form and open Additional Settings tab and paste the following snippet.

The snippet will call a fake thank you page with URL (“/thank-you”). This way you can track your contact form performance in Behavior Flow in Google Analytics.

Your Additional Settings tab should look like below:

contact-form-7-additional-settings-analytics-pageview

 

That’s it!

 

Leave a reply:

Your email address will not be published.