document.addEventListener( 'wpcf7mailsent', function( event ) { alert('Formulari enviat correctament'); }, false );