Jump to content

How can I add an age verification popup?

Recommended Posts

I’m creating a website for a local brewery and need to figure out how to add an age verification request that pops up when visitors come to the site for the first time. Just needs to be basic and ask “Are you 21?” If “Yes,” let them into the site, if “No,” send somewhere else.

I searched and found a bunch of JavaScript options, but I can’t figure out how to implement it, since Squarespace 6 file modification & storage is limited.

Thanks in advance!

Link to comment
  • 2 weeks later...
  • Replies 10
  • Views 37k
  • Created
  • Last Reply
  • 2 months later...
  • 7 months later...

I just faced this problem myself (although I needed a verification page, not a pop-up). I couldn't find a solution that satisfied my requirements. I now this post is more than 6 months old, buy I'm leaving my answer in case anyone else needs it.

You can get my code at https://github.com/cotupha/octli

It has the javascript necessary, as well as other files that serve as example demonstraiting how to use the javascript. It is explained how to do it without activating developer mode (which was a requirement of my client).

Link to comment
  • 5 months later...
  • 6 months later...

@cotupha thank for sharing, I'm having difficulties implementing your code on squarespace platform, is it possible for you to explain the steps in to implement. Any help greatly appreciated!

Link to comment
  • 2 months later...
  • 2 months later...

@cotupha (or anyone else) Would you be able to help me get this set up? I'm a bit confused on a couple of the steps. I'd be willing to pay you for your time.

Link to comment
  • 2 months later...

"... It is explained how to do it without activating developer mode (which was a requirement of my client)..."

For those confused, it took me a minute of confusion as well, but according to Cotupha's instructions you would still have to set up the age verification code outside of squarespace. The first two steps wouldn't be possible with squarespace hosting as-is (non developer mode).

As it stands – I don't see any solution on the boards for an age verification that isn't just a cover page.

Link to comment
  • 1 year later...
  • 1 year later...

I built a simple age-gate solution for Squarespace. It's available here:


There's a small one-off charge to use it on your site. If you need a more advanced or customised solution, we can build these too.


Squarespace Expert & Professional Developer

About me: I'm Paul. A SQSP User for 18 yrs, I've been a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee fuels my work.

Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.