Make Pop Ups Only Appear Once Per Day
Pop ups aren't ideal from a viewing perspective. So it's nice to have it only show once per day to avoid viewer frustration.
Javascript
Copy Code
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
const newsletter = document.querySelector('.yourClassName');
const seenPopup = Cookies.get('seenPopup');
if(!seenPopup){
setTimeout(() => { newsletter.style.display = "flex"; }, 10000);
Cookies.set('seenPopup', 1, { expires: 1 });
}
else{
newsletter.style.visibility = "hidden";
}
});
</script>
Why Constant Pop Ups Suck
Letâs be real. Nobody likes getting slammed with pop ups every time they visit a page. Even your most loyal visitors will bounce faster than you can say âlead magnet.âHereâs why you shouldnât be that site:
- Trust takes a hit. Overdo it and you start looking spammy. Not exactly the vibe.
- It interrupts their journey. Before they even scroll? Rude.
- Google doesnât like it either. Intrusive elements can tank your search rankings.
- Conversions suffer. If people click away before they see your content, youâre not just losing eyeballs - youâre losing leads.
The fix that saves face (and bounce rate)
Donât worry. You can still pop up strategically. Hereâs how to make sure your message shows up once per day per visitor - and then gives them a break.
đ§ââď¸Just do this:
- Copy the code snippet (scroll up, itâs right thereâŹď¸).
- Head into your Page Settings in Webflow.
- Paste it into the Body Code section.
- Replace .yourClassName with the class name of your pop up.
- Hit Publish.
- Pour yourself a coffee - youâve earned itâ
đDone! Youâve now got a pop-up that respects your visitorâs space and gets the job done. Less bounce, more trust, and better vibes all around.
â
Fancy a Free Quote?
Got a crazy idea? Weâre all ears. Reach out, share your story, and letâs make some magic together. Click below to get your free quote.