> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an exit intent widget

> Use PBX to generate a popup widget that appears when visitors are about to leave your site, then connect it to the Website exit trigger in a personalization campaign.

An exit intent widget appears when a visitor's cursor moves toward the top of the browser window, signaling that they are about to navigate away. Use exit intent widgets to present last-moment offers, collect email addresses, or surface helpful content before a visitor leaves your site.

## Before you begin

If you are new to PBX or the Personalization builder, review [Create a widget with PBX](../pbx-widgets) and [Set up and launch a personalization](../../../web-personalization/set-up-and-launch-a-personalization) before continuing.

## Step 1: Build the widget

Describe your exit intent popup in a text prompt and let PBX generate it.

1. Go to **Studio** > **Widgets** > **New widget**.
2. Select **Using a prompt**.
3. Enter a name for your widget and click **Create**.
4. In the prompt field, describe your popup. For example:

   ```text theme={null}
   Create a centered modal popup for an exit intent offer.

   - Content: Headline, short description with a discount offer, email input field, CTA button, and a "No thanks" link
   - Style: Modern ecommerce design, rounded elements, dark CTA button, close button in the top-right corner
   - Behavior: Close when clicking "No thanks" or the close button
   ```

<Frame>
  <img src="https://storage.googleapis.com/kameleoon-storage-documentation/user-manual/images/assets/widgets/create-a-widget-with-the-widget-studio/create-an-exit-intent-widget/exit-intent-pbx-prompt.png" alt="PBX prompt field with an exit intent popup description entered" width="50%" />
</Frame>

5. Review the generated widget and refine it with follow-up prompts, such as "Make the CTA button larger" or "Change the headline font."
6. When you are satisfied with the result, save the widget.

<Frame>
  ![Generated exit intent popup displayed in the PBX preview](https://storage.googleapis.com/kameleoon-storage-documentation/user-manual/images/assets/widgets/create-a-widget-with-the-widget-studio/create-an-exit-intent-widget/exit-intent-pbx-result.png)
</Frame>

For more guidance on writing effective prompts, see [Create a widget with PBX](../pbx-widgets).

<Note>
  PBX widgets do not support legacy personalization. Contact your Customer Success Manager if you need access to the new personalization builder.
</Note>

<Tip>
  To build the widget with the drag-and-drop editor instead, select **Using the editor** in step 2. See [Create a widget](./create-a-widget) for instructions.
</Tip>

## Step 2: Create a personalization

Create the personalization campaign that will display your widget.

1. Go to **Experiences** > **Personalization**.
2. Click **New personalization**.

<Note>
  The step for adding your widget to the personalization content is not yet available. Full instructions for this step will appear here once the **Using widget** option is activated.
</Note>

## Step 3: Set up the Website exit trigger

Configure the personalization to activate when a visitor's cursor leaves the browser window.

<Frame>
  ![Trigger Builder with the Website exit condition selected under Browsing behavior](https://storage.googleapis.com/kameleoon-storage-documentation/user-manual/images/assets/widgets/create-a-widget-with-the-widget-studio/create-an-exit-intent-widget/exit-intent-trigger-builder-website-exit.png)
</Frame>

1. Click the **Targeting rules** tab and expand the **Triggers** section.
2. Select **When a specific trigger occurs**.
3. Click **Create a new trigger**, or select an existing Website exit trigger from the dropdown.
4. In the Trigger Builder:
   1. Enter a name for your trigger, such as "Website exit—all pages."
   2. Select your project and click **Next**.
   3. In the conditions panel, select **Website exit** under **Browsing behavior**.
   4. Click **Next**, review the trigger summary, and click **Create trigger**.
5. Select the trigger you created from the dropdown.

The personalization now activates when a targeted visitor's cursor leaves the browser window.

## Step 4: Limit display frequency

Prevent the popup from appearing repeatedly by restricting how often it displays.

<Frame>
  <img src="https://storage.googleapis.com/kameleoon-storage-documentation/user-manual/images/assets/widgets/create-a-widget-with-the-widget-studio/create-an-exit-intent-widget/exit-intent-display-settings.png" alt="Display settings panel showing the per-visit display limit set to 1" width="50%" />
</Frame>

1. Expand **Display settings**.
2. Under **Display limits**, set the per-visit display limit to **1**.

Visitors then see the popup only once per session.

## Step 5: Launch

1. Click **Save**.
2. Click **Simulate** to preview the personalization in your browser.
3. Click **Launch** to go live.

## Next steps

* [Create a widget with PBX](../pbx-widgets): explore advanced prompt techniques, goal tracking, and Google Sheets integration.
* [A/B test your widgets](../use-widgets-in-your-campaigns/ab-test-your-widgets): run experiments to find the most effective exit intent message.
* [Set up and launch a personalization](../../../web-personalization/set-up-and-launch-a-personalization): configure advanced display settings, scheduling, and rollback conditions.
