Google Analytics 4 PRO Now Fully Compatible with GS2 Cookies

Loading...
Back to Blog
Google Analytics 4 PRO Now Fully Compatible with GS2 Cookies

This month, Google quietly rolled out a significant update to its Analytics infrastructure: the introduction of a new cookie format known as GS2. Unlike previous updates, this change was not publicly announced and went live around mid-May, catching many merchants and developers by surprise.

What Changed? The Move from GS1 to GS2

The new GS2 cookie format represents a major shift in how Google Analytics stores and structures session data. Previously, the GS1 format used a simple, dot-separated structure with fixed positions for each value. For example:

 

GS1.1.1746825440.14.0.17468254406.0.0.295082955

 

Each position in the string had a specific meaning, and any change in the structure could break existing implementations. With GS2, Google has adopted a more flexible, extensible approach. The new format uses single-letter prefixes and dollar-sign separators, making it easier to add new parameters and handle missing values. Here’s what a GS2 cookie looks like:

 

GS2.1.s1746825440$o14$g0$t1746825440$j60$l0$h295082955

 

Each value is now prefixed (e.g., s for session ID, o for session number), and parameters can appear in any order. This change not only improves extensibility and error handling but also aligns with modern data serialization standards. For a detailed technical breakdown, see this article by David Vallejo.

How Did This Affect Google Analytics 4 PRO?

Unfortunately, this unannounced change caused issues for many merchants whose tracking implementations relied on the old GS1 structure. This included the Measurement Protocol functionality in our own Google Analytics 4 PRO extension, leading to attribution inconsistencies and, in some cases, missing event data—especially when sending events exclusively via the Measurement Protocol.

Our Response: Immediate Compatibility Update

As soon as we identified the root cause, we prioritized an urgent update to our extension. We’re proud to announce that version 1.15.1 of the Google Analytics 4 PRO integration is now fully compatible with the new GS2 cookie format. This update restores all previously affected functionality, ensuring your tracking and attribution remain accurate and reliable. We strongly advise all merchants using Google Analytics 4 PRO to upgrade to version 1.15.1 as soon as possible to avoid any tracking disruptions. The update is available for all users in the Downloadable Products section of your WeltPixel account.

What About Other Extensions?

  • Standard Google Analytics 4 extension: Users should be unaffected by the GS2 change, but we’ve also released version 1.15.1 for consistency.

  • Google Analytics 4 & Social Marketing Suite PRO: You can update your Google Analytics 4 PRO extension via Composer.

Why Did Google Make This Change?

The move to GS2 was driven by several factors:

  • Improved extensibility: New parameters can be added without breaking existing implementations.

  • Self-documenting structure: Prefixes make the data more readable and easier to debug.

  • Better error handling: Parsers can ignore unknown prefixes and handle missing parameters gracefully.

  • Alignment with modern standards: The new format is more in line with JSON and URL parameter conventions.

For a deeper dive into the technical reasons and a universal parser for both GS1 and GS2, check out David Vallejo’s comprehensive guide.


In summary: If you’re running Google Analytics 4 PRO, update to version 1.15.1 immediately to ensure full compatibility with Google’s new GS2 cookie format and maintain accurate tracking across your site.

References:

Related Products