On this page
Important Notice: This content is for educational purposes only. Results may vary based on your specific business circumstances, industry, market conditions, and implementation. No specific outcomes are guaranteed.
Start with what it is not
Stores selling wine, spirits, vaping products and other age-restricted goods often add a popup that asks visitors whether they are old enough to enter. It is worth being precise about what that popup is. It is a question. Anyone can click Yes. It checks no ID, no date of birth and no document, and it cannot tell a sixteen year old from a sixty year old.
That does not make it useless. It signals who your store is for, and it sets expectations before anyone browses. But it is not age verification in any legal sense, and nothing in this guide is legal advice. What the law requires depends on your products and where you sell, and in some places it requires far more than a click-through question.
With that understood, the Shopify age verification popup generator writes a clean click-through gate for your theme, and says the same thing on the page.
Where real checks happen
If your products need a genuine age check, it usually has to happen at a point where identity can be confirmed: at checkout, through an age verification service, or on delivery, when a carrier checks ID before handing over the parcel. Your theme is not involved in any of those. Shopify checkout is not part of your theme, so a popup in theme.liquid never appears there, and a shopper following a direct checkout link never sees it at all.
So treat the popup as the front door sign, and handle any legal requirement where it can actually be enforced. Your terms of service are also a sensible place to state your age policy; the terms of service generator can help draft them.
Setting up the gate sensibly
- Ask a clear question. "Are you 21 or older?" with Yes and No buttons is easier to answer than a paragraph of legal wording.
- Decide what No does. Either send the visitor to another site or show a short message and keep the store covered. Do not quietly let them in anyway.
- Choose how long to remember. Asking on every page is irritating; asking once and never again is too loose. Remembering the answer for a few weeks in the shopper's browser is a common middle ground. Private windows and cleared browsers will be asked again.
- Make it keyboard friendly. The Yes button should take focus when the gate opens, so it can be answered without a mouse, and the Tab key should stay inside the card. The Escape key should not close it, or the gate is one key press from pointless.
- Keep it fail-safe. If the browser blocks storage, the gate should still open and close normally and simply ask again next time, never lock the visitor out.
What about search engines?
A popup drawn over the page does not remove the page from the HTML. Search engines read the content underneath as usual, so a click-through gate does not stop your products from being indexed. That is normally what you want. It also means the gate is not a way to hide anything from the public.
Installing it
- Duplicate your theme and open Edit code on the copy.
- Open layout/theme.liquid and paste the generated block directly after the opening body tag, so it covers every page using the main layout.
- Preview in a private window to see the gate as a first-time visitor would, and try both buttons.
- Publish, then check your checkout and delivery arrangements separately if your products need a real age check.
If you are launching a store in an age-restricted category, add the gate and the checkout arrangements to your launch list; the store launch checklist covers the other steps.
Next step
Find out what your products require where you sell, arrange any real checks at checkout or delivery, then add a click-through gate for the storefront with the age verification popup generator.
Nudgesmart does not provide age gates. Once visitors are through the door, it builds on-site popups from ready-made templates, grouped by industry and campaign type.
Tags
- age-verification
- age-gate
- shopify-theme
- age-restricted
- alcohol