Asking confirmation when leaving the page to visitor’s is a great way to increase the engagement on your web site. Implementation of popup message on exit of a web page is very simple to implement. You can write simple javascript code to use the windows event onbeforeunload.
popup.
1. Never place Adsense in the exit or any popup this is the violation of Google Adsense.
2. This script will come for every page, you need on exit from the domain this is not the solution.
<script type="text/javascript">// < ![CDATA[ var exitmessage = 'Please dont go!'; //custome message DisplayExit = function () { return exitmessage; }; window.onbeforeunload = DisplayExit; // ]]></script> |
You can increase your site’s traffic by 200% and decrease the rate of bounce rate dramatically by using this simple javascript code.
Pinoy Pop Up on Exit is also a good alternate for WordPress blogs, but this plugin is not working after the WordPress 3.6 release. You may need to change the plugin source code before use.