# Display modal on exit feature

**URL:** <https://forum.mautic.org/t/display-modal-on-exit-feature/1864>\
**Category:** General Discussion\
**Created:** [May 22, 2015, 8:45am UTC](https://forum.mautic.org/t/display-modal-on-exit-feature/1864 "2015-05-22T08:45:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![henryb72](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@henryb72](https://forum.mautic.org/u/henryb72)\
**Post date:** [May 22, 2015, 8:45am UTC](https://forum.mautic.org/t/display-modal-on-exit-feature/1864/1 "2015-05-22T08:45:18Z")

</div>

Does Mautic have any plans to offer a modal style popup that fires when it detects that a user is about to leave the site?  
  
  
  
An example of a great open source version is [https://github.com/carlsednaoui/ouibounce](https://github.com/carlsednaoui/ouibounce).  
  
  
  
If used properly these can have a fantastic lift on conversion.

---

<div class="post-metadata">

**Author:** ![henryb72](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@henryb72](https://forum.mautic.org/u/henryb72)\
**Post date:** [May 22, 2015, 8:45am UTC](https://forum.mautic.org/t/display-modal-on-exit-feature/1864/2 "2015-05-22T08:45:18Z")

</div>

Does Mautic have any plans to offer a modal style popup that fires when it detects that a user is about to leave the site?

An example of a great open source version is [https://github.com/carlsednaoui/ouibounce](https://github.com/carlsednaoui/ouibounce).

If used properly these can have a fantastic lift on conversion.

---

<div class="post-metadata">

**Author:** ![chad.windnagle](https://avatars.discourse-cdn.com/v4/letter/c/7feea3/32.png) [@chad.windnagle](https://forum.mautic.org/u/chad.windnagle)\
**Post date:** [May 25, 2015, 5:36pm UTC](https://forum.mautic.org/t/display-modal-on-exit-feature/1864/3 "2015-05-25T17:36:58Z")

</div>

Hi Henryb72

This is an known feature request! It’ll be something the team will work soon.

---

<div class="post-metadata">

**Author:** ![henryb72](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@henryb72](https://forum.mautic.org/u/henryb72)\
**Post date:** [May 26, 2015, 3:44pm UTC](https://forum.mautic.org/t/display-modal-on-exit-feature/1864/4 "2015-05-26T15:44:23Z")

</div>

Hi Chad, I can’t find it on the github issues page, would you mind sending me the link? I may be able to contribute.

---

<div class="post-metadata">

**Author:** ![ankitpr89](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@ankitpr89](https://forum.mautic.org/u/ankitpr89)\
**Post date:** [May 27, 2015, 1:49am UTC](https://forum.mautic.org/t/display-modal-on-exit-feature/1864/5 "2015-05-27T01:49:16Z")

</div>

Cool.  
On most of my websites I work with Wordpress CMS and was planning do this through third party plugin. We only need to change the form field to point mautic installation and list.

---

<div class="post-metadata">

**Author:** ![henryb72](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@henryb72](https://forum.mautic.org/u/henryb72)\
**Post date:** [January 19, 2016, 11:32pm UTC](https://forum.mautic.org/t/display-modal-on-exit-feature/1864/6 "2016-01-19T23:32:05Z")

</div>

Any updates on this issue - [https://github.com/mautic/mautic/issues/1366](https://github.com/mautic/mautic/issues/1366) ?

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 20, 2016, 11:08am UTC](https://forum.mautic.org/t/display-modal-on-exit-feature/1864/7 "2016-01-20T11:08:55Z")

</div>

I’d wait for Mautic Marketplace because Allyde already has developed this plugin (can be tried in their service [mautic.com](http://mautic.com)) and I think they will release it when the marketplace will be available.

When the marketplace will be available you ask? I’ve heard a rumors that it should be available in February.

---

<div class="post-metadata">

**Author:** ![henryb72](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@henryb72](https://forum.mautic.org/u/henryb72)\
**Post date:** [January 20, 2016, 12:57pm UTC](https://forum.mautic.org/t/display-modal-on-exit-feature/1864/8 "2016-01-20T12:57:52Z")

</div>

Oh awesome, thanks for the information!

---

<div class="post-metadata">

**Author:** ![balkee](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@balkee](https://forum.mautic.org/u/balkee)\
**Post date:** [July 30, 2016, 9:40pm UTC](https://forum.mautic.org/t/display-modal-on-exit-feature/1864/9 "2016-07-30T21:40:19Z")

</div>

I didn’t see an update on this, so here’s my simple approach. I looked at solutions with jscript, javascript and some complicated multi-object dependent stuff out there that goes to all lengths, I like to keep it simple. You also have to consider Mautic strips off events on the , like etc…, strangely enough the less than sign “\<” is stripped off, so I had to reverse the logic for “\>”… This is based on mouse moving to Y coordinates less than 10, you can adapt for other events and conditions, let me know if you make improvements.

```auto
<head>
 <script>
        window.onmouseover = MouseTop;
        window.popobj ={shown:false};
        function MouseTop () {
            if (window.event.clientY > 10) //using reverse logic mautic removes "<"
            {}
            else
            {
                if (this.shown) return;
                $('#myModal').modal();
                this.shown = true;
            }
         }
 </script>
</head>
<body>
<!-- your page html here -->

        <div id="myModal" class="modal fade" role="dialog">
            <div class="modal-dialog" >
                      <!-- modal html here -->
            </div>
       </div>

</body>

```

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:59pm UTC](https://forum.mautic.org/t/display-modal-on-exit-feature/1864/10 "2020-02-02T22:59:46Z")

</div>


