Analytics · Google LLC

Google Analytics 4: cookies and consent

Measures traffic and how visitors use the site.

Spot it on your site

  1. Open your site in a private window, without clicking the banner.
  2. Developer tools › Application › Cookies.
  3. _ga is already there? Google Analytics 4 fires before consent.

Block Google Analytics 4 until consent

When the scan finds Google Analytics 4, Nodbar files it under “Analytics” and holds its scripts back until the visitor chooses. After the install, a new scan checks that nothing fires before consent any more.

Your banner in your colours, with Google Analytics 4 blocked until the visitor chooses.

Create my banner

FAQ

Is the _ga cookie required?

No. Analytics is not needed for the site to work: it waits for the visitor’s consent, unless a narrow exemption from your data protection authority applies.

Can I use Google Analytics 4 without a cookie banner?

Only in a configuration your regulator exempts from consent, where one exists (France’s CNIL allows anonymous statistics with no cross-referencing or sharing with third parties). Otherwise, you need the visitor’s consent.

What happens if the visitor rejects it?

Google Analytics 4 must not load, on this page or the next ones. The visitor must be able to change their mind at any time, as easily as they chose.

Sources: Nodbar’s tracker database and Open Cookie Database, EDPB guidelines on the ePrivacy Directive. Updated on . This is not legal advice.