Know what’s on your site before a plaintiff’s firm does
A free privacy audit shows which cookies, pixels and trackers are running — and which ones commonly appear in privacy claims.
The name sounds harmless, and in a way it is. test_cookie is a short-lived cookie that Google sets on the doubleclick.net domain to check whether a browser accepts cookies at all. Its appearance in a scan tells you something more important, though: Google’s advertising stack is loading on the page.

What Is test_cookie?
Google’s Google’s advertising and measurement cookie reference lists test_cookie with the purpose Functionality, a lifespan of 15 minutes and the domain doubleclick.net. Google associates it with AdSense, Campaign Manager, Google Ad Manager, Google Analytics, Display & Video 360 and Search Ads 360.
The idea is simple. Before Google’s ad systems try to write longer-lived identifiers such as the IDE cookie or the DSID cookie, they write a throwaway value and check whether it comes back. If it does, the browser accepts third-party cookies from doubleclick.net. If it doesn’t, the ad system knows not to rely on cookies for that browser.
Is test_cookie First-Party or Third-Party?
Third-party. It’s written on doubleclick.net, not on your domain, so it shows up when ad tags or certain Google Analytics advertising features call Google’s ad servers. Safari blocks third-party cookies by default and Firefox blocks or isolates known trackers, so you may see it in some browsers and not others. Our guide to third-party cookies explains why that matters for scan results.
How Long Does test_cookie Last?
Fifteen minutes, per Google’s reference. It doesn’t hold a user ID, just a test value.
Does test_cookie Need Consent?
Google labels it Functionality, but the function it serves is advertising. Most consent tools and EU regulators look at the purpose of the service as a whole. A cookie that only exists to prepare ad tracking isn’t strictly necessary for a service the user requested, so the safe approach is:
- EU and UK: classify it under Marketing or Advertising and block Google ad tags until the visitor opts in. Using Google Consent Mode with
ad_storagedenied by default stops Google writing ad cookies before consent. Our Consent Mode v2 guide walks through the setup. - US states: disclose it as part of Google advertising, and when a visitor opts out of sale or sharing, or sends a Global Privacy Control signal, stop the ad tags that set it.
Some sites categorize test_cookie as necessary because it doesn’t identify anyone. That argument is weak. If the ad tag that sets it should be waiting for consent, so should the test.
How to Block or Delete test_cookie
- Site owners: gate AdSense, Ad Manager, Campaign Manager and Google Ads remarketing tags behind your consent banner.
- Check Analytics settings: Google Signals and advertising features in Analytics can cause doubleclick.net calls. Turn them off if you don’t use them.
- Visitors: block third-party cookies in browser settings, or clear doubleclick.net cookies. It expires on its own after 15 minutes.
Why It Shows Up in Lawsuits and Audits
Plaintiffs’ firms and regulators use cookie scans to show that ad cookies fired before a visitor clicked anything. A doubleclick.net cookie in the first page load, even a 15-minute test, is easy evidence that Google’s ad stack ran without consent. Our guide on how to see what cookies are firing shows how to check this yourself.
Captain Compliance’s cookie scanner, one of the tools in our list of cookie scanner tools, records the domain, category and timing of each cookie, so you can see whether test_cookie appears before or after consent and fix the tag that’s leaking.
FAQ
Does test_cookie store personal information?
It stores a test value, not an ID. The privacy issue is the ad request it’s part of, which carries the visitor’s IP address and page URL to Google.
Why do I see test_cookie when I don’t run ads?
Look for Google Analytics advertising features, embedded YouTube or Google content, or a plugin that loads Google ad tags.
Is test_cookie the same as TESTCOOKIESENABLED?
No. Google lists TESTCOOKIESENABLED separately, as a 60-second cookie used by AdSense and Ad Manager and set on the partner domain.
A 15-minute test cookie is a small thing to fix. The real question it raises is whether Google’s ad tags on your site wait for consent at all.
Put this into practice
Turn privacy guidance into working controls.
Captain Compliance helps teams discover tracking technologies, enforce consent, manage privacy requests and document the evidence behind every decision.