Reference → Use the age gate to require visitors to confirm their age

Use the age gate to require visitors to confirm their age

How age verification works in SGEN

The age gate is a modal that appears to every first-time visitor on your site and asks them to confirm they are old enough to view your content. Once a visitor clicks the confirm button, SGEN remembers their choice using a browser cookie for however many days you choose. They will not see the modal again until that cookie expires or they clear their browser data.

This page explains how to configure the age gate, what a visitor experiences, and how to troubleshoot the common case where the modal keeps appearing.

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 simply lie about their age), but it is the standard compliance signal for your category and satisfies most regional age-verification guidelines for consumer-facing sites.

Good use cases

Example 1: Craft spirits shop on their first visit. A visitor arrives at your whisky e-commerce site 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. Your Settings page shows the expiry was configured to 30 days.

Public site preview
https://acme-spirits.example.com

Age Verification

Are you 18 or older?

This site contains age-restricted content. Please confirm your age to continue.

By clicking YES you confirm you are of legal drinking age in your country.

After the visitor clicks "Yes, I am 18+", the modal disappears and their next 30 visits load straight into your shop.

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.

Settings — Age Verification
Dashboard / Settings / Age Verification

Settings — Age Verification

Configure how long the age gate cookie lasts

After you save, new visitors see the gate. Existing visitors whose cookie has not expired continue to pass through without seeing it.

Example 3: QA testing your age gate is working correctly. You are about to launch a new age-restricted product line and want to verify the gate appears for all fresh visitors. 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.

Public site preview
https://acme-spirits.example.com
Age gate cookie cleared.

Reload your site homepage now — the age gate modal will appear as it does for a brand-new visitor.

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_verified cookie. It is not a GDPR/CCPA cookie-consent banner. Those are separate tools (look under Settings → Tracking Consent).

How this connects to other features

  • Settings → Age Verification — the expiry duration that governs how long the cookie lasts after a visitor confirms is set there. The age gate feature is off by default; you turn it on and configure duration from that 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 your SGEN plan includes the Age Verification feature (available on all plans as of SGEN 3.0).
  • Know what cookie duration makes sense for 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/cannabis verticals.
  • Have your theme's age-gate modal styled before enabling the feature — the default built-in modal is functional but unstyled beyond SGEN defaults.

Where to go

  1. Open your SGEN admin.
  2. Navigate to Settings in the left sidebar.
  3. 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.

Settings — Age Verification
Dashboard / Settings / Age Verification

Settings — Age Verification

Step 1: turn the gate on and set duration

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.

Public site preview
https://acme-spirits.example.com

Are you 18 or older?

This site sells alcohol. You must be of legal age to enter.

3. Confirm that confirming age sets the cookie

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.

Browser cookie state after confirmation

Browser cookie state after confirmation

age_verified cookie is now set — the modal will not appear again until it expires
+ Add New
NameValueExpiryHttpOnlySameSite
age_verified130 days from nowYesLax
ci_session<session token>SessionYesLax

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.

The complete flow

Age gate — complete visitor flow

Age gate — complete visitor flow

What happens from first visit to returning visit

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.

What to do if it does not work

  • The modal never appears even for new visitors — confirm the feature is enabled in Settings → Age Verification. Then confirm your theme actually 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 modal appears every single visit regardless of clicking confirm — the confirm button may not be wired to call /do_actions/access_granted. Open your browser's developer tools and watch the Network tab while clicking the confirm button. You should see a request to /do_actions/access_granted that returns HTTP 200 with an empty body and a Set-Cookie header. If that request does not appear, the theme's button click handler is missing or misconfigured; contact your theme developer or SGEN support.
  • 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. It affects less than 5% of visitors on typical non-privacy-browser usage.
  • Your own browser keeps showing the modal despite clicking confirm — clear only the age_verified cookie, then click confirm again and verify the Set-Cookie header appears in the Network tab. If it does not appear, file a support ticket.

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.


Last updated 2026-04-23.

On this page