Skip to content

Exit popup

An exit popup is a powerful way to re-engage potential leads. For example, when a user loses interest and is about to leave your site, you can show a better offer — and still turn them into a lead.

In this article, we’ll create such a popup and show you how simple it is!

Our widget will:

  • wait until the user is about to leave the page;
  • display a modal window (popup) with better offer at that moment.

As usual, we’ll start with an empty flow. We can add parameters to the entrypoint, but note that they are captured when the page is loaded, not when the popup is shown.

image

Now we need to add an await node. In this node, we’ll configure a trigger to continue the flow.

image

In our case, the trigger will be activated when the user’s cursor leaves the browser window. Exactly at the moment when the user decides to click the close button on the browser tab.

image

The flow will be paused until the specified event occurs. Once triggered, the flow will continue — and at this point, we’ll add a view node to display our popup.

image

In the view node, we need to enable the use as dialog option to display the view as a popup. In all other respects, it will behave just like a regular view.

image

Inside the view, we can display anything you like. For example, we could reuse another recipe and build a complete lead generation form. However, in this example, we’ll keep it simple and include just a single email field.

image

Next, let’s make an HTTP request to save the collected email using the HTTP request node.

image

Let’s imagine we have a REST endpoint that allows us to create a new user, and configure the HTTP request node accordingly.

image

Done! Now, whenever someone tries to leave our page and moves their cursor to close the tab, we’ll make them an offer they can’t refuse 😅.

For a better experience enable the pixel option to hide the widget’s standard interface during loading (or error).

This flow consumes only one operation per lead. That means, for example, on the Team plan, you can re-engage up to 2,000 leads.