document.addEventListener( "wpcf7submit", function( event ) { var contactFormsIds = [10247, 10819]; if ( contactFormsIds.includes( event.detail.contactFormId ) ) { console.log( "The contact form is contact." ); location = "https://dev.snel.com/contact-form-confirmation/"; } }, false );