# Page Close Event 🚪

## 🔗 Links

> [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](https://bubble.io/plugin/page-close-event--quit--exit-1621764699423x344379196288794600)

> [Forum](https://forum.bubble.io/t/free-plugin-page-close-event/152585)

## 🔥 Features

* Very easy configuration
* Work on mobile and desktop
* Event sensitivity configuration

## 📚 Documentation

### ➡️ Quick Start

1. Add the **Page Close Event** element on the page:

![](/files/-MaNv_0BZrQwxqjUu9Au)

2\. Use the "**Page Close**" event in your Workflow to show a popup or make any other action:

![](/files/-MaNven18OW5yRyrAZVi)

### ➡️ Element Fields

| Field       | Type     | Description                                                                                                                                                                                                                                                                                                                                                                       |
| ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Method      | Dropdown | <p></p><p>The bounce detection method. Default: auto.</p><ul><li>mouse: For desktop browsers. Detects bounces based on the mouse's direction, velocity and distance from the top of the page.</li><li>history: For mobile browsers. Triggers when the visitor clicks on the browser's back button.</li><li>auto: Automatically picks a method based on the device type.</li></ul> |
| Distance    | Integer  | The minimum distance in pixels from the top of the page to consider triggering for. Default: 100                                                                                                                                                                                                                                                                                  |
| Sensitivity | Integer  | The minimum distance the mouse has to have moved in the last 10 mouse events for onBounce to be triggered. Default: 10                                                                                                                                                                                                                                                            |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bubble.digital-bird.com/plugins/page-close-event.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
