HelpForm ToolsHow to track Contact Form 7 submissions
Form Tools

How to track Contact Form 7 submissions

Track Contact Form 7 submissions by redirecting to a thank you page after a successful submission.

Contact Form 7 doesn't include a built-in redirect, but you can add one with a few lines of JavaScript or a free plugin.

Step 1: Create a thank you page

Create a page in WordPress at yourwebsite.com/thank-you and install the Lead Recorder snippet site-wide.

Step 2: Add the redirect

Add this JavaScript to your site. It runs after CF7 confirms the form was sent and redirects the visitor to your thank you page.

document.addEventListener('wpcf7mailsent', function(event) {
  window.location = '/thank-you';
}, false);

You can add this using the Insert Headers and Footers plugin (paste it in the Scripts in Footer field) or in your theme's functions.php.

Alternative: CF7 Redirect plugin

  1. 1Install the Contact Form 7 Success Page Redirects plugin from the WordPress plugin directory.
  2. 2Edit your contact form in CF7.
  3. 3Use the plugin's redirect field to enter your thank you page URL.

Step 3: Test

Submit your contact form. You should be redirected to the thank you page and see a new lead appear in the Lead Recorder dashboard.

Was this helpful?Send feedback