Retrieve a Button Selection on a different page

I have a Lightbox where the user will select a location from a series of buttons. Depending on their answer, different content (strips) will show on a different page.

The code below isn’t working as it should. I’ve trawled through the API reference and other threads and can’t work out why it isn’t working. On the other page (below), it isn’t logging the “success”. What’s going on?!

Lightbox 1 (Button Selection)
import {session} from ‘wix-storage’ ;
import wixWindow from ‘wix-window’ ;
$w.onReady( function () {
});
export function Location1SelectionButton_click(event) {
session.setItem( “Location1Selection” );
wixWindow.lightbox.close( “#WelcomeLightbox” );
console.log( “Location1 Selected” )
}
export function Location2SelectionButton_click(event) {
session.setItem( “Location2Selection” );
wixWindow.lightbox.close( “#WelcomeLightbox” );
console.log( “Location2 Selected” )
}

On Other Page
import {session} from ‘wix-storage’ ;
import wixWindow from ‘wix-window’ ;
$w.onReady( function () {
//Location1
if (session.getItem( “Location1Selection” )){
$w( ‘#Location1Strip’ ).expand()
$w( ‘#Location2Strip’ ).collapse()
console.log( “Location1 Success” )
}
//Location2
if (session.getItem( “Location2Selection” )){
$w( ‘#Location1Strip’ ).collapse()
$w( ‘#Location2Strip’ ).expand();
console.log( “Location2 Success” )
}
});

I also have a button in the header (on all pages), where the user can change their location, which clears the session data. This isn’t working either.

export function CompanyLogoMaster_click(event) {
//Remove session storage of
session.clear();
console.log( “Session Data Cleared” )
//Open Lightbox
wixWindow.openLightbox( “WelcomeLightbox” );
session.setItem( “LightboxShown” , “yes” );
console.log( “Lightbox Opened by Logo” )
}

Thanks for your help in advance!

can you post the full code?

and session can only hold 50KB data(= 50 alphabaet/number) in total

I must be doing something wrong as this is the only code I currently have relating to retrieving this data.

I do have additional code on the global page relating to a one-time pop-up per session, following this tutorial: https://support.wix.com/en/article/velo-tutorial-creating-a-one-time-popup

$w.onReady( function () { if (!session.getItem( “LightboxShown” )) { wixWindow.openLightbox( “WelcomeLightbox” ); session.setItem( “LightboxShown” , “yes” ); console.log( “Lightbox Open On First Load” ) } } );