Automatically Close the Overlay after Signup

Looking to close a pop up after a user enters their email? You can add a number of seconds delay so your post engagement message will display and then the pop up will automatically close after the given time. 

 

To set up this delayed automatic close of a pop up, you’ll need to use the JavaScript override feature.

  1. Access the JS override code for the specific promotion. This is located in the design canvas labeled “Custom Code”

  2. Paste this code with the desired time delay in the “Pop up JS” section (Tab JS for Unobar promotions) and make sure the JS override is turned on.popup.png

Note: The code below is set up with a three second delay. the “3000” is milliseconds meaning 3000=3 seconds or 6000 = 6 seconds.

 

function ju_callback(email){
setTimeout(function(){
close_window();
},3000);
}

 

NOTE: If you wish to close the overlay after a social action has taken place you must add in a call for that social action

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.