Dashboard

Age Gate

The VerifyHuman Age Gate prevents underage visitors from accessing restricted content on your Shopify store. It displays a full-screen overlay requiring visitors to confirm their age before they can view products or pages.

How It Works

When a visitor lands on a page protected by the age gate:

  1. A full-screen overlay blocks the page content.
  2. The visitor enters their date of birth (MM/DD/YYYY format).
  3. If the visitor is below the minimum age, they are redirected to a configurable URL (default: google.com).
  4. If the visitor meets the age requirement:
    • With selfie required: The visitor proceeds to a camera step where they take a selfie for AI-based age estimation via the VerifyHuman API.
    • Without selfie (attestation only): The visitor's self-declared age is accepted and recorded as an attestation. No API key is required for this mode.
  5. On success, the overlay is removed and the visitor can browse freely for the configured session duration.

Session Persistence

Rate Limiting

The age gate enforces a maximum of 5 verification attempts per hour. If a visitor exceeds this limit, they see a "Too Many Attempts" message and must wait before trying again.

Trigger Modes

The age gate supports four trigger modes, configured in the Shopify Theme Editor:

All Pages (Entire Store)

Every page on the store shows the age gate overlay.

Product Tag

The age gate appears only on product pages where the product has a specific tag.

Collection Tag

The age gate appears on collection pages and product pages when the product belongs to a tagged collection.

Specific Page Handles

The age gate appears only on pages whose handles match a comma-separated list.

Theme Editor Settings

All settings are configured in the Shopify Theme Editor under VerifyHuman - Age Gate (an app embed block targeting the <head>).

Setting Type Default Description
Enable Age Verification Checkbox true Master toggle for the age gate
Apply Age Gate To Select all_pages Trigger mode (see above)
Product Tag Text age-restricted Tag to match in Product Tag mode
Collection Tag Text age-restricted Tag to match in Collection Tag mode
Page Handles Text (empty) Comma-separated handles for Specific Pages mode
Minimum Age Range 18 Minimum age (18-25)
Use Case Select adult Industry context: Adult, Tobacco, Alcohol, Cannabis, Gambling
Require Selfie Verification Checkbox true Whether to require a selfie or accept attestation only
Session Mode Select guest Guest (session-based) or Profile (customer account)
Redirect URL for Underage Users URL https://www.google.com Where underage visitors are sent
Session Duration Select 24 hours How long verification is remembered (1h to 1 week)
Custom Message Text (empty) Optional message on the verification overlay
Logo Image Picker (empty) Optional logo on the verification overlay

Dashboard Settings (Advanced Mode)

When using the VerifyHuman dashboard in Advanced Mode, additional age gate settings are available:

Setting Default Description
Age Gate Enabled false Enable/disable age verification
Verification Mode guest Guest or Profile mode
Minimum Age 18 Required minimum age
Use Case adult Industry context for the age check
Scope store Entire Store, Specific Collections, or Specific Products
Session Duration (Hours) 24 Session validity in guest mode
Require Selfie true Whether selfie verification is required
Underage Redirect URL (empty) Custom redirect for underage users
Custom Message (empty) Overlay custom text
Logo URL (empty) Overlay custom logo

Verification Modes

Attestation Only (No Selfie)

When Require Selfie Verification is disabled:

Selfie Verification

When Require Selfie Verification is enabled:

UX Flow

Step 1: Date of Birth Entry

Step 2: Selfie (if required)

Step 3: Result

API Endpoints

POST /api/verify-age

Called by the age gate widget to perform verification.

Request body:

{
  "date_of_birth": "1990-01-15",
  "selfie_b64": "<base64 image data>",
  "min_age": 18,
  "use_case": "adult",
  "mode": "guest",
  "customer_id": "optional-customer-id",
  "attestation_only": false
}

Response (success):

{
  "success": true,
  "verified": true,
  "estimated_age": 28,
  "verification_id": "vh_abc123"
}

Response (attestation mode):

{
  "success": true,
  "verified": true,
  "mode": "attestation",
  "verification_id": 42,
  "message": "Age attestation accepted (selfie verification not required)"
}

Testing the Age Gate

  1. Enable the age gate in the Shopify Theme Editor (Customize > App Embeds > VerifyHuman - Age Gate).
  2. Set the trigger mode to match your scenario (e.g., Product Tag mode with a test product tagged age-restricted).
  3. Visit the page in an incognito/private browser window to ensure no cached session exists.
  4. Enter a valid date of birth above the minimum age and verify the overlay is removed.
  5. Enter an underage date of birth and verify you are redirected to the configured URL.
  6. Test selfie mode (if enabled) by allowing camera access and completing the photo capture flow.
  7. Test session persistence by refreshing the page after successful verification to confirm the overlay does not reappear.
  8. Test max attempts by failing verification 5 times and confirming the blocked state appears.

Test Mode

When test mode is enabled for your shop domain, all API responses include a _test_mode: true flag. This allows you to test the full flow without affecting production verification counts. See Reviewer Test Mode for details.