# 🚪 \[FREE PLUGIN\] Page Close Event

**URL:** <https://forum.bubble.io/t/free-plugin-page-close-event/152585>\
**Category:** Showcase\
**Created:** [May 23, 2021, 11:40am UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585 "2021-05-23T11:40:41Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![BubbleSam](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/bubblesam/32/85699_2.png) [@BubbleSam](https://forum.bubble.io/u/BubbleSam)\
**Post date:** [May 23, 2021, 11:40am UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585/1 "2021-05-23T11:40:41Z")

</div>

> Plugin triggers an event when user is about to close the page🚪

This can be used to show a popup with a promo code etc. It works on desktop and mobile

🔥 Features:

- Very easy configuration
- Work on mobile and deskop
- Event sensitivity configuration

🔗 [Demo](https://de-demo2.bubbleapps.io/version-test/quit-event) | [Editor](https://bubble.io/page?type=page&name=quit-event&id=de-demo2&tab=tabs-1)

🔗 Plugin Page:

> **[Page Close Event / Quit / Exit Plugin for Bubble, by Digital Eye](https://bubble.io/plugin/page-close-event--quit--exit-1621764699423x344379196288794600)**
>
> Page Close Event / Quit / Exit Plugin page on Bubble, by Digital Eye. Add Page Close Event / Quit / Exit in one click to your app. Bubble lets you build web apps without any code.

📚 Full Description, Documentation & Screenshots:

> **[Page Close Event 🚪](https://bubble.digital-bird.com/plugins/page-close-event)**
>
> Plugin triggers an event when user is about to close the page. This can be used to show a popup with a promo code etc. It works on desktop and mobile

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [May 23, 2021, 9:15pm UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585/2 "2021-05-23T21:15:08Z")

</div>

Well done @BubbleSam ! Thanks 👊

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [May 23, 2021, 9:33pm UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585/3 "2021-05-23T21:33:49Z")

</div>

Totally unrelated to this thread but related anyway

Who copied who’s facial hair style? You guys look so similar! 😂 🤣

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/e/6/e6a723161324d2217e5a3be85ea28a78895d7866.jpeg)

That said, I’ll definitely be using this plugin!!

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [May 23, 2021, 10:29pm UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585/4 "2021-05-23T22:29:06Z")

</div>

You should join the club @jared.gibb

Just cut and change the color 😂

---

<div class="post-metadata">

**Author:** ![company1](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@company1](https://forum.bubble.io/u/company1)\
**Post date:** [June 4, 2021, 2:01pm UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585/5 "2021-06-04T14:01:15Z")

</div>

Thank for your Plugin. I have some questions.

Is there a plugin that can detect and Change user status only when the user closes the page by himself or when it is turned off?

I’ve tried the following three plugins, each with its own problems. Is this because I just don’t know how to use them?

1.Page Close Event / Quit / Exit

> **[Page Close Event / Quit / Exit Plugin for Bubble, by Digital Eye](https://bubble.io/plugin/page-close-event--quit--exit-1621764699423x344379196288794600)**
>
> Page Close Event / Quit / Exit Plugin page on Bubble, by Digital Eye. Add Page Close Event / Quit / Exit in one click to your app. Bubble lets you build web apps without any code.

The problem is that it is too sensitive to the PC. For example, as soon as I bring the cursor to a tab, it is recognized as Page Close, and I don’t want it to be recognized as Page Close until I close the tab, even on a PC.

2.Page Close detector

> **[Page Close Detector Plugin for Bubble, by Bancos Apps](https://bubble.io/plugin/page-close-detector-1566873282818x672167090435915800)**
>
> Page Close Detector Plugin page on Bubble, by Bancos Apps. Add Page Close Detector in one click to your app. Bubble lets you build web apps without any code.

The problem is that it can’t recognize the close of the tab.

3.Window Closer

> **[Window Closer Plugin for Bubble, by Snipet](https://bubble.io/plugin/window-closer-1532793839044x283832241472929800)**
>
> Window Closer Plugin page on Bubble, by Snipet. Add Window Closer in one click to your app. Bubble lets you build web apps without any code.

The problem is that it cannot detect the user’s Page Close Event.

---

<div class="post-metadata">

**Author:** ![BubbleSam](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/bubblesam/32/85699_2.png) [@BubbleSam](https://forum.bubble.io/u/BubbleSam)\
**Post date:** [June 4, 2021, 2:12pm UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585/6 "2021-06-04T14:12:30Z")

</div>

> [@company1](#):
>
> The problem is that it is too sensitive to the PC. For example, as soon as I bring the cursor to a tab, it is recognized as Page Close, and I don’t want it to be recognized as Page Close until I close the tab, even on a PC.

Hi @company1 , thank you for your feedback!

Sometimes it’s useful to show a popup with a discount or a special offer before the user leaves your website. So our plugin that you mentioned sends an event _before_ the user closes the tab.

I do not know your exact use case but this plugin probably could help:

> **[Users Online 🙋‍♂️ Plugin for Bubble, by Digital Eye](https://bubble.io/plugin/users-online-%F0%9F%99%8B%E2%80%8D%E2%99%82%EF%B8%8F-1618682033565x545077038187544600)**
>
> Users Online 🙋‍♂️ Plugin page on Bubble, by Digital Eye. Add Users Online 🙋‍♂️ in one click to your app. Bubble lets you build web apps without any code.

It can tell you whether the user is active on the website or not (check the demo).

---

<div class="post-metadata">

**Author:** ![company1](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@company1](https://forum.bubble.io/u/company1)\
**Post date:** [June 4, 2021, 5:33pm UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585/7 "2021-06-04T17:33:59Z")

</div>

@BubbleSam

Thank you very much!  
Our users are very often making bagground calls with the service open and without closing the tab. A baggound call is when you open an existing tab and make a call while opening another screen or app, such as Facebook or a smartphone game.

We don’t want to assume that the User is offline or has closed the tab when they are making a bagground call. We want to consider a user as offline or closed tabs when the user actively closes the tabs on their own and no longer even makes background calls.

Is that possible with this plugin?

Translated with [www.DeepL.com/Translator](http://www.DeepL.com/Translator) (free version)

---

<div class="post-metadata">

**Author:** ![BubbleSam](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/bubblesam/32/85699_2.png) [@BubbleSam](https://forum.bubble.io/u/BubbleSam)\
**Post date:** [June 5, 2021, 10:43am UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585/8 "2021-06-05T10:43:06Z")

</div>

> [@company1](#):
>
> We want to consider a user as offline or closed tabs when the user actively closes the tabs on their own and no longer even makes background calls.
> 
> Is that possible with this plugin?

Unfortunately, that won’t be possible to do with our plugin…

Please also check this post on stackoverflow:

> <https://stackoverflow.com/questions/3888902/detect-browser-or-tab-closing/3888938#3888938>

Probably you need to find another way to solve your task

---

<div class="post-metadata">

**Author:** ![mfernandes.beto](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@mfernandes.beto](https://forum.bubble.io/u/mfernandes.beto)\
**Post date:** [June 16, 2021, 5:40pm UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585/9 "2021-06-16T17:40:37Z")

</div>

Thanks BubbleSam  
You save my day!  
🙂  
It´s perfect!

Just one question …  
It´s works just 1 time per session or it´s possible more times?

---

<div class="post-metadata">

**Author:** ![BubbleSam](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/bubblesam/32/85699_2.png) [@BubbleSam](https://forum.bubble.io/u/BubbleSam)\
**Post date:** [June 17, 2021, 8:56am UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585/10 "2021-06-17T08:56:01Z")

</div>

Thank you for your feedback! Yeah it works once per session

---

<div class="post-metadata">

**Author:** ![mfernandes.beto](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@mfernandes.beto](https://forum.bubble.io/u/mfernandes.beto)\
**Post date:** [June 17, 2021, 9:12pm UTC](https://forum.bubble.io/t/free-plugin-page-close-event/152585/11 "2021-06-17T21:12:28Z")

</div>

Thank you … it´s perfect!  
Congratulations
