January 21, 2022

Contact Form 7 with Google Analytics 4 Integration using Tag Manager for Event Tracking [2022 Guide]

Contact Form 7 (CF7) is a popular and customizable plugin to utilize within WordPress to create all sorts of contact forms and email opt-in forms. We utilize it for intakes, lead generation, and email opt-ins, in addition to Google Analytics 4 (GA4) and Google Tag Manager (GTM) to track our website and marketing performance.

If you already use Google Analytics to monitor website traffic, you also may want to track your contact form submissions as well. If you use Google Analytics Universal, stop right here, and make sure you have the new version, Google Analytics 4 implemented. This is critical because this article does not cover the outdated version of Google Analytics, and Google has mentioned on their developer blog that the old version will not be updated with new features at all so it is borderline obsolete (go here if you use the old version). In addition, we will also be utilizing Google Tag Manager.

In this short guide, we will review how to set up Contact Form 7 to do event tracking with the new Google Analytics 4, along with Google Tag Manager. With the prerequisite that you already have your CF7 forms, GA4, and Tag Manager set up on your website, we will directly move forward with:

  • Using Data Layers & Events to Configure Google Analytics 4 and Contact Form 7
  • Setting up a 'listener' tag and an associated trigger in Google Tag Manager (to listen to when successful forms are submitted using a bit of JavaScript you can copy/paste to utilize the Data Layers)

Code Snippets to follow and expand on this guide to setting up CF7 with GA7 and GTM.

More SEO Content Like This

Discover the latest news, top SEO strategies from real professionals, articles, guides & more exclusive content from Running SEO
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram