Google Analytics 4 (GA4) is designed to provide a more flexible, privacy-conscious approach to tracking user interactions across websites and apps. At the core of GA4’s tracking system are cookies, which play a crucial role in managing sessions and identifying users.
One of the primary cookies used by GA4 is _ga, which assigns a Client ID—a unique, randomly generated identifier—to each user. This Client ID is essential for distinguishing between new and returning visitors, enabling GA4 to accurately track user journeys and behaviors over time.
As GA4 continues to evolve, Google is introducing a new cookie format that changes how session information is encoded and stored. This update is designed to improve the way GA4 handles complex session data, making it more efficient and better aligned with modern privacy standards and browser restrictions.
Staying informed about these changes is critical, as they directly impact how user data is collected, processed, and interpreted in your analytics setup.
_ga cookie
_ga<container id> cookie
Lifespan: 24 hrs
_gid cookie
The new GA4 cookie format, is notably different from the older version, and it's designed to be more structured and easier to interpret.
Unlike the previous format, the updated structure provides:
We are familiar with the following cookie structure used by GA4 on the website.
Normal cookie format
GA1.1.1162820436.1749482504
Understanding about existing cookie format (_ga cookie):
Cookie Parameter | Description |
GA1 | It is the version detail of GA4 |
1 | This indicates the level of the domain. eg:, "example.com" has a level of 1, while "sub.example.com" has a level of 2. This information helps us understand the structure of a website and its subdomains. |
1162820436 | It is the random number, this Random number generated by GA4 identifies and distinguishes the given visitor on a website. |
1749482504 | It is the timestamp when the cookie is created or when the user landed on the site. |
The new GA4 cookie structure is more organized, making it easier to identify key values like the timestamp, session ID, and user ID.
GS2.1.s1749482503$o1$g1$t1749482510$j53$l0$h1446824558
New cookie format
Understanding about new cookie format _ga_<{ID}> cookie:
Cookie Parameter | Description |
GS2 | This is Google stream version 2, it is the format version |
1 | This indicates the level of the domain |
S1749482503 | This represents the session ID generated at the start of a user session. The same session id is also gets recorded in the “ga_session_id” in the GA4 hits |
o1 | It includes session number, like 1, 2 etc |
g1 | It states engaged session details, eg 0 or 1 |
t1749482510 | Last hit timestamp when cookie is created |
j53 | It is a joint timer |
l0 | It is the login state of an enhanced user |
h1446824558 | It states user id in hash format |
Session id (S) is recorded in the ga_session_id parameter
Session number (o1) is stored in the ga_session_number parameter of GA4
Why did GA4 launch a new cookie format?
The GS2 format in GA4 is based on key-value pairs, making it significantly easier for Google to add, remove, or update fields in future without disrupting existing implementations.
Google's introduction of GS2 cookie format marks a significant step toward the future of digital analytics. It reflects a move away from legacy tracking methods and highlights the importance of adapting to evolving data practices. With more changes likely on the horizon, it's essential to stay informed and prepared.
Overlooking these updates could result in unintentional data gaps. However, by proactively embracing these changes, you can ensure your tracking remains accurate, resilient, and aligned with privacy-focused standards.