Want "leaving site" Pop-Up when visitor selects certain links to outside URLs

Greetings!

Thanks in advance for your help ... trying to get a site to present a "You are Leaving our Site" pop-up disclaimer when visitor chooses to visit certain specific URL links that lead away from our site.

Read the following: https://premium.wpmudev.org/forums/topic/pop-upover-when-visitor-is-about-to-leave-the-site - but not sure I understand how to access the referred to "pop up on exit rule add-on".

That seems like the right direction but am not seeing how/where to find this rule/add-on. Thanks for your help!

All the Best,

Kerry

  • Vinod Dalvi

    Hi Kerry,

    I hope you are well today and thank you for your question.

    To use this pop up rule, you have to activate the JavaScript Events add-on from the pop up settings and checked the option "Appear when the mouse leaves the browser window " in the pop up behavior section as displayed in the attached screenshots.

    Find more information about the usage of this plugin on the following page.

    https://premium.wpmudev.org/project/the-pop-over-plugin/#usage

    Please advise if you have more questions.

    Best Regards,
    Vinod Dalvi

  • TYGMedia

    Greetings! Thanks very much!

    We're closer! I am seeing the pop-up disclaimer now BUT what is happening is that it is already opening the link in s new window and THEN displaying the disclaimer in the original window. (When I try to have the link open directly - i.e. without a new window opening - we just see the new page - not a disclaimer ahead of time). You choose a link on the FBCU Services page to see if you can see what I am seeing.

    So, again, what I am hoping to have is (1) visitor clicks link for external site; (2) pop-up disclaimer displays and then (3) upon "confirm" by visitor, they are off to the "new" site ...

    Thanks again, so much for your help ... much appreciated ... Happy to provide Support Access if that is helpful/useful to you in helping me on this ... just let me know and thank you again!

    All the Best,

    Kerry

  • Vinod Dalvi

    Hi Kerry,

    Thank you for your reply.

    So, again, what I am hoping to have is (1) visitor clicks link for external site; (2) pop-up disclaimer displays and then (3) upon "confirm" by visitor, they are off to the "new" site ...

    We will have to develop custom code to achieve this.

    To achieve this, try using the attached small plugin that contains the following code.

    function add_custom_script() { ?>
    	<script type="text/javascript">
    		jQuery(document).ready(function(){
    			jQuery('a[target=_blank]').click(function(){
    				var this_url = jQuery(this).attr('href');
    				jQuery('.wdpu-msg .wdpu-cta').click(function(){
    					window.open(this_url,'_blank');
    				});
    				jQuery('.wdpu-container').css({ "opacity" : "1", "z-index" : "100000", "top" : "0", "left" : "0","right": "0","bottom": "0", "width": "100%", "height": "100%" });
    				jQuery('.wdpu-msg').css({ "top": "153px" });
    				return false;
    			});
    		});
    	</script>
    <?php }
    add_action( 'wp_footer', 'add_custom_script');

    Best Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.