top of page
Crumpled Fabric

0

Exit-Intent Popup on Wix Studio

Click URL to copy

Aug 19, 2024

3 min read

WIX Ideas Team

Tags: Lightbox Wix Studio Exit-Intent Popup Popup Velo by Wix Wix Studio Coding



How to Add an Exit-Intent Popup to Your Wix Website


Welcome back to Wix Ideas! In this tutorial, I'll show you how to add an exit-intent popup to your Wix Studio website. Exit-intent popups are a great way to improve your website's conversion rate by capturing the attention of users just as they're about to leave your site.


What is an Exit-Intent Popup?


An exit-intent popup is a special kind of popup that appears when a user is about to leave your website. For example, as soon as a user moves their cursor towards the browser’s close button, a popup could appear offering a 30% discount to encourage them to stay or make a purchase.


Why Use Exit-Intent Popups?


Exit-intent popups can be highly effective in reducing bounce rates and increasing conversions. By presenting an offer or important message before a user leaves, you create one last opportunity to engage with them.


Step-by-Step Guide


Let’s dive into the steps to create and implement this feature on your Wix website.


1. Add a Lightbox (Popup)

The first step is to add a lightbox or popup to your website.


- Click the + icon (Add Elements) in your Wix editor.

- Navigate to Layout Tools and select Lightboxes.

- Choose a lightbox design that fits your brand, and customize it with your message or promotion.

- After customizing, click on the lightbox's settings and copy the lightbox name. You'll need this name for the coding part later.


2. Write the Velo Code

Now, we’ll add some custom code to trigger the lightbox when the user attempts to leave the page.


- Go to the Code panel in your Wix editor.

- Use the following steps to write the code:





This code triggers the popup when the user's cursor moves toward the top of the browser window, indicating they’re about to leave.


3. Optimize the Popup Load Time

To ensure that your lightbox loads quickly, especially on the first attempt, we’ll prefetch the resources using the `prefetchPageResources` API.


- Import the Wix site API:



This will load the lightbox resources in the background, so the popup appears instantly when triggered.


4. Final Testing

Once you’ve added the code and customized the lightbox, it’s time to test the functionality.


  • Publish your website.

  • On the live site, move your cursor towards the top of the browser window. You should see the lightbox appear before you can close the tab.

  • Test the popup to ensure it loads quickly and accurately on the first attempt.


Conclusion


Exit-intent popups are a simple yet effective way to increase user engagement and conversions on your Wix website. By following the steps outlined in this tutorial, you can easily add this feature to both Wix Studio and Wix Classic sites.


If you found this tutorial helpful, don’t forget to give it a thumbs up and subscribe to my channel for more Wix tips and tricks. Thank you for watching, and I’ll see you in the next tutorial!




Code



Leave a comment (0)

Thanks for leaving a comment🎉

ahmed

ahmed

May 19, 2024

wix form data

Hi i need your help also in wix form submission

the problem is that some fields are generated when $w.onReady(function () { like day & date and when i choose the student name i get the phone number from database .

and the form save only the field u fill it by ur self like input or dropdown

Reply

Walter Odibi

Walter Odibi

January 20, 2000

bromar

bromar

Sep 29, 2023

Love the tutorial!!!

You are truly great at creating these instructional videos!! Thank you! I am having trouble figuring out . . 'the triggered email' . . it is not being sent to the user submitting the form, the form and the email to the admin works great. . Could you point me to where this might have already been addressed? or any other help? On a second note. .the submit button success/failure message will go back to the default message once it's connected to the data set(I couldn't figure that out either. )

Reply

Walter Odibi

Walter Odibi

January 20, 2000

kaan

kaan

Jun 4, 2023

wishlist and rating system

hello sir I try today 2 hours but not working if you want I pay money can you do this 2 ( wishlist and rating star) system please I send to you invaid

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Hi there, you can contact me here using the in-app chatbox

Waqas

Waqas

Apr 16, 2023

Triggered Email Backend

Hi mate please can you send email by backend

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Hi Waqas, there isn't a backend code for this tutorial. The emails will be sent from the client-side.

Ghan

Ghan

Dec 29, 2022

Great Tutorial

Hi !

First of all, I want to thank you for your great tutorials, they helped us a lot with the coding.
But I still need your help, if you don't mind. I have based on Save Calculated Field using Wix Data Hooks Codes, to code my form . but the problem is I don't know why the code only reads the computation for "week2" computation and not the "weeks"

here is the code

I also did a separate column in the dataset where the chosen datas for both fields will be placed.

$w.onReady (() => {
$w("#Person").onChange(() => {
$w("#weeks").onChange(() => {
$w("#week2").onChange(() => {
let person = Number($w("#Person").value);
let weeks = Number($w("#weeks").value);
let week2 = Number($w("#week2").value);


$w("#totalLabel").show();

$w("#totalLabel").text = `"${String(weeks * Number(person))}페소"`; //DESIGN YOUR MESSAGE
$w("#totalLabel").text = `"${String(week2 * Number(person))}페소"`; //DESIGN YOUR MESSAGE

});
});
});

});

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Hi there, thanks for your comment. I see why this is a problem. The onChange() function seems wrong in combination.

To combine onChangeFunctions use this method

$w("#Person, #weeks, #weeks2").onChange(() => {

//code here

});

Walter

Walter

Aug 8, 2022

More Details? Watch video

Hi, you can click here to watch the video https://www.youtube.com/watch?v=9bx7-nBeZ5c

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Walter

Walter

Jul 11, 2022

For you

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Walter Odibi

Walter Odibi

Apr 18, 2022

Awesome Feature

This tutorial shows you how to display views on your Wix repeater.

📺WATCH VIDEO HERE https://www.youtube.com/watch?v=Iz7SdaCSdXg

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Walter Odibi

Walter Odibi

Apr 18, 2022

Amazing tutorial

This amazing tutorial will show you how to a comment section to your WIX dynamic page.

📺WATCH VIDEO HERE https://www.youtube.com/watch?v=f8-vJQFNZ_c

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Walter Odibi

Walter Odibi

Apr 10, 2022

Great Feature🎉

This amazing tutorial will show you how to add a visitor view counter to your WIX dynamic page.

🚩MORE TUTORIALS https://www.wixgenius.com/wix-tutorials

Reply

Walter Odibi

Walter Odibi

January 20, 2000

RELATED TUTORIALS 🚀

Populating Input Elements with Data from Wix Collection

Populating Input Elements with Data from Wix Collection

Populate your input elements with data from your database collections

bottom of page