Skip to content
2018–2024

140+ age gates from one hosted service

One service behind 140+ age gates, with rules for 98 countries, built and run by us from 2020 to 2024.

age gates
140+
countries with their own age rules
98
language and region versions
83

The challenge

Every website for an alcohol brand needs an age gate. A large drinks group runs brand, campaign and corporate sites in many countries.

When each site builds its own gate, the behavior, the legal rules and the tracking drift apart, and every change needs a developer.

Our role

We maintained the earlier gate from 2018, then built and ran its replacement: the gate itself, the tool brand teams used to manage it, and the hosting behind it.

Period
2018–2024
Stack
  • Vue
  • Nuxt
  • Node
  • Express
  • Docker
  • Cloudflare
  • Azure Blob Storage
  • Google Tag Manager

One script tag, one bundle per brand and language

The site loads a script through Cloudflare. The service builds the gate for the brand, language and country, and the cache makes sure each bundle is built once.

  1. The site

    The brand's site loads the gate with an async script tag, so the page never waits for it.

    • Brand site: One script tag
  2. CDN

    Cloudflare answers with the finished bundle for the brand and the visitor's language and country. Only when the bundle is missing does the request go on.

    • Cloudflare: Cached bundle
  3. The service

    The service builds the bundle with Babel, Sass and PostCSS, with the age rules for the visitor's country, and stores it in Azure Storage.

    • The service: Builds on request
    • Azure Storage: Built bundles
  4. Admin

    Brand teams and agencies sign in with the group's SSO, edit templates, styles and translations and purge the cache. Every save is committed to Git.

    • Admin: SSO for brand teams
    • Git: Every save

What we built

  1. Brand teams in control

    An admin app with company single sign-on lets brand teams and agencies edit templates, styles, logos and translations in a code editor, preview the result and purge caches.

  2. Rules per country

    The gate detects the visitor's country and language, applies a legal drinking age table for 98 countries, including 11 restricted markets where it blocks access, and asks only for the birth year unless the market needs the full date.

  3. One line to add

    A brand adds one async script tag to its site. The service returns a gate compiled for that brand and the visitor's locale.

  4. No slower pages

    Each brand and locale bundle is compiled on request with Babel, Sass and PostCSS, then cached in three layers: in the app, in Azure storage and at the Cloudflare edge.

  5. Every change on record

    Every save in the admin is committed to Git automatically, so each gate has a full change history.

  6. Tracking that matches

    The gate sends standard Google Tag Manager events and exposes JavaScript lifecycle hooks, with a pass-through option for newsletter and ad traffic.

Where it stands

  • 140+ age gates for brand sites, campaign sites, digital press rooms and corporate sites.
  • 424 translation files in 83 locale variants.
  • 10,000+ saves through the admin between 2020 and 2024, 9,000+ of them by people from dozens of brand teams and agencies.

Built for