Shopify sections

Shopify age verification: a self-declaration gate is not an ID check

Shopify age verification on the storefront is usually an age gate popup that asks visitors to confirm their age before they browse. Section Store's Age Gate does that and no more: a visitor clicks Yes / No or types a date of birth, and nothing is checked against an ID. That makes it a self-declaration, not age verification. Age Gate needs no purchase, takes a minimum age from 16 to 21 (default 18) and remembers the answer for 0 to 90 days.

  • Proposed placement: the header group, which puts it on every page
  • Three looks: card over the page, full screen or bottom sheet

Last checked:

Age Gate section rendered by Section Store with its sample content
Age Gate at its defaults: a card over the page with the Yes / No question, the round 18+ badge and the sample texts.

When to use it

An age gate fits shops that need a confirmation step, not proof of age

Use it when

  • Alcohol, vapes, CBD or adult productsKeep Show On at Every page so the question appears before any product. Set Minimum Age to your market's threshold within the 16 to 21 range. The {age} placeholder carries that number into the heading and the under-age message.
  • Only part of the catalogue is restrictedSwitch Show On to Tagged products only and give those products the tag age-restricted, or whatever you type into Product Tag. Only their product pages ask for an age, so visitors browsing the unrestricted range never see the gate.
  • Gated pages still need to rankThe gate is an accessible dialog laid over the page, and crawlers are not blocked. Product and collection content stays in the HTML for search engines instead of being removed or redirected.
  • Trying the setup before paying for anythingQuestion, under-age action and style can be set and checked in the live preview, then placed in the theme. No section has to be bought for this one.

Skip it when

  • The law asks for a verified ageA click on Yes or a typed date proves nothing. Where an ID check is required, use a verified check at checkout or an age check by the carrier on delivery. The gate can sit in front as a notice but replaces neither.
  • Nothing in the shop is age-restrictedAn age question on every page then only adds a step before the shop. For a general notice such as a regional shipping limit, a popup carries the message without asking anyone's age.
  • You want birthdays as customer dataThe gate has no form that sends anything to Shopify and keeps the confirmation in the visitor's browser only. To collect dates of birth, use a form that submits them, with consent for that use.

In detail

The visitor answers once and the browser keeps the confirmation for up to 90 days

Visitors always start with the question; the Preview setting only switches what the builder shows. With Question at Yes / No, the Yes button lets them in. With Date of birth, the gate asks for day, month and year and compares the date with Minimum Age. Date Order on Automatic follows the shopper's language, so US English gets month first and Chinese, Japanese and Korean get year first. DD MM YYYY, MM DD YYYY or YYYY MM DD fix one order for every visitor.

A No answer or a date below the minimum triggers When Someone Is Under Age. Show a message keeps the gate shut and offers Go back. Leave the shop redirects to Send Them To, which ships as https://www.google.com. Put your own address there before you pick this option.

Remember the Answer runs from 0 to 90 days with 30 as the default, and 0 asks again on every visit. State sits in localStorage and sessionStorage plus a cookie. What gets stored is “confirmed for age 18 until …”, never the birth date the visitor typed.

Scope follows Show On. Every page, with the block in the header group, covers the whole shop. Tagged products only covers matching product pages and nothing else, so images and titles of those products still appear on the homepage and in collections without a question.

Full screen without a background image hides the shop entirely. With the card or the bottom sheet, Overlay Opacity (default 55 %) and Background Blur (default 8 px) set how much of the shop shows through behind the question.

Builder settings

Every builder setting of Age Gate

Three rows decide how the gate behaves: Minimum Age, When Someone Is Under Age with its Send Them To address, and Show On with Product Tag. Change them in the Section Store builder before you place the block; the Age Gate block in the theme editor holds only the section picker, spacing and device toggles, none of which touch the age logic.

