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:
Code Snippets to follow and expand on this guide to setting up CF7 with GA7 and GTM.