Redirect Contact Form 7 To A Thank You Page After Submission

Probably the most common form of event tracking or goal objective for a website is to track when a user has successfully submitted a contact form, the best way to do this is to ensure that the website is configured to redirect the browser to a Thank You page.

One of the most common plugins used in WordPress is the Contact Form 7 plugin.  There are two options with Contact Form 7 you can download and install Contact Form 7 Redirection Plugin

If you don't want to add another plugin to your WordPress setup the hard code option is very simple.  We do recommend that you work with a child theme version of your main site theme.

The code should be added to your footer.php file and goes before the closing </body> tag.  Update the link to the URL of your thank you page.

<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
    location = 'http://example.com/thank-you';
}, false );
</script>
TOP
CONTACT US
close slider
Click The Number To Call Now
0207-193-6097

Enter Details Below & Get A Free Strategy Call

Select Service: *

Name *

Phone Number *

Email *