How to Add a Professional Looking Age Check to Your Shopify Store
If you sell alcohol, vapes or anything age-restricted, you need a gate before people enter the store. The apps that do this usually slow the page down.
Long story short, this is an age check popup that lives in your theme. You set the message, the minimum age and how often it comes back. No app, no extra JS from a third party.
I already have a lighter copy/paste age gate if you want the smaller version. This one has more design controls. Last tested on Dawn in 2026.
Want to see it first? Here's a live demo.
Works on Dawn, Sense, Craft, Spotlight, Taste, Refresh and most OS 2.0 themes. Download a backup of the theme first. If something breaks, you can roll back in about 10 seconds.
This tutorial is compatible only with Shopify's official free themes: Colorblock, Craft, Crave, Dawn, Origin, Publisher, Refresh, Ride, Sense, Spotlight, Studio, Taste & Trade.
Looking to install this on a premium or custom theme? Contact us.
How to add it
- From your Shopify admin, go to Online Store > Themes.
- Find the theme you want to edit, click the 3 dots > Edit code.
- Open the sections folder and click Add a new section. Name it exactly ezfy-age-verification-popup. The file name and the section name have to match, otherwise Shopify won't load it.
- Paste this code, then save. This is the whole section, schema included:
- Click Save.
- Click the 3 dots > Customize.
- Click Add section and look for Age Verification Popup. Add it to the template you want.
- Put it in the header so it loads on every page.
- Set the minimum age and the message, then save.
- Save the theme.
If you prefer Shopify's own editor docs, they cover Edit code here: Edit your theme code.
How to customize it
Set the title, the body text and the confirm button. Match the minimum age to whatever you sell. There's a cookie setting for how long someone stays verified, so they don't see it on every click.
Fonts, colors and layout are in the section settings. Keep the copy boring and clear. Cute age gates get ignored.
If you want something smaller with less settings, use the code-only age gate instead.
If the popup doesn't show up
Check the section file name. It has to be ezfy-age-verification-popup.
Add it in the header, not only on one template, unless you only need it on specific pages.
If it showed once and then vanished, that's the cookie. Open a private window to test again.
If you get stuck, tell me which theme you're on. That usually solves it.
Subscribe for Shopify researches, tips & guides
Get high quality posts about Shopify insights. No spam, unsubscribe anytime.