What It Does
The Age Verification Popup displays a full-screen modal overlay requiring visitors to confirm their age before accessing your storefront. Essential for stores selling age-restricted products like alcohol, tobacco, CBD, or adult content, this popup ensures compliance with age restrictions while maintaining a professional user experience. Visitors who confirm their age can proceed to browse, while those who decline are redirected to another URL. The popup appears once per browser session—after confirmation, the visitor won’t see it again until they close their browser or clear cookies.Getting Started
Add the Section
Add the Age Verification Popup section to your theme (typically added once in theme settings, not per-page)
Configure Message
Set your heading (“Verify your age”) and verification message explaining your age requirements
Set Button Labels & Decline URL
Customize button text (“Yes”/“No” or “I’m 21+”/“Under 21”) and set where declined visitors go (homepage, exit page, or external URL)
Settings
Image
Image
Type: Image picker
Default: Empty (no image)Upload a background image displayed behind the verification content.
Default: Empty (no image)Upload a background image displayed behind the verification content.
Image Purpose
The background image enhances visual appeal and reinforces brand identity:- Product photography: Show your products (wine bottles, craft beer, luxury items)
- Brand lifestyle: Lifestyle imagery that reflects your brand values
- Abstract/texture: Subtle patterns or textures for minimal distraction
- Logo/branding: Large logo or brand mark for recognition
Image Specifications
Recommended size: 800x1200px to 1200x1600px (portrait orientation)- Aspect ratio: 2:3 or 3:4 works well for mobile-first display
- File format: JPG (photographs), PNG (graphics with transparency)
- File size: Under 300KB for fast loading (visitors must wait for popup to load)
- Content safe area: Keep important content centered—text overlays on top
Without Image
If no image uploaded:- Popup displays content on solid background color (from theme settings)
- Simpler, faster-loading popup
- More focus on text message
Heading
Heading
Type: Inline rich text
Default: “Verify your age”Main heading displayed at top of popup. Brief, direct, and clear about the requirement.
Default: “Verify your age”Main heading displayed at top of popup. Brief, direct, and clear about the requirement.
Heading Examples
Standard age verification:- “Verify your age”
- “Age verification required”
- “Confirm your age”
- “Are you 21 or older?”
- “Must be 18+ to enter”
- “21+ only”
- “Welcome! Let’s verify your age”
- “Age check”
- “Please confirm you’re of legal age”
Best Practices
Keep it short: 2-5 words ideal (scans quickly on mobile) Be direct: Clear about what’s being asked Match your tone: Professional for alcohol/tobacco, friendlier for other products Include age if specific: “21+” more specific than “of age”Rich Text Formatting
Supports bold and italic:- Bold: “Verify your age” (emphasis)
- Italic: Less common, use sparingly
Subheading (Text)
Subheading (Text)
Type: Rich text (multiple paragraphs supported)
Default: “You must be 18 years of age or older to enter this site. Please verify your age.”Detailed verification message explaining age requirements. Supports multiple paragraphs and formatting.Links (if needed):
“Read our Terms of Service for more information.”Keep readable: 2-3 sentences max. Too much text reduces compliance.
Default: “You must be 18 years of age or older to enter this site. Please verify your age.”Detailed verification message explaining age requirements. Supports multiple paragraphs and formatting.
Message Components
A complete verification message typically includes:- Age requirement: Specific age threshold (18, 19, 21 depending on jurisdiction)
- Reason: What’s being protected (site access, product purchase)
- Action: What visitor needs to do (confirm, verify)
Message Examples
Alcohol (US - 21+): “You must be 21 years of age or older to purchase alcohol. By entering this site, you agree to our terms of use and privacy policy.”Alcohol (International - 18+): “This website sells alcoholic beverages. You must be 18 or older to access this content. Please verify your age to continue.”CBD products: “Our CBD products are intended for adults 21 and over. By clicking ‘Yes,’ you confirm you meet the legal age requirement in your jurisdiction.”Adult content: “This site contains mature content. You must be 18+ to enter. By confirming, you acknowledge you are of legal age in your location.”Multiple jurisdictions: “You must meet the legal drinking age in your country to enter this site. Legal age varies by jurisdiction (18-21 years). Please verify your age.”Legal Considerations
Include:- Specific age (18, 21, etc.)
- Reference to jurisdiction (“in your state,” “in your country”)
- Action being confirmed (“access site,” “purchase products”)
- Link to terms of use or privacy policy
- Reference to local laws
- Disclaimer about self-attestation
Rich Text Formatting
Bold for emphasis: “You must be 21 years of age or older to enter this site.”Multiple paragraphs:Show Popup on Customizer
Show Popup on Customizer
Type: Checkbox
Default: Unchecked (hidden in customizer)Controls whether the popup displays when you’re editing the theme in the Shopify customizer.
Default: Unchecked (hidden in customizer)Controls whether the popup displays when you’re editing the theme in the Shopify customizer.
When to Enable
Enable (check) when:- You’re actively editing popup content or styling
- You want to preview popup appearance immediately
- You need to test popup layout with different content
- You’re setting up popup for the first time
- You’re editing other sections (popup blocks view)
- You’ve finished customizing popup
- You’re working on navigation or other theme elements that popup would obscure
- You want to see page layout without popup interference
How It Works
Enabled (checked):- Popup displays immediately when you open Theme Customizer
- Popup refreshes/updates when you change settings
- You can see live preview of changes
- Blocks view of other sections
- Popup hidden in editor (but still shows on live site)
- You can edit other sections without popup in the way
- Popup settings still accessible in section list
Best Practice Workflow
- Enable popup visibility in customizer
- Edit content, colors, image, buttons
- Preview and refine appearance
- Disable popup visibility when done
- Continue editing other sections
- Test popup on live site (preview theme in new tab, use incognito mode)
Best practices
Clear Age Requirement
Specify exact age (18, 21, etc.) in your message. Generic “of age” creates confusion across jurisdictions with different legal ages.
Test Decline Destination
Verify your decline URL works and leads to appropriate page. Broken link creates poor experience and potential compliance issues.
Use Background Image
Background image enhances professionalism and brand recognition. Choose image that reflects your products without distracting from message.
Keep Message Concise
2-3 sentences maximum. Visitors won’t read lengthy legal text. Focus on: age requirement, what’s being verified, confirmation action.
Match Button Labels
Confirm/decline buttons should mirror each other logically. “Yes”/“No”, “Enter”/“Exit”, “I’m 21+”/“Under 21”. Avoid mismatched pairs.
Consider Legal Requirements
Consult legal counsel about age verification requirements in your jurisdiction. Popup provides basic gate but may not satisfy all regulations.
Test in Incognito Mode
Test popup behavior in private/incognito browser window to simulate first-time visitor experience. Check appearance, message clarity, buttons.
Mobile-First Design
Preview popup on mobile devices. Ensure text readable, buttons tappable, image doesn’t obscure message. Most visitors use mobile.
Common Use Cases
Alcohol Store (US, 21+)
Message: “You must be 21 years of age or older to purchase alcohol. By entering, you agree to our Terms of Service.” Buttons: “I’m 21+” (confirm), “Under 21” (decline) Decline URL:https://www.google.com (external redirect since entire store is age-restricted)
Image: Product photography of wine/beer bottles, or lifestyle image of social gathering
Best for: Dedicated alcohol retailers, wine shops, breweries
CBD/Hemp Products (21+)
Message: “Our CBD products are for adults 21 and over. By clicking ‘Enter,’ you confirm you meet the legal age requirement in your jurisdiction.” Buttons: “Enter” (confirm), “Exit” (decline) Decline URL:/pages/cbd-policy (info page explaining regulations)
Image: Hemp leaf imagery, product photography, or natural/botanical visuals
Best for: CBD stores, wellness shops, dispensaries
Tobacco/Vaping (18+)
Message: “This website sells tobacco and vaping products. You must be 18 or older to access this site. Please verify your age.” Buttons: “Yes, I’m 18+” (confirm), “No, I’m under 18” (decline) Decline URL:https://www.cdc.gov/tobacco/ (educational resource)
Image: Product photography (vapes, accessories), abstract smoke textures
Best for: Vape shops, tobacco retailers
Adult Content or Mature Products (18+)
Message: “This site contains mature content intended for adults. You must be 18 years or older to enter. By confirming, you acknowledge you are of legal age.” Buttons: “I’m 18+” (confirm), “Under 18” (decline) Decline URL:/ (homepage redirect, or external if site is entirely adult-oriented)
Image: Subtle, tasteful imagery that conveys maturity without explicit content
Best for: Adult novelty stores, mature gaming, collectibles with adult themes
International Store (Variable Ages)
Message: “This site sells age-restricted products. You must meet the legal age in your country to enter (typically 18-21 years). Please confirm your age.” Buttons: “Confirm” (confirm), “Cancel” (decline) Decline URL:/pages/age-policy (page explaining international age variations)
Image: Global/international imagery, or neutral product photos
Best for: International retailers with customers across multiple jurisdictions
Luxury/High-Value Items (Not Age-Restricted, but Exclusive)
Message: “Welcome to our exclusive collection. Please confirm you wish to explore our luxury offerings.” Buttons: “Enter” (confirm), “Not interested” (decline) Decline URL:/ (homepage)
Image: Luxury product photography, elegant lifestyle imagery
Best for: High-end retailers using popup for exclusivity rather than age verification (note: not for legal compliance)
Layout Behavior
Desktop Layout
The popup displays centered on screen:- Full viewport overlay: Dark semi-transparent background covers entire page
- Popup dimensions: Approximately 750px max width, auto height
- Content layout: Two-column layout on desktop (if image present)
- Left (30%): Background image
- Right (70%): Content (heading, message, buttons)
- No image: Content centered with padding
Mobile Layout
Optimized for mobile screens:- Full screen: Popup occupies full viewport height
- Single column: Image (if present) stacked above content
- Image height: ~16rem (160px) fixed height on mobile
- Content: Full-width below image
- Buttons: Full-width stacked (confirm above decline), ~2.4rem gap between buttons
- Scrollable: Content scrolls if message is lengthy
Visual Effects
Entrance animation:- Desktop: Fade + scale from 0 to 100%
- Mobile: Slide up from bottom of screen
- Duration: ~300ms
- Semi-transparent black (50% opacity)
- Blurs page content behind popup (subtle ~1.2rem blur)
- Prevents interaction with page until verified
Related Sections
- Newsletter Modal - Another modal popup (newsletter signup)
- Header - Navigation that appears after age verification
- Footer - Legal links (Terms, Privacy) often referenced in age verification
Technical Notes
Session Storage & Cookies
The popup uses browser session storage to remember verification: On confirmation:- Sets
age-verified: truein session storage - Popup won’t show again during current browser session
- Session ends when user closes browser (all tabs)
- No persistent cookies created (unlike Newsletter Modal)
- Each new browser session requires re-verification
- Private/incognito mode always shows popup
- Verification is per-browser, per-device
- User on phone must verify separately from desktop
- Not tied to customer account
Interaction Blocking
When popup is open:- Page content unclickable: All links, buttons below popup disabled
- Pointer events blocked: CSS
pointer-events: noneon body - Scroll locked: Page scroll disabled on some implementations
- Keyboard focus trapped: Tab key cycles through popup elements only
Priority Over Other Popups
Age verification takes priority:- Newsletter popup: If both age verification and newsletter modal active, age verification shows first
- Only after verification: Newsletter modal appears (if configured with delay)
- JavaScript coordination: Newsletter modal checks for
age-verifiedflag before displaying
Performance
Popup loading:- HTML renders immediately (no JavaScript delay)
- Background image lazy loads (doesn’t block popup appearance)
- Minimal CSS (~5KB)
- Total load time: < 100ms typical
- Body
pointer-events: noneuntil verification - Ensures popup can’t be bypassed by clicking behind it
- Re-enables after confirmation
Design Mode Behavior
In theme customizer:- Popup only shows if “Show popup on customizer” enabled
- Otherwise hidden but section accessible in editor sidebar
- Preview changes live when customizer toggle enabled
- Always shows to unverified visitors
- Ignores customizer toggle setting
- Session storage determines visibility
Troubleshooting
Popup not appearing on live site:- Check if you’ve already verified age in current browser session
- Test in incognito/private browsing mode (fresh session)
- Verify section is enabled in theme customizer
- Check browser console for JavaScript errors
- Session storage may be disabled in browser settings
- Privacy mode / incognito resets session on each tab
- Browser extension may be blocking session storage
- Expected behavior: User should verify once per session
- Verify “Decline Button URL” is valid (not empty)
- Check for typos in URL field
- Test decline destination URL directly (paste in browser)
- Ensure URL is relative (
/page) or full (https://...)
- Confirm image uploaded successfully in customizer
- Check image file size (keep under 500KB)
- Try different image format (JPG vs PNG)
- Verify image isn’t corrupted (open directly)
- Test on actual mobile device (not just browser resize)
- Check message length (very long text can break layout)
- Ensure button labels are short (1-3 words)
- Clear browser cache and hard reload
- Disable “Show popup on customizer” checkbox
- Popup blocks view when enabled in editor
- After disabling, popup hidden in editor but still editable in section list
- Check for theme CSS conflicts (high z-index on other elements)
- Age verification should have z-index 1000+
- Contact theme support if popup is consistently overlaid
- Choose image with darker/lighter area for text
- Consider adding semi-transparent overlay (theme-level customization)
- Test on mobile where text area is smaller
- Alternatively, remove image and use solid background