Google Analytics Tracking for Contact Form 7

The Controls for Contact Form 7 plugin adds a toggle to each form settings to enable automatic event tracking with Google Analytics and Matomo (formerly Piwiki) without writing a single line of code or changing your theme files.

The following Google Analytics integrations are supported by default:

  • ga()
  • _gaq.push() and
  • dataLayer.push()

Form Settings

Form controls with analytics tracking for Contact Form 7
Form settings with analytics tracking toggle.

It triggers the following events:

Form Submitted

  • Event Category: “Contact Form”
  • Event Action: “Submit”
  • Event Title: “Your Form Title”

Form Mail Sent

  • Event Category: “Contact Form”
  • Event Action: “Sent”
  • Event Title: “Your Form Title”

Form Mail Failed

  • Event Category: “Contact Form”
  • Event Action: “Error”
  • Event Title: “Your Form Title”

Form Considered Spam

  • Event Category: “Contact Form”
  • Event Action: “Spam”
  • Event Title: “Your Form Title”