Insight

From GS1 to GS2: The silent transformation of session cookies on Google Analytics 4

June 10, 2025
Cookies Google Analytics 4

Without any prior warning, a new session cookie structure was implemented in Google Analytics 4 (GA4) on May 6, 2025. This change might have gone unnoticed if it hadn't caused a noticeable outage in the platform's reports! What does the arrival of this new cookie format, called GS2, mean? And more importantly, what are the real impacts on your data and business insights? Let's take a closer look together.

A quiet change that turned everything upside down

Distorted dashboards, misattributed conversions, unexplained user drop-offs... the change in session cookie format in GA4 has caused its fair share of complications for many businesses.
 

Why? Because the _ga cookie, used to track sessions, changed format. If you use only Google Tag Manager or Google’s standard tags (gtag.js), you probably haven't noticed anything. But if your teams manually extract session identifiers to enrich data or match it with a CRM (Customer Relationship Management) software, the effects have been noticeable and immediate:

  • session breaks, skewing the actual number of visits;
  • inconsistencies in user journeys, making conversion funnel analysis less reliable;
  • disconnected data, difficult to cross-reference with CRMs or other internal tools;
  • distorted metrics, compromising accurate evaluation of channel performance;
  • misattributed conversions, giving the impression that some campaigns are underperforming;
  • incorrect attribution, preventing you from determining which channel actually generated a sale;
  • biased strategic decisions, based on unreliable data, risking a weakened impact of your marketing efforts.

GS1 vs GS2: Understanding Google’s new cookie language

Before: A rigid, hard-to-read GS1 format

For many years, Google used the GS1 format for its cookies. This structure relied entirely on the position of values within a long string of numbers, making it difficult to read, understand, and evolve.

Let’s take this typical GS1 structure as an example: GS1.1.1746825440.14.0.17468254406.0.0.295082955.

  • GS1.1 indicated the cookie format version (GS1) and its sub-version (1);
  • 1746825440 was the session start timestamp (used as the session ID);
  • 14 represented the running session count assigned to the user;
  • 0 served as an engagement indicator (the level of interaction with the site);
  • 17468254406 was the timestamp of the most recent hit;
  • 0 was a join-timer for session or behavior tracking;
  • 0 indicated the login status (logged in or not);
  • 295082955 was an encrypted identifier used for tracking while preserving data privacy.

Pretty hard to decipher, isn't it? On top of that, it was a very rigid format: even adding a small new field required full reprogramming, opening the door to many malfunctions!

Now: A more flexible and readable GS2 format

To address the limitations of the GS1 structure, Google introduced the GS2 cookie format: a self-describing system in which each field is clearly labeled with a lowercase letter and separated by the $ symbol.

Take a look at the seven lowercase letters in this GS2 structure: GS2.1.s1747132561$o1$g0$t1747132655$j0$l0$h0.

  • s indicates the session ID;
  • o corresponds to the session number assigned to the user;
  • g represents the engagement level;
  • t is the last hit's timestamp;
  • j is used as a countdown by GA4 to decide when to retire the session;
  • l indicates the connection status;
  • h contains an encrypted identifier to preserve data privacy.

Thanks to this simple and flexible logic, fields can now be reordered, removed, or added without affecting the overall cookie structure.

More than just a technical change

The move to the GS2 format isn’t only about changing how cookies look — it also improves how they work in tangible ways. Here’s why it matters:

  • It’s now possible to add new information without breaking existing integrations.
  • Each data point is preceded by a letter that indicates what it represents (for example, s for session or t for timestamp).
  • With a version number (GS2.1), Google can evolve the format without unexpected changes.
  • Cookies are now more compact and efficient (no need to fill unnecessary fields or follow a strict order).
  • The structure is easier to integrate with modern data analysis tools and APIs.

In short, it’s a clearer, more reliable format that’s better suited for the future.

Who is affected by this change in GA4?

As mentioned earlier, the introduction of GS2 as the new cookie format might seem insignificant if you’re only using Google Tag Manager or Google’s standard tags (gtag.js). However, this change can have greater consequences in the following cases:

  • If you manually read the GA4 cookie (_ga) in your code (for example, to integrate it into a custom script);
  • If you pass the session ID to a CRM or CDP (Customer Data Platform) such as Salesforce, Segment, or HubSpot;
  • If you send events to GA4 manually, building the data yourself from internal systems (using the Measurement Protocol);
  • If you match GA4 identifiers with those from other tools or databases to track users across touchpoints.

In such cases, data teams, partner agencies, and CRM integration specialists absolutely need to be aware of the format change. Otherwise, there's a risk of misreading the new cookies, which could lead not only to technical errors, but also to biased business decisions based on inaccurate or incomplete data.

5 best practices to adapt and avoid unpleasant surprises

The shift from GS1 to GS2 is a strong reminder that cookie formats can change without warning. Here are five good habits to adopt so you can stay agile and avoid being caught off guard by future updates:

  1. Read cookies by field names, not by position: Instead of looking for a field at a specific location, identify clearly labeled data, such as s for the session ID. This approach helps you avoid errors if Google updates the cookie format again.
  2. Process data server-side rather than in the site’s code: Avoid relying solely on front-end code to handle cookie data. Front-end logic becomes outdated quickly when formats change. It’s safer to process and interpret data on the server, which makes your system more adaptable and resilient.
  3. Set up alerts to detect anomalies: A well-designed alert system can save you valuable time and help prevent decisions based on faulty data.
  4. Clearly document your dependencies: Keep track of where and how GA4 data is used across your systems. This way, if something changes, you’ll immediately know what to check to avoid chain reactions.
  5. Encourage collaboration between teams: Marketing, analytics, IT… data quality is everyone’s responsibility! Working together ensures a more robust and responsive data ecosystem.

Ensure the reliability of your data — today and tomorrow

The transition from GS1 to GS2 brings its share of complications and adjustments for organizations, especially those relying on advanced integrations. Fortunately, our specialists can support and guide you in several ways:

  • audit your GA4 setup and identify areas for improvement;
  • adapt cookie handling, whether on the browser side or server side;
  • secure your data flows through the Measurement Protocol;
  • train your teams to stay up to date and ready for future changes.

Together, let’s build a flexible, sustainable, and scalable architecture to ensure the long-term reliability of your analytics.
 

Learn more about our services.

Cybermetric Consultant rzarrai@tink.ca