Content10
QuestionDate of birth asks for day, month and year (in the order of the shopper’s language) and compares it with the minimum age.
Choice: Yes / No, Date of birth
DefaultYes / No
Minimum Age
Slider, 16–21
Default18
Logo (optional)
Image
DefaultNone
Age BadgeConditionalA round “18+” mark above the heading when there is no logo.
On / off
DefaultOn
Heading{age} becomes the minimum age. Left at the English default, the texts are shown in the language of the shopper.
Text
DefaultAre you {age} or older?
Text
Text
DefaultYou must be of legal age to enter this site.
Yes ButtonConditional
Text
DefaultYes, enter
No ButtonConditional
Text
DefaultNo
ButtonConditional
Text
DefaultEnter
Small Print (optional)
Text
DefaultBy entering, you confirm that you are of legal age in your country of residence.
Under Age5
When Someone Is Under AgeShow a message: the gate stays closed and offers “Go back”. Leave the shop: the visitor is sent to the address below.
Choice: Show a message, Leave the shop
DefaultShow a message
Message HeadingConditional
Text
DefaultSorry, you can’t enter yet
MessageConditional
Text
DefaultYou must be {age} or older to visit this site.
Send Them ToConditional
Text
Defaulthttps://www.google.com
PreviewOnly changes this preview; visitors always start with the question.
Choice: Question, Under-age message
DefaultQuestion
Behaviour4
Remember the Answer0 asks again on every visit.
Slider, 0–90 days
Default30 days
Show OnTagged products only: the gate appears on product pages whose product carries the tag below, nowhere else.
Choice: Every page, Tagged products only
DefaultEvery page
Product TagConditional
Text
Defaultage-restricted
Date OrderConditionalAutomatic follows the shopper’s language (US English: month first; Chinese, Japanese, Korean: year first).
Choice: Automatic, DD MM YYYY, MM DD YYYY, YYYY MM DD
DefaultAutomatic
Style11
Style
Choice: Card over the page, Full screen, Bottom sheet
DefaultCard over the page
Alignment
Choice: Center, Left
DefaultCenter
Background Image (optional)
Image
DefaultNone
Overlay Color
Colour
Default#1c1b19
Overlay OpacityFull screen without an image always covers the page completely.
Slider, 0–100 %
Default55 %
Background BlurConditional
Slider, 0–20 px
Default8 px
Card ColorConditional
Colour
Default#ffffff
Text ColorConditional
Colour
Default#1c1b19
Button Color
Colour
Default#1c1b19
Button Text Color
Colour
Default#ffffff
Corner Radius
Slider, 0–32 px
Default18 px

30 settings in 4 groups. These are settings in the Section Store builder, not theme editor settings: read from the app's section configuration, as of 2 Dec 2026. "Conditional" settings appear only once a related setting turns them on.

Two ways

Hand-coding the gate means owning the expiry, under-age and scope logic

A yes/no dialog with a stored expiry is a small piece of theme code. Date of birth, per-language texts and a product-tag scope are where a hand-built gate grows.

Way 1

By hand in the theme code

Untested outline, not a finished listing. Partly feasible: the yes/no dialog is small; the date-of-birth check, date order per language and translations are the hard part.

  1. Render a snippet with a dialog element from layout/theme.liquid so it is on every page.
  2. On load, read a localStorage entry with an expiry date and open the dialog only when it is missing or expired.
  3. Wire the Yes button to store the confirmation with its expiry and close the dialog.
  4. Wire the No button to show an under-age message or redirect.
  5. Leave the page content in the HTML and do nothing server-side that hides it from crawlers.
  6. Keep focus inside the dialog, decide what Escape does and respect reduced motion.
  7. For restricted products only, wrap the snippet in a Liquid condition on product.tags.

Choose this if: You maintain the theme code yourself, one yes/no question on every page is enough and you want no app dependency. It is also the only route for a vintage theme without app blocks.

Way 2

With the Section Store app

No theme code. Age Gate costs nothing; its saved settings sit in an app-owned metafield that the app block reads. Needs an Online Store 2.0 theme.

  1. Install Section Store and open Age Gate from the library.
  2. Set Question, Minimum Age, the under-age action and Style, check the live preview and save.
  3. Click Install in theme; the theme editor opens with the Section Store app block proposed for the header group.
  4. Confirm Age Gate is chosen in the block's section picker and save the theme.
  5. If the block ends up outside the header group, move it there following the placement guide.

Choose this if: Your theme is Online Store 2.0 and you want date of birth, the tagged-product scope, per-language texts or country limits without writing and maintaining the JavaScript.

FAQ

Legal limits, returning visitors, countries, language and page weight

Age Gate is free in Section Store.

Set it up in the app builder and place it through the Section Store app block. No theme code.

Install on Shopify

Sources

Sources