Use the age gate to require visitors to confirm their age

In short. The age gate is a modal that overlays your site for first-time visitors and asks them to confirm their age. Once confirmed, SGEN stores a cookie for however many days you choose and skips the gate on every return visit until that cookie expires. Go to Settings → Age Verification, tick the checkbox, set a cookie duration, and save.
On this page: What this is for · Examples · What NOT to use this for · Scope · Fields · Steps · Tips · Troubleshooting · Compliance · Customization · Localization · Cross-feature interactions · Visitor experience · Cookie details
How to set up age verification in SGEN
Enable the age gate in Settings → Age Verification. Once it is on, every first-time visitor sees a modal before any page content loads. SGEN stores their choice in a browser cookie for however many days you configure. They bypass the modal on every return visit until that cookie expires or they clear their browser data.
What is this for?
Use the age gate when your site sells or displays content that is legally restricted by age in your market — alcohol, cannabis, tobacco, adult content, or age-restricted gaming. The gate is not a hard enforcement mechanism (a visitor can click "No" or lie about their age), but it is the standard compliance signal for your industry and satisfies most regional age-verification guidelines for consumer-facing sites.
Examples
Example 1: New product launch. A visitor arrives at your new age-restricted product page for the first time. The age gate overlays the entire page with a modal asking them to confirm they are 18 or older. The visitor clicks "Yes, I am 18 or older." SGEN sets a 30-day cookie. For the rest of that month, every page on the site loads without the modal.
After the visitor clicks "Yes, I am 18+", the modal disappears and every page on your site loads without interruption for the next 30 days.
Example 2: Cannabis dispensary resetting the gate for a returning visitor. Your site's age gate is set to 7 days. A regular customer cleared their browser cookies, so the modal appears again on their next visit. They confirm, and the 7-day clock resets from that moment. You do not need to do anything on the admin side — this is fully automatic.
After you save, new visitors see the gate. Existing visitors whose cookie has not expired pass through without seeing it.
Example 3: QA-testing your age gate before a product launch. You have already clicked through the modal today, so your own browser has the age_verified cookie set and the gate does not appear when you preview the site.
Reset your own age gate by visiting this URL while logged into your admin: yoursite.com/do_actions/remove_age_verification. After loading that URL, reload your homepage and the gate modal should appear again. This is the fastest way to re-test the full gate flow without clearing all your browser cookies.
What NOT to use this for
- Hard age enforcement — the age gate is a modal click, not an identity check. A visitor who lies about their age bypasses it. For markets requiring verified identity proof (some US states for cannabis, for example), you need a third-party identity-verification integration, not SGEN's built-in age gate.
- Login-gating content — if you want to restrict content to registered users, that is a user account / role feature, not the age gate. The age gate affects anonymous visitors before they ever log in.
- One-time consent banners for cookie law — the age gate only sets the
age_verifiedcookie. It is not a GDPR/CCPA cookie-consent banner. Those are separate tools (look under Settings → Tracking Consent).
Scope
- Applies site-wide — every public page shows the age gate modal to visitors who have not yet confirmed.
- Does not apply to the admin area or to logged-in SGEN admin users.
- The confirmation is stored as a browser cookie per domain — a visitor who confirms on your retail site must confirm again on a separate subdomain or domain.
- The gate does not perform identity verification — it records a click, not a proof of age. Treat it as a soft compliance signal, not a legal guarantee.
- Disabling the feature in Settings → Age Verification removes the gate immediately — existing cookies on visitors' browsers are not cleared.
Fields
| Setting | Where to find it | What it controls |
|---|---|---|
| Enable age verification | Settings → Age Verification | Turns the age gate on or off site-wide |
| Minimum age | Settings → Age Verification | The age threshold shown in the modal headline |
| Cookie expiration (days) | Settings → Age Verification | How many days before a confirmed visitor sees the modal again |
| Gate background image | Appearance → Theme Editor | Optional background image for the modal overlay |
| Restricted content message | Appearance ��� Theme Editor | The body copy displayed inside the modal |
How this connects to other features
- Settings → Age Verification — cookie expiry duration is set here. The age gate is off by default; enable it and configure the duration from this panel.
- Appearance → Theme Editor — your active theme controls the modal's visual design, headline text, and button labels. SGEN handles the cookie mechanics; the theme handles how the gate looks.
- Settings → Tracking Consent — the age gate and the tracking consent banner are separate cookies and separate settings. Both can be active on the same site simultaneously. They do not conflict.
- Analytics — age gate page loads still count as page views in SGEN Analytics. The gate modal appearing does not suppress a page view record; only the visitor's departure from the site before confirming would result in a shorter-than-average session.
Before you start
- Confirm that your SGEN plan includes the Age Verification feature (available on all plans as of SGEN 3.0).
- Decide on a cookie duration that suits your audience. A 1-day default means returning visitors see the modal every day, which is too aggressive for most use cases. 30 days is typical for alcohol and cannabis verticals.
- Ensure your theme's age-gate modal is styled before enabling the feature — the default built-in modal is functional but unstyled beyond SGEN defaults.
Where to go
- Open your SGEN admin.
- Navigate to Settings in the left sidebar.
- Click Age Verification.
Steps
1. Enable the age gate and set the cookie duration
On the Settings → Age Verification page, tick Enable age verification and enter the number of days for the cookie.
Click Save Changes.
2. Verify the gate appears for a new visitor
Open your site in a fresh browser window (Incognito / Private mode works well). Your homepage should immediately show the age gate modal.
3. Confirm the cookie is set after the visitor confirms their age
After clicking the confirm button, reload your site. The modal should not appear on the second load. If you open your browser's developer tools → Application → Cookies, you will see an age_verified cookie set to 1 with an expiry matching your configured duration.
4. Test the reset flow
To re-test the gate without clearing all your browser cookies, visit: yoursite.com/do_actions/remove_age_verification
This deletes only the age_verified cookie. Reload your homepage and the modal appears again. This is safe to share with your team as a QA step.
5. Configure minimum age, heading, and body text
Open Site Tools → Home Actions → Age Verification at /sg-admin/home-actions/age-verification. Set the Minimum age (e.g. 18 or 21), customize the Heading and Body text shown to first-time visitors, and pick the Storage duration. Click Save. The gate goes live immediately for new visitors.
6. Test both visitor paths
Open your site in a private window (no cookies). The age gate modal should appear on first load. Test both paths: confirm age (modal closes; site loads), then use the reset URL and test decline (visitor is redirected away or sees a denial message — depends on your config).
The complete flow
What success looks like
A visitor who confirms their age sees your site content immediately — no modal, no delay — for every page they visit within the cookie duration. The modal appears again only when the cookie expires or the visitor clears their browser data.
From your side as admin, there is no submission row or log entry for age gate confirmations. The feature is entirely cookie-based and leaves no server-side record. To verify it is working, use the Incognito / private window test described in Step 2.
Tips
- Match the minimum age to your jurisdiction. Alcohol is commonly 21 in the US, 18 in many EU countries. Cannabis varies further. Check local law.
- Keep the body text plain. "You must be 21 or over to enter this site" reads well. Avoid legalese — visitors who do not understand will leave.
- Set storage duration carefully. 30 days is the default. Shorter than 7 days frustrates returning visitors; longer than 90 days may not satisfy auditors.
Troubleshooting
- The modal never appears even for new visitors — confirm the feature is enabled in Settings → Age Verification. Then confirm your theme renders the age gate modal template. If your theme predates SGEN 3.0, it may not include the modal template file; contact SGEN support to get the current template snippet.
- The feature is enabled but nothing shows — check the storage cookie. If your test browser already accepted the gate, it will be skipped. Open a private window to test with no cookie present.
- The modal appears on every visit regardless of whether the visitor clicked confirm — the confirm button may not be saving the visitor's choice. Test in a fresh private window: click confirm, close the modal, reload the page. If the modal appears again immediately, the theme's confirm button is not wired correctly; contact your theme developer or SGEN support.
- Visitors report seeing the gate every visit — storage duration may be set too low, or the visitor's browser is in a privacy mode that blocks cookies. In that case, the gate shows on every session.
- The modal appears after a few hours even though your duration is set to 30 days — the visitor is probably using a browser privacy mode (Safari ITP, Firefox strict mode) that caps cookie lifetimes. This is a browser-side constraint and cannot be overridden by the site.
- The gate accepts a click without verifying age — this is by design. The modal collects an attestation, not a government ID. Anti-fraud beyond attestation is not in scope for the age gate; if your jurisdiction requires hard verification, you need a third-party age-verification service.
- Your own browser keeps showing the modal despite clicking confirm — clear your browser cookies for your domain, then click confirm again. If the gate still will not stay dismissed, file a support ticket.
- Confirm and Decline buttons do nothing — a JavaScript error is blocking interaction handlers. Open the browser console; look for an error from the gate's component.
- The redirect-on-decline destination shows a redirect loop — the destination URL is itself age-gated. Pick a non-restricted URL.
Next step
Once the age gate is working for new visitors, confirm that the rest of your theme's styling matches your brand. See Appearance → Theme Editor for customizing the modal text and buttons.
FAQs
Q: Does the age gate count as legal age verification? No. The gate collects an attestation, not a verified identity. Treat it as a compliance signal, not a substitute for ID verification where law requires.
Q: Can I show different gates per page? No. The gate is site-wide once enabled. For per-page restriction, use page-level access controls.
Q: What happens to the visitor who declines? By default, they are redirected away from the site. The redirect URL is configurable in the same panel.
Compliance considerations
- The age gate is an attestation modal, not a verified-identity check. For markets that require government-ID verification (some cannabis jurisdictions, some adult content), pair this with a third-party verification service.
- The decision is stored in a first-party cookie. Visitors with cookies disabled cannot persist the decision and will see the gate every visit.
- Some privacy regulations require a record of consent. The age gate itself stores no server-side record of each visitor's decision — if your jurisdiction requires one, implement a server-side logging layer or use a dedicated consent-management platform.
- The redirect-on-decline destination should be a non-restricted URL. Common choice: a generic landing page explaining the age requirement.
Customization beyond defaults
- The modal's branding inherits the active theme's typography and colors. Override via Custom Codes if you need a different look.
- Body text supports basic HTML — line breaks, emphasis, links. Avoid embedded scripts.
- The Confirm and Decline button labels are configurable. Localize them per market.
- A timer-based delay before the gate appears is not supported — the gate fires on first paint to avoid showing restricted content briefly.
Comparison with other gating mechanisms
Pick the right tool for the use case:
- Age gate — first-time visitor sees a modal asking for age confirmation. Decision stored client-side. Best for content restricted by age but not by paid access.
- Site Protection (password) — site-wide password barrier. Visitors enter a shared password to enter. Best for staging sites and pre-launch previews.
- Page-level access controls — per-page visibility based on logged-in role. Best for member-only content within an otherwise public site.
- Geo restriction — block visitors from specific countries. Best for regulatory compliance (e.g. blocking jurisdictions where the product cannot be sold).
- Tracking Consent — does not block access; only governs what tracking the visitor accepts. Pair with age gate when both apply.
Implementation patterns
Common patterns observed on SGEN sites with age-gated content:
- Cannabis dispensary site — age gate at 21, geo restriction to legal states, tracking consent banner. Three layers, each running independently.
- Wine shop — age gate at 21 (US) or 18 (EU). The threshold is a single site-wide value; operators in multi-market territories typically set it to the highest applicable threshold.
- Adult content site — age gate at 18, plus per-jurisdiction additional verification where required by law (third-party service integration).
Operational checklist before going live
- [ ] Minimum age matches your jurisdiction's legal threshold.
- [ ] Decline redirect destination is a non-restricted URL.
- [ ] Body text is in the visitor's primary language (or fallback English).
- [ ] Storage duration matches your privacy policy.
- [ ] Test in private window confirms gate appears.
- [ ] Test in private window confirms decline path redirects correctly.
- [ ] If your jurisdiction requires a server-side record of each visitor's consent decision, confirm your compliance solution is in place (the age gate itself stores no server-side record).
Edge cases
- Visitors arriving from a deep link (e.g. a product page URL) see the gate before the page renders. Their original destination is preserved; confirming sends them to the requested page, not the homepage.
- Search engines crawling the site see the gate the same way visitors do. Some search engines respect the noindex directive applied to gated pages — confirm SEO impact in your search console.
- Visitors using browser-level age-gate extensions may bypass the gate. The site cannot detect or override these extensions.
- Visitor disables JavaScript — gate cannot render. The site loads without the gate. Mitigate with a server-side noscript fallback (
). - Visitor uses an embed widget on a third-party site — the embedded content does not inherit the parent site's gate. If your site allows embed, evaluate whether the embedded content carries gating.
- Visitor's browser blocks cookies entirely — gate runs every page load. Annoying but not a security issue.
- Visitor passes the gate, then closes the browser, then returns — within the storage duration, gate is bypassed.
Localization
The age gate heading, body text, and button labels are plain text fields — you can write them in any language. For multi-language sites, the modal's language depends on your theme's language-switching implementation; the age gate itself stores no per-visitor language preference. Set the body text and button labels to match your primary audience, and consult your theme documentation for multi-language modal support.
Backward compatibility
Existing visitors who have already accepted the gate continue to bypass it through their stored cookie. Changes to the gate (minimum age, body text, button labels) only affect:
- New visitors who have never seen the gate.
- Returning visitors after their stored cookie expires (per the Storage duration setting).
- Returning visitors who explicitly clear the cookie.
To force every visitor to re-confirm, you would need to clear all existing age_verified cookies — there is no built-in "invalidate all decisions" control. Contact SGEN support if you need a bulk reset.
Performance
The age gate is lightweight — it consists of a small cookie check and a theme-rendered modal. Subsequent visits where the cookie is present add no visible overhead. The gate logic runs before page content renders to avoid briefly exposing restricted content.
Cross-feature interactions
- Tracking Consent: if both are enabled, the age gate appears first; the tracking consent banner appears after age confirmation. Visitors who decline age verification never see the consent banner.
- Site Protection (password): if both are enabled, the password gate appears first; the age gate appears after password entry. Two layers of access control with independent decisions.
- Page-level access controls: the age gate is site-wide. Per-page controls operate on top of it for member-only or paid content.
- Geo restriction: if both are enabled, geo-blocked visitors never reach the age gate. The gate runs only for visitors in allowed regions.
Visitor experience extended
- Direct landing on the homepage. Gate appears before page content renders. Visitor confirms; gate dismisses; homepage renders normally.
- Direct landing on a deep page. Gate appears the same way. After confirmation, the originally-requested deep page renders, not the homepage. The visitor's intended destination is preserved.
- Returning visitor within storage window. Cookie is read; gate skips; page renders normally.
- Returning visitor after storage expires. Gate appears again; visitor re-confirms; cookie refreshes.
- Visitor on mobile. Gate renders as a full-screen overlay rather than a centered modal — better thumb reach and readability on small viewports.
- Visitor with screen reader. Gate is announced as a modal dialog with focus trap; the Confirm button is the focused element on appearance.
What the cookie stores
The age-gate cookie stores the minimum data needed to skip the gate on subsequent visits. No personal data, no IP, no fingerprint:
- The value
1— a presence flag that tells the theme the visitor has already confirmed.
The cookie is first-party (set by your domain), HttpOnly is set (not readable by client-side JavaScript — the theme detects the cookie server-side), and SameSite is Lax.
Custom branding extended
The age gate modal is rendered by your active theme. For styling customization, consult your theme's template files and use Custom Codes (Settings → Custom Codes) for site-wide CSS overrides. The Confirm and Decline button labels are configurable directly in the Age Verification settings panel.
Last updated 2026-04-23.
Age gate settings reference
| Setting | Location | What it controls |
|---|---|---|
| Enable age verification | Settings -> Age Verification | Turns the age gate on or off site-wide. Off by default. |
| Cookie duration (days) | Settings -> Age Verification | How many days before a confirmed visitor sees the modal again. Default 1 day; 30 days recommended for most age-restricted retail sites. |
| Minimum age | Home Actions -> Age Verification | The age threshold shown in the modal headline (commonly 21 in the US for alcohol, 18 in many EU countries). |
| Heading and body text | Home Actions -> Age Verification | Copy displayed inside the modal. Supports basic HTML; avoid embedded scripts. |
| Confirm / Decline button labels | Home Actions -> Age Verification | Configurable button labels. Localize per market. |
| Decline redirect URL | Home Actions -> Age Verification | Where visitors who decline are sent. Must be a non-restricted URL. |
| Gate background image | Appearance -> Theme Editor | Optional background image for the modal overlay. |
