Master Invictus

Guide

What an HTML age verification popup contains

27 November 2026

An age verification popup can be one HTML block you paste into a page. The Age Gate Builder writes that block for you. It is a self-declaration: Yes and No, or a date of birth. It is not an identity check, and this page is not legal advice.

What the block contains

The copied snippet is HTML and script together. It does not load a file from this site when a visitor opens your page. The settings you chose (minimum age, wording, colours, logo, remembered days, and where a "no" goes) are already in the block.

  • The minimum age is a whole number from 1 to 99. The form starts at 18.
  • The answer is Yes / No, or a date of birth. A date is checked in the visitor's browser: the year has to fall between 1900 and this year, the calendar date has to be real, and it cannot be in the future. The age drops by one when the birthday has not happened yet this year. The date is not stored.
  • A pass sets agb_pass=1 on the visitor's browser (path=/, SameSite=Lax). Above 0 remembered days, it also sets max-age to days times 86400. The builder's page says that 0 asks again each time the browser is reopened.
  • The free block includes a line of text, "Age gate by Age Gate Builder", linking to the builder page. That is a link the visitor can follow. The popup does not request this site on its own.

Colours are a six-digit hex value. A bad value falls back to the builder's defaults (a near-black cover, a white box, dark text, a blue button). The logo and the "no" redirect have to be a safe address: https, or http for the redirect, or a path that starts with a single slash. A javascript: address is dropped.

Where the block goes

Paste it once, in the template every page uses, on the line just above </body>. The builder's page spells that out for Shopify (layout/theme.liquid), WooCommerce (a footer code box), Squarespace (Code Injection, Footer, on plans that include it), Webflow (Site settings, Custom code, Footer, on plans that include it) and any other site.

Suggestion lists for "age verification popup html" include "html code", "html css" and "html example". The snippet is that example, already filled in. You do not keep a separate stylesheet: the colours are in the block. "pop-up or popup" also comes back, which is a spelling note, not a second product.

Platform steps in more detail: Shopify and WooCommerce.

What the builder records

Opening the builder sends a page view to this site. Pressing Copy the snippet sends a product use, because that button is marked for it. Both go out as a beacon (POST /api/t) with the page address, the site that linked here, a campaign tag if the link had one, and a width class: under 640 pixels, under 1024, or wider. The beacon does not include the words you type. Scrolling records depth at 25, 50, 75 and 100 percent. A click records where it landed, as percentages, plus the element's tag, id or class, and not the text. If the browser sends Do Not Track or Global Privacy Control, the script stops before sending, and the server drops a beacon that still arrives with that signal. The privacy page is the full account.

All guides

Back to the home page