Advertising vendor · Google LLC
Google AdSense Cookies: List With Purpose and Retention
Last verified 2026-10-17 · Updated 2026-10-17
On this page
Cookies Google AdSense Sets on Your Site
Google AdSense sets up to 3 first-party cookies on your domain, __gads, __gpi, and __eoi, and Google sets more advertising cookies on its own domains.
| Name | Type | Category | Party | Retention | What it does |
|---|---|---|---|---|---|
__eoi | Cookie | Advertising | First-party | 180 days (6 months) | The __eoi cookie supports the security of Google ad serving on the domain of the publisher, for 6 months. |
__gads | Cookie | Advertising | First-party | 13 months (395 days) | The __gads cookie is a Google AdSense advertising cookie that supports ad serving for 13 months and needs consent under the ePrivacy Directive. |
__gpi | Cookie | Advertising | First-party | 13 months (395 days) | The __gpi cookie carries the ID that Google AdSense and Google Ad Manager use for frequency capping and personalized ads, for 13 months. |
Scripts, Pixels, and Endpoints Google AdSense Loads
Google AdSense loads 1 known script, pixel, or data endpoint. Each row gives the host to look for in the Network tab of Chrome DevTools or in a cookie scanner report.
| Type | Resource | Host | What it does |
|---|---|---|---|
| Script | AdSense code (adsbygoogle.js) | pagead2.googlesyndication.com | The AdSense code loads from pagead2.googlesyndication.com, fills the ad units of the page, and writes the __gads and __gpi cookies. |
Does Google AdSense Need Consent?
Yes, the Google AdSense cookies need consent in the EU and the UK, and need no prior opt-in in California. The table gives the rule for each law, taken from the page of the __gads cookie.
| Law | Consent before the cookies are set | Opt-out right | Source |
|---|---|---|---|
| EU ePrivacy Directive + GDPR | Required | Withdraw at any time | Article 5(3), ePrivacy Directive |
| UK PECR | Required | Withdraw at any time | Regulation 6 and Schedule A1, PECR |
| California CCPA | No general opt-in | Opt out of sale and sharing | Cal. Civ. Code 1798.120 |
The consent table describes what each law requires and is not legal advice. Whether a law applies to your site depends on where your visitors are, where your business is based, and how you set up Google AdSense, such as the first-party cookie setting of AdSense and the consent management platform you use.
Read the reason for each answer in the consent rules for the __gads cookie.
How to Add Google AdSense to a Consent Banner
Add Google AdSense to a consent banner by holding back the AdSense code (adsbygoogle.js) until the visitor accepts advertising cookies. Both TermsFeed products block Google AdSense in the Advertising category.
Add Google AdSense to TermsFeed Free Cookie Consent
TermsFeed Free Cookie Consent runs a tagged script only after the visitor accepts its category. Change type="text/javascript" to type="text/plain" and add data-cookie-consent="targeting".
<script type="text/plain" data-cookie-consent="targeting" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-YOUR_PUBLISHER_ID" crossorigin="anonymous"></script>
Cookie Consent is free and needs no account. Build your free consent banner with TermsFeed Free Cookie Consent.
Add Google AdSense to TermsFeed Privacy Consent
Add Google AdSense from its template in TermsFeed Privacy Consent and type your publisher ID, which starts with ca-pub-. The AdSense code loads only after the visitor accepts the Advertising vendor category, and Privacy Consent sends the Google Consent Mode v2 signals for you.
The Google AdSense template asks for the Publisher ID and fills every other field of the vendor. Pick the "Google AdSense" card under Advertising, enter the Publisher ID, and click "Add Google AdSense". Find the Publisher ID in AdSense under Account › Settings › Account information; the ID starts with ca-pub-. The illustration shows the template form in the TermsFeed app.
Privacy Consent detects the location of each visitor and records every answer in a consent log. Set up Google AdSense from its template with TermsFeed Privacy Consent.
Follow every step, the vendor settings, and the check in Chrome DevTools in how to block the __gads cookie.
Who Runs Google AdSense
Google LLC runs Google AdSense from the United States, and Google Ireland Limited provides Google services to users in the European Economic Area (EEA) and Switzerland. Google lists AdSense as a controller service under the Google Ads Controller-Controller Data Protection Terms.
Read how Google LLC handles the data in the Google AdSense privacy policy, and sign the Google Ads Controller-Controller Data Protection Terms before you collect data from visitors in the EU or the UK. Both documents appear in the sources at the end of this page.
Google AdSense Cookie FAQs
Does Google AdSense need consent?
Yes, the Google AdSense cookies need consent in the EU and the UK, and need no prior opt-in in California. Firstly, the ePrivacy Directive requires consent before a site sets the advertising cookies of Google AdSense. Secondly, the UK PECR requires consent before a site sets the advertising cookies of Google AdSense. Thirdly, the CCPA sets no general opt-in requirement for the advertising cookies of Google AdSense, and the table gives the opt-out right of visitors. The consent section of this page gives the table for each law.
How long do Google AdSense cookies last?
The cookies of Google AdSense last from 180 days (6 months) to 13 months (395 days). The __eoi cookie lasts the shortest time, and the __gads cookie lasts longest. The retention column of the cookie list gives the lifetime of each cookie.
How do I block Google AdSense cookies?
Block the Google AdSense cookies by holding back the AdSense code (adsbygoogle.js) until the visitor accepts advertising cookies. Tag the AdSense code (adsbygoogle.js) with data-cookie-consent="targeting" in TermsFeed Free Cookie Consent, or add Google AdSense as a vendor in TermsFeed Privacy Consent. The page of the __gads cookie gives the full steps and the settings of Google AdSense.
Sources for the Google AdSense Cookies
The facts on this page come from the documentation Google publishes, checked on 2026-10-17. The list gives every source, so you check each fact yourself.
- Google, How Google uses cookies
- Google Ad Manager Help, Enable publisher first-party IDs
- Google Ad Manager Help, Access publisher first-party IDs and delete associated user data
- Google, Cookie information for Google ad products
- Google AdSense Help, Manage your ad serving settings
- Google AdSense Help, Google consent management requirements for serving ads in the EEA, the UK, and Switzerland
- Google AdSense privacy policy
- Google Ads Controller-Controller Data Protection Terms