on_sent_ok Is Deprecated replacement options
-
Any suggestions on this?
I note that on_sent_ok Is Deprecated and will disappear by 2017 end?
I use it on a form completion to activate a thank you page on Additionall settings.THIS.
on_sent_ok: “location = ‘https://mysite.comm/contact-and-enquiry/thank-you’;”The contact form 7 offers an example replacement for a Google event track but nothing like my page redirect. See below.
add_action( ‘wp_footer’, ‘mycustom_wp_footer’ );
function mycustom_wp_footer() {
?>
<script type=”text/javascript”>
document.addEventListener( ‘wpcf7mailsent’, function( event ) {
if ( ‘123’ == event.detail.contactFormId ) {
ga( ‘send’, ‘event’, ‘Contact Form’, ‘submit’ );
}
}, false );
</script>
<?php
}Can anyone suggest a replacement set of code to redirect to the thank you page the above code is not much help. Thanks.
McP.
- The topic ‘on_sent_ok Is Deprecated replacement options’ is closed to new replies.