Exit Notifier

Description

Some industries’ compliance recommendations suggest that a notice be presented anytime someone leaves your site. I searched for a plugin to do this, and came up empty, so here you go!

Features:
* Works with little or no configuration.
* The title and the body of the exit box, and the text on the buttons are all editable, and honor shortcodes.
* There are also options for providing a visual indication on your selected links, and for opening selected links in a new window/tab.
* You can completely customize the display of the dialog by modifying the CSS.
* You can set a timeout that will continue or cancel when the time expires, with optional visual feedback.
* Add CSS classes to selected links.
* Add Custom CSS that applies to the whole site.
* You can add custom tags in the anchor tag for each link to provide custom title and body for each link.
* Compatible with simple forms in some cases. Should work well with WooCommerce External/Affiliate product pages.
* Will honor <a target=”whatever”> for selectively opening in a new tab/window.
* Allows you to add rel=”nofollow” to all outbound links.
* You can now exclude individual links by applying a CSS class.
* Accessibility issues addressed with library updates.

NOTICE

When upgrading, please be sure to clear the cache if you’re using a caching plugin like the excellent WP Fastest Cache (http://www.wpfastestcache.com/) or something similar. There have been substantial changes and having older versions of the files cached will almost certainly lead to problems when an external link is clicked.

Credit where credit is due

I have made liberal use of the excellent WordPress Plugin Template by Hugh Lashbrooke found at https://github.com/hlashbrooke/WordPress-Plugin-Template. Thanks, Hugh!

Also, to HTMLGuy, the maker of jAlert, a very versatile and simple alert component! Thanks!

Screenshots

  • A sample notice in action.
  • Default exit box closeup.
  • Content settings page.
  • Alternate Content settings page.
  • Behavior settings page.
  • Display settings page.
  • Timeout settings page.
  • Custom CSS settings page.

Installation

Installing “Exit Notifier” can be done either by searching for “Exit Notifier” via the “Plugins > Add New” screen in your WordPress dashboard, or by using the following steps:

  1. Download the plugin via WordPress.org
  2. Upload the ZIP file through the ‘Plugins > Add New > Upload’ screen in your WordPress dashboard
  3. Activate the plugin through the ‘Plugins’ menu in WordPress

FAQ

What is the plugin for?

This plugin is designed to provide a mechanism for notifying users of your site that they are leaving for another server. It can also be used to pop an alert for pretty much any <a> tag target (and now some forms!) with some jQuery selector magic. Some industries recommend notifying users if they are leaving your site.

Can I edit the text in the box?

Yes. The plugin provides generic defaults, but the settings page allows you to edit the title and body of the exit box. You can now also edit the text of the buttons, and determine the box behavior and look and feel.
You can also add exit-notifier-title=”Your title here” and/or exit-notifier-body=”Custom Exit Notifier Body text” to any link to customize the message for that particular link.

How do I “whitelist” links so the notifier does not appear even though they are offsite?

You can bypass exit notifier for some links by following the guidelines here: https://wordpress.org/support/topic/a-way-to-whitelist-a-site/

Reviews

June 23, 2021
I just inalled this. I needed to customize it so that it worked with only one URL. The settings to do that worked very well with the jquery. I was particularly pleased because I did not understand how flexible it could be from the description which stressed the negative default. It did mention that there could be exceptions to adjust it, but did note that you could change the default and only add one case (or I assume a few cases) to use it with query. The description does not do full justice to how well this works, in my opinion.
May 28, 2021
I'm new to HTML/CSS and needed to enable the 'Alternate Content' to work on specific redirects of a site I'm working on. Curtis helped me understand how to modify my settings so it would work. Now, everything is the way I need it to look. Thank you! Highly recommend this plugin both for its functionality and the support.
May 24, 2021
With 5-7 subsites and privacy policies that only apply to each, this was a perfect complement to finish off our global multisite features and functionality.
April 23, 2021
On first didnt get the plugin, maybe better explenation on how to use it. But when you take some time, you see everything you need to create exit notices is here and a LOT more options. Like custom targeting, automatic exit notice on all links, also whitelist for the links you dont need exit notice, and also, ALTERNATE notice, you can put with just adding class to links. So i think everything is covered. And did i mentioned someone created this for free? What more do you want. Well i busted my head on one situation, sent email to support, got answer quick, and right to the middle of the problem. PROBLEM solved. Cheers man! Without bear, just beer!
February 4, 2021
A client requested an action that this plugin provides. None of the other popups I looked at do what this one does. It's exactly what I need. I build with Elementor and no conflicts or issues. It implemented perfectly. Thanks to the dev and helpers so much for making this!
January 19, 2021
Thank you! I've been looking for a plugin of this type literally all day, and thanks to you I can do what I want to do. In my personal case, I can say that nothing is missing, a new tab would have been better than a popup, but, I cannot complain, since it has solved my problem, so again thank you very much. It is a great plugin to retain the user, especially if, as in my case, you manage a book website and want to ask for something in return or improve the bounce rate. And above all, it is 100% free! What more could you want?.
Read all 27 reviews

Contributors & Developers

“Exit Notifier” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Exit Notifier” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.9.1

  • Added target parameter to exit_notifier_js() function call.

1.9.0

  • Confirm compatibility with WordPress 5.7
  • Add JavaScript callable function exit_notifier_js(). Thanks Brian!

1.8.3

  • Fix IE11 BUG with sweetalert addition. Fix provided by @dwarho in the support threads. Thanks @dwarho!

1.8.2

  • Fix Custom Theme BUG — Thanks Erik!
  • Add SweetAlert2 as an option for notification

1.8.1

  • 2020-09-14
  • Updated jAlert for accessibility

1.8.0

  • 2020-09-09 (unreleased)

1.7.6

  • 2020-08-25
  • Added exclusion class to anchor behavior page.
  • Added rel=”nofollow” option as requested by Chuck W.
  • Added debugtoconsole parameter to print the jQuery selector to the console if checked.

1.7.5

  • 2020-02-19
  • BUGFIX: Long overdue fix for Alternate Content not including the URL in the Go button text. First reported by @rdesk.

1.7.4

  • 2020-02-19
  • Added shortcode handling to button text as requested by @wust.

1.7.3

  • 2020-02-07
  • ACTUAL BUGFIX: Fatal errors in some circumstances when detecting target. Thanks Austin!

1.7.2

  • 2020-02-07
  • BUGFIX: Fatal errors in some circumstances when detecting target. Thanks Austin!

1.7.1

  • 2020-02-01
  • Honors <a target=”_blank”>.
  • Timeout text is customizable for Continue and Cancel. Both modifications in this version suggested by @blubstar.

1.6.4

  • 2020-01-07
  • Cosmetic/typo issue

1.6.3

  • 2019-11-20
  • Compatibility check/update

1.6.2

  • 2019-01-15
  • BUGFIX: Error in applying jQuery selector appropriately. Thanks again to Paul A. for his quick testing!

1.6.1

  • 2019-01-15
  • Form handling is now off by default, due to some unforseen interactions on some sites. Thanks to Paul A. for finding the issue.

1.6.0

  • 2019-01-14
  • Add the ability to attach Exit Notifier to forms. Suggested by/with help from @jdrda, @kepu, and Annina W.

1.5.6

  • 2019-01-10
  • BUGFIX: Include the URL on the Go button checkbox fixed. Thanks again to @ccondray for alerting me to this one!

1.5.5

  • 2019-01-10
  • Added Advanced tab in settings and the option to not delete settings on uninstall.
  • Due to inspiration from @internetnoob, added a per-link option to customize the title and body for each link with custom attributes.

1.5.4

  • 2019-01-10
  • BUGFIX: Custom theme stopped working in 1.5. Thanks to @ccondray for helping find the bug!

1.5.3

  • 2018-12-17
  • Updated a few cosmetic issues and credits, including a warning about caching plugins when upgrading from 1.4 to 1.5 and later.
  • Added the option to blur the background.
  • Properly cleaning up settings when plugin is deleted.

1.5.2

  • 2018-12-14
  • Added an Alternate Exit Notifier option and more timeout options.

1.5.1

  • 2018-12-13
  • BUGFIX! Missing file. Sorry everyone!

1.5.0

  • 2018-12-13
  • Updated jAlert version
  • Fixed some WCAG issues brought to my attention by @mothershiparts
  • Added the ability to expand the target URL in the body or title by including {target} in the text. Thanks to @mdsteveb for the suggestion.
  • Added an option to display a progress bar for the timeout. Thanks to @mdsteveb for the suggestion.
  • Adjusted jAlert font size to use em instead of px. Thanks to @hmsproducts for the suggestion.

1.4.5

  • 2018-12-12
  • Added option to add CSS classes to selected links.
  • Added sensible hardcoded defaults in case of no selections preventing errors in some installations before specific configurations are chosen.

1.4.3

  • 2017-09-07
  • Internal changes for a specific use case.

1.4.2

  • 2017-06-15
  • Fixed minor error involving the Exit Box Theme sometimes not being selected leading to it failing to fire.

1.4.1

  • 2017-06-09
  • Minor metadata update

1.4.0

  • 2017-06-09
  • Added the timeout feature and settings tab.

1.3.4

  • 2017-04-03
  • Added exitNotifierLink class to all selected links so that you can style them to suit. Added the option to use no animation.

1.3.3

  • 2017-03-16
  • Added option to turn off URL in button text, and process shortcodes in the body text and popup title.

1.3.2

  • 2017-03-01
  • Added in an advanced CSS field that allows editing CSS that will affect the whole site and should take precedence over other CSS. WARNING: Do not use if you are not confident in your understanding of CSS!

1.3.1

  • 2017-02-23
  • Narrowed the scope of the Custom CSS setting to prevent sitewide CSS issues.

1.3.0

  • 2017-02-15
  • Added the ability to completely customize the look of the dialog by modifying the CSS.

1.2.3

  • 2017-02-11
  • Fixed CSS defining width for text fields affecting more than intended

1.2.2

  • 2015-12-17
  • Verified compatibility with WordPress 4.4. Updated Behavior tab in settings to clear up how the jQuery selector gets used.

1.2.1

  • 2015-09-25
  • Rearranged settings into tabs for readability and to reduce the need to scroll. Added backgroundColor option.

1.2

  • 2015-09-24
  • Visual controls added to the admin page

1.1.2

  • 2015-09-14
  • Minor terminology updates.

1.1.1

  • 2015-09-14
  • Added option to change the jQuery selector, allowing you to affect what links are notified.

1.0.2

  • 2015-09-13
  • Updated default body text to better match compliance suggestions.

1.0.1

  • 2015-08-16
  • Added options for visual indication of an external link and whether or not to open external links in a new window/tab.

1.0

  • 2015-08-15
  • Initial release