Skip to main content

Managing the Age Gate for Your Website

How to edit, disable, and reactivate the age gate for your Treez Ecommerce site

Written by Treez Support

Overview

An age gate is a digital checkpoint that verifies a visitor’s age before allowing them to access your website. Depending on your configuration, visitors may confirm that they meet the minimum age requirement or enter their full date of birth.
​
Treez Ecommerce supports both global and location-based age gates:

  • The global age gate applies when a visitor enters your main website before selecting a store.

  • A location-based age gate lets multi-store operators configure different age gate types and minimum ages for individual stores.

Location-based configuration is especially useful when your stores operate in jurisdictions with different age-verification requirements. For example, one store can require full date-of-birth entry while another uses a simple age confirmation. Each store can also enforce its appropriate minimum age, such as 18+ or 21+.

How age gates are shown to visitors

The age gate a visitor sees depends on how they enter your website:

  • Main website URL: The visitor first completes the global age gate. After selecting a store, the visitor will also see that store’s custom age gate if one is configured.

  • Store-specific URL: If the selected store has a custom age gate, the visitor sees only that age gate and then proceeds directly to the store.

  • Store without a custom age gate: The global age gate continues to apply.

How to Edit Your Treez Ecommerce Site's Age Gate

  • Login to your Treez Ecommerce content management system (CMS), Prismic

  • Filter by the “Age Gate” custom type, or search "Age Gate" in the upper right search bar

  • Click on Age Gate to edit the document.

  • Update the age gate using the available customization options.

  • Select Save, then Publish.

  • Open your Treez Ecommerce site in an incognito or private browser window to verify the changes.

Age Gate Customization Options

  • Add or remove a background image, or change the background color

  • Change the age gate Type and minimum Allowed Age to meet your operation's requirements.

    • Selecting the Simple type allows your website visitors to simply click to agree that they meet your minimum Allowed Age requirement to proceed.

    • Selecting the Date of Birth type will require that your website visitors enter their full date of birth in order to validate their age before proceeding.

  • Update the Agreement Text and/or the Button Text

Publishing Your Age Gate Changes

Once you've customized your site's Age Gate to your liking, click Save and then Publish in the upper right corner.

Then, refresh your Treez Ecommerce site to verify that you see the chances reflected correctly.

How to Configure a Location-Based Age Gate


Create a separate age gate slice for each store that needs a custom configuration.

  1. Log in to Prismic.

  2. Find and open the Age Gate document.

  3. In the document’s slice area, add a new Age Gate slice.

  4. Configure the Location Slug to which the custom age gate should apply. You may apply 1 or multiple location slugs per custom age gate.

  5. Choose the age gate Type:

    • Simple for age confirmation.

    • Date of Birth for full date-of-birth collection.

  6. Set the store’s minimum Allowed Age, such as 18 or 21.

  7. Customize the background, agreement text, and button text as needed.

  8. Repeat these steps for each store that requires a different configuration.

  9. Select Save, then Publish.


​Important: Each custom age gate should be assigned to the correct store. Stores without a custom configuration will continue to use the global age gate.
​
​

Testing your configuration

After publishing, test each applicable visitor path in an incognito or private browser window.
​
​Test the main website URL

  1. Open the main website URL.

  2. Confirm that the global age gate appears.

  3. Complete the global age gate.

  4. Select a store with a custom age gate.

  5. Confirm that the store’s custom age gate appears and uses the correct verification type and minimum age.

Test a store-specific URL

  1. Open the direct URL for a store with a custom age gate.

  2. Confirm that only the store’s custom age gate appears.

  3. Complete the age gate and verify that you are taken directly to the correct store.

Also test a store without a custom age gate to confirm that the global configuration is applied as expected.

Disabling Your Age Gate

If you are using Treez Ecommerce in tandem with another website platform, you may already have an age gate setup. To avoid friction in your shopper experience, we've made it easy to disable the Treez Ecommerce age gate as needed.

  1. In your Treez Ecommerce CMS, find the Age Gate module in the Work (published pages) tab.

  2. Click the checkbox to the left to select the Age Gate module, then click the Archive icon in the upper right, to the left of the search bar.

  3. You will then see a status bar appear at the bottom of the page, with a 5 second countdown until the module is archived. (You may click cancel at this time if you're having seconds thoughts about removing the age gate.)

  4. You'll see a success message appear once the age gate has been archived.

  5. Navigate to the Archived tab to verify that you now see the age gate in the list.

  6. Voila! If you open your site in an incognito window or a new browser, you should no longer see an age gate for new visitors.

Reactivating Your Age Gate

If you previously disabled your age gate and now need it back, no problem! The process to reactivate it is similar to the process to disable it.

  1. In your Treez Ecommerce CMS, find the Age Gate module in the Archived tab.

  2. Click the checkbox to the left to select the Age Gate module, then click the Publish Now icon in the upper right, to the left of the Archive icon and search bar.

  3. You will then see a status bar appear at the bottom of the page, with a 5 second countdown until the module is published. (You may click cancel at this time if you're having seconds thoughts about reactivating the age gate.)

  4. You'll see a success message appear once the age gate has been published.

  5. Navigate to the Work tab to verify that you now see the age gate in the list of published pages and modules.

  6. Voila! If you open your site in an incognito window or a new browser, you should now see the same age gate that will appear for all new visitors.

Troubleshooting
​
If an age gate does not appear as expected:

  • Confirm that the Age Gate document was saved and published.

  • Confirm that the custom age gate is assigned to the correct store.

  • Verify the store-specific URL used during testing.

  • Test in an incognito or private browser window to avoid previously saved age-verification settings.

  • Confirm that the configured age gate type and minimum age are correct for the location.

Did this answer your question?