Looking for a way to make popup modal appear only once per 24 hours

I have a popup modal on the shop page of my site to gather information on what brings them to the shop. Is there a way to implement some code to make it appear once a day for a user? https://www.zeppelinguys.com/shop

Hi Michael, welcome to the forum :slight_smile:

You can use cookies with expiration date for that
Here is how:

Ok that seems like what I need. However after pluging in the code and adjusting it according to the tutorial the modal still pops up in the incognito screen. is there something I’m missing in the code?


Good afternoon, @avivtech and thank you for providing the video! I have attempted to implement your code according to the instruction in your video, but it does not seem to work. Would you mind giving it a look? I’d appreciate any help!

Here is the share site:

Hi @ChatterSean,
I only provided the link :slight_smile: the video tutorial is by @PixelGeek

Anyway, your dependency script tag is a bit messy, and the JS library probably does not loads.
Your tag:
<script> src=“https://cdn.jsdelivr.net/net/npm/js-cookie@2/src/js.cookie.min.js”></script>

Should be:
<script src="https://cdn.jsdelivr.net/net/npm/js-cookie@2/src/js.cookie.min.js"></script>

@PixelGeek Do you think you could help?? I’ve adjusted the dependency script tag, but it still doesn’t seem to be working. The pop-up still reappears when I refresh.

Can you share a link to the published site?


ok, so:
You have an error on the website that says:
“Failed to load resource: the server responded with a status of 404 ()”
This means that the JS library is not being loaded. If you take the link and paste it in the address bar, you’ll see that the resource is not loaded and gives this:
“Failed to fetch version info for net.”

So, you need to find a CDN with this version of the JS library.

This might work:

1 Like