Explanation of Cookie Values ​​Used by Google Analytics 4

Google Analytics BCS 2 years ago (2023-01-17) 16870 Views 8 Comments

Update time: May 26, 2025

The following first-party cookies are generated and used in GA4:

Cookie name Default expiration time Description
_ga 2 years Used to distinguish users.
_ga_<container-id> 2 years Used to persist session state.
FPID 2 years Used to distinguish users.
FPLC 20 hours Used to cross-site tracking

Note:Although the default validity period is 2 years, the actual validity period is 13 months. This is because there is an industry rule in current browsers that the validity period of first-party cookies is 400 days, which is about 13 months. Therefore, the validity period you see in the cookie is about 13 months.

Next, let me introduce the specific information in these two cookies, take bbccss.com as an example:

_ga

By default, GA4 assigns a unique Client ID to each device as a unique user, which is stored in the browser’s cookie _ga, the structure of _ga is as follows:

Note: 1197596843.1673515099 is the Client ID.

The detailed explanation is as follows:

Value Description
GA1 Version number, which represents the version of the cookie format that’s being used.
1 Domain Level, In fact, GA4 generates all 1.
1197596843 Random  Number, 10 digits
1673515099 Timestamp, the timestamp when cookie _ga was created

 

_ga_<container-id>

The structure of _ga_<container-id> is as follows:

Or:

The difference between the two is the analysis version, which can be distinguished by the number after GS.

The detailed explanation is as follows:

 

Value Description
GS Fixed Identifier
1 Analysis Version, The value is 1 or 2, and there are two versions, corresponding to the two screenshots above.
1 Domain Level, In fact, GA4 generates all 1.
1673933110 Session ID/Current Session Start Time
12 Sessions Count
0 Engagement Session, 1 means engagement session, 0 means no
1673933110 Current Timestamp
60 Countdown,60-second countdown, cookie and user data matching/syncing when Google Signals
is enabled
0 Login and set User ID, 1 means login and set user id, 0 means no
0 Enhanced Client Id, abbreviated as ecid, is a string of numbers that only has value when
tracked on the server side tracking or enable 「User-ID and user-provided data collection」
riYSmWx3uWvuJEDkCvwJCnvET7QcvFq7kg This field is available when Google signal data collection is enabled and indicates the Google signal or the associated ID of the Google signal.

For the first request of the session, the Session ID and Current Timestamp are the same, because the Session ID is the Current Session Start Time

Read more: 

 

FPID

The full name of FPID is First-party device IDs, which is set through server-side tracking. Therefore,  it is only available in server-side tracking:

This cookie is httponly, and the variables in GTM cannot obtain it.

The value of FPID is as follows: 

FPID2.2.F99Fd7gVuQuP93MZdJiEn07o/eZba6j9bAt8ETLsn8E=.1733280703

Note: F99Fd7gVuQuP93MZdJiEn07o/eZba6j9bAt8ETLsn8E=.1733280703 is also called Client ID

Value Description
FPID2.2 Version number
F99Fd7gVuQuP93MZdJiEn07o TBD
eZba6j9bAt8ETLsn8E= TBD
1733280703 Timestamp

Read more: FPID: First Party Device ID

 

FPLC

You may also see Cookie FPLC:

Since FPID is HttpOnly, GTM cannot read it, so FPID cannot achieve cross-site tracking.

FPLC is used to solve the problem that FPID cannot be tracked across sites.

FPLC is the hash value of the FPID cookie. It is not HttpOnly, which means that JavaScript can access FPLC and use it for cross-domain tracking.

FPLC is valid for only 20 hours.

 

Referral:


If you don't understand, You can leave a comment below.
Like (17)
Post my comment
Cancel comment
Expression Bold Strikethrough Center Italic

Hi, you need to fill in your nickname and email!

  • Nickname (required)
  • Email (required)
  • Website
(8) friends in the comments
  1. Is the new change to the GS2 cookie affecting anyone's session tracking? Also, do we have any official docs from Google about this change? Thanks1
    hungry_ramen2025-05-13 22:36 Reply Mac OS X | Chrome 136.0.0.0
    • BCS
      It does not affect session tracking, it just changes the structure of the cookie _ga_, the value does not change. But if you use the Measurement Protocol to track and get the session id from the cookie _ga_, it will be affected, after all, its structure has changed. Google did not update this change in the document
      BCS2025-05-14 08:41 Reply Mac OS X | Chrome 136.0.0.0
  2. We're seeing some GS2 cookies; would be great if you could update for those as well.
    b2025-04-24 20:21 Reply Windows 10 | Firefox浏览器 137.0
    • BCS
      Already added
      BCS2025-04-29 09:19 Reply Mac OS X | Chrome 135.0.0.0
  3. Hi! For some reason, my last comment got all bad-formatted. There's also missing information. I will write again here and have also sent you an email with the correct formating. My apologies. ⠀ .<counter of 60 countdowns that when reset instructs the sending of hits to td(dot)doubleclick(dot)net/td/ga/rul, www(dot)google(dot)/ads/ga-audiences, stats(dot)g(dot)doubleclick(dot)net/g/collect - purpose: cookie and user data matching/syncing when Google Signals is enabled (maybe when Google Ads is linked to the account as well)> ⠀ . ⠀ . String(Math.round(Math.random() * 2147483647)); it is placed in the hit when the User-provided data collection feature is enabled in the property, and there is no point in disabling it as it does not change anything>
    giovaniortolani2025-01-16 22:20 Reply Linux | Chrome 131.0.0.0
    • BCS
      Thanks, I know I'm missing something. Maybe my website limits the length of comments?
      BCS2025-01-17 10:34 Reply Mac OS X | Chrome 131.0.0.0
  4. Hello! Thanks for the article. To collaborate and help the community, I also want to share my findings regarding the last 3 fields of the _ga_ cookie. <counter of 60 that when reset instructs to send hits to td(dot)doubleclick(dot)net/td/ga/rul, www(dot)google(dot)/ads/ga-audiences, stats(dot)g(dot)doubleclick(dot)net/g/collect - purpose: cookie and user data matching/syncing when Google Signals is enabled (maybe when Google Ads is linked to the account too)> String(Math.round(Math.random() * 2147483647)); is placed in the hit when the User-provided data collection feature is activated in the property, and there is no point in disabling it as it does not change anything>
    giovaniortolani2025-01-15 23:10 Reply Linux | Chrome 131.0.0.0
    • BCS
      Thanks for your mention. For counter of 60, I tested and it works when Google Signal is turned on.
      BCS2025-01-16 09:11 Reply Mac OS X | Chrome 131.0.0.0