Age verification Pop UP (Solved)

thank you so much! A whisky for you :slight_smile:
But this not working for me. I solved with this:

Create a ligtbox named “age18-alert” and put into 2 buttons.
At the buttons +18 I assigned “OnClick” event that close the lightbox and set the “session.setitem” to “FirstTimeAgeVerification”: Like this:

export function buttonOnAge(event) {
wixWindow.lightbox.close(‘age18-alert’);
// set flag for future visits
session.setItem(“FirstTimeAgeVerification”, “yes”);
}

Finally in the SITE panel i added this code:

import {session} from ‘wix-storage’;
import wixWindow from ‘wix-window’;

$w.onReady( function () {

// flag is not found
setTimeout( function () {
if (!session.getItem(“FirstTimeAgeVerification”)) {
// open popup
wixWindow.openLightbox(“age18-alert”);
}
// The timeout value is 3000 nanoseconds
},
3000);

});

Got it!