One time pop up lightbox code not working

import {local} from ‘wix-storage’;
import wixWindow from ‘wix-window’;
$w.onReady(function () { if(!local.getItem(“firstTimePopupShown”)) { wixWindow.openLightbox(“Announcement”);
local.setItem(“firstTimePopupShown”, “yes”);
} } );

I used this code and followed all the instructions on the wix tutorial but it keeps popping up on the home page of my members profile. Which is where i stored the code because thats the site i want the member too see it for the first time.

The lightbo is linked to 4 other lightboxes through a button because it’s a intro tutorial on the site. Could this be causing the continues pop-up every the member visits the site?

please help!

Be sure you set the lightbox trigger to "automatically display: no.
Also be sure not to test it in browser incognito/private mode

yes that was set. Already tried with 3 different accounts. Could it be because its a dynamic page and not a member page?

It doesn’t depend on the user account but on the device and browser and site page (you store it in the browser cache).
(If you want to make it user-dependent it should be done completely different.)
I’m not sure what exactly you did there, but if the code runs on the current page and you’re using the same browser on the same device, it shouldn’t pop up.