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