POPUPS AFTER SUBMISION
Create contact form.
Install plugin: Popups โ WordPress Popup - https://wordpress.org/plugins/popups/
Create popup. In popup options, Change RULES to Page Type - is not equal to - All Pages Trigger Action - Manual Triggering
Add code to functions.php:
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 ) { // Change 123 to the ID of the form SPU.show( 143 ); // change 143 to the ID of the popup SPU.hide( 120 ); // hide another popup SPU.track( 143, false );//track an impression , if you set to true you track a conversion } }, false ); </script>