I have a newsletter pop up on my site that is currently showing up every time users click on different pages. I need this pop up to only show up for each user once every 30 days and was hoping I could do this with local storage. I haven't got much experience with local storage and was hoping someone may be able to explain to me how this would be done. Below is the limited amount of code i have started off with:
var newsletterPopup = localStorage.getItem('newsletter');
if (newsletterPopup) {
}
localStorage.setItem('newsletter','true');