This article is about cookies usage for Google Analytics 4 properties. To learn about cookies for Universal Analytics, see this article instead.
The following table describes each cookie set by gtag.js. To learn more about the data that Analytics collects, see Safeguarding your data.
|Default expiration time
|Used to distinguish users.
|Used to persist session state.
Change default cookie settings
You need the Editor role to use this feature. To override default cookie expiration and cookie update settings:
- In Admin, under Data collection and modification, click Data streams.
- Click the data stream for your website, then under Google tag, click Configure tag settings.
- Under Settings, click Show all.
- Click Override cookie settings.
- Select the Override default cookie settings checkbox.
- Under Cookie expiration select how long before cookies expire (from immediately to 25 months).
- Under Cookie update select either Set cookie expiration time relative to most recent visit or Set cookie expiration time relative to first visit.
- Click Save.
If you need to customize additional cookie settings, see Cookies and user identification.