Skip to content

SEO · 19 November 2026 · 4 min read

Cookies before consent: why Google can set cookies when the visitor has not said yes

Consent Mode with everything denied – and still a cookie from Google. We found it on our own site. Here is how it happens and how to check yours.

The cookie banner is in place, Consent Mode is set up and everything is “denied” until the visitor has chosen. So no cookies should be set before anyone presses a button. Yet Google can set a cookie on a visitor who has not agreed to anything. We found it on our own site, and it is probably the same on many others.

What we saw

We measured our new site with Lighthouse, the audit tool built into Chrome. Under Best Practices it flagged “Uses third-party cookies”. The cookie was called __mggpc__ and came from pagead2.googlesyndication.com, Google’s ad domain. The visitor in the test had not accepted any cookies at all.

Our own site set no cookie. The server sent none, and Google Analytics ran in Consent Mode with everything denied, exactly as it should. The cookie came from Google’s own server instead, when Google’s tag sent a request there.

Google describes two ways to use Consent Mode:

  • Basic: Google’s tags do not load at all until the visitor has agreed. Nothing is sent to Google before that.
  • Advanced: the tags load on every visit. Until the visitor has chosen, they send so-called cookieless pings to Google, without setting cookies on your domain.

Advanced mode is common, because it lets Google estimate visits and conversions even from people who say no. But the tag contacts Google from the very first page view. And “no cookies on your domain” is not the same as “no cookies at all”: Google’s own servers can answer with a cookie on their own domain. That is what we saw.

The request to the ad domain comes from the advertising features in Google Analytics, such as Google signals. They are often switched on without anyone having thought about it, even on sites that run no Google ads.

Why it matters

  • What your cookie banner promises. If it says nothing is set before the visitor chooses, that should also be true in practice.
  • Browsers. Third-party cookies are blocked more and more often. Code that relies on them works less well, and tools such as Lighthouse deduct points.
  • Trust. Anyone who checks the site in the browser’s developer tools sees the request to Google’s ad domain straight away.

Whether a request before consent is allowed is a legal assessment we do not make here. But you can choose to send nothing at all, and that is usually the easiest position to stand behind.

How we fixed it

  1. Google Analytics loads only after consent. We switched to basic mode: the tag does not load until the visitor has accepted statistics. Before the choice, nothing is sent to Google.
  2. Advertising features off. We run no Google ads, so we turned off Google signals and ad personalisation in the tag. Then nothing goes to the ad domain, even after a yes to statistics.
  3. Check. A new measurement: no third-party cookies, and 100 in all four categories in Google PageSpeed.

The price of basic mode is that Google cannot estimate the visits from people who say no. You only see those who say yes. For us it was an easy choice.

Check your own site in five minutes

  1. Open the site in a private window and do not press anything in the cookie banner.
  2. Open the developer tools (F12), the Network tab, and reload the page.
  3. Type google in the filter box. If you see requests to googletagmanager.com, google-analytics.com or googlesyndication.com, Google is being contacted before consent.
  4. Look under Application → Cookies. Only the cookies the site needs to work should be there.
  5. Run Lighthouse (the Lighthouse tab) and read about third-party cookies under Best Practices.

If you find the same as we did: decide whether you need advanced mode, and switch off the advertising features you do not use. If you want help going through cookies, tags and consent on your site, a technical GDPR review is included in our support plans from Business upwards, or we can do it as a project of its own. You can also read how we handle cookies ourselves in our cookie policy, or tell us about your site.

Next step

Tell us what you want to build.

Describe your project or question and we will get back to you within one working day with an honest answer on scope, time and cost.