Diageo: Age gate and legal platform

A white-label age gate and legal content platform for Diageo's brand sites, such as Guinness and Johnnie Walker. Mobile time to interactive went from over 12 seconds to 2.

client
Diageo
role
Senior front-end engineer
years
2024–2025
platform
Compliance Platform
stack
Next.js, React, TypeScript, Contentful, Tailwind, shadcn/ui, Playwright, Vitest, Azure DevOps
Screenshot of Diageo Age Gate & Compliance Footer

Overview

Every Diageo brand site, from Guinness to Johnnie Walker, checks a visitor's age before letting them in. The check ran on a centralised system about 10 years old, which loaded jQuery and several other libraries on every Diageo site. As part of Diageo's global website transformation programme, I replaced it with a white-label age gate and legal content platform, ready for the hundreds of brands Diageo owns.

My role

Senior front-end engineer. I owned the front-end and back-end architecture for the age gate, and onboarded the agencies and system integrators building on the platform.

What I did

  • Investigated the legacy system, and worked with business analysts to gather requirements and plan the migration.
  • Built the replacement in Next.js and Contentful, with server components and server actions, and shipped it as NPM packages.
  • Used geolocation to apply each market's legal drinking age, with legal content and journeys set per brand.
  • Built a custom Contentful app for footer settings across 32 locales, so editors set a value once instead of filling the same field for every locale.
  • Built legal.diageo.com, the legal documentation hub, with GDPR consent through OneTrust.
  • Set the end-to-end test strategy with Playwright, run in Azure DevOps on Microsoft Playwright Testing for parallel runs, and set up Dynatrace monitoring.

I mapped the whole journey before building it: geolocation, the age check, the brand site, the global footer and the legal documents behind it.

Outcome

On the first brand, yeniraki.com, mobile time to interactive went from over 12 seconds to 2, and mobile Lighthouse performance from 60 to 90, with perfect CrUX scores. Brands can launch and update age gates with very little engineering effort.