GA4 BIGQUERY ANALYTICS

Unlock the power of Google Analytics with Big Query

What are _ga4 cookies? _ga versus _gid and its bigquery export mapping; ga4 cookies explained

If you work with GA4 BigQuery exports, one of the biggest sources of confusion is this: “Where did cookies go and how do they map to users and sessions?”

The answer is simple but critical: GA4 does NOT export cookies into BigQuery. Instead, it converts browser cookies into stable analytics identifiers.

This guide breaks down exactly what each identifier means and how they connect in BigQuery.

GA4 uses first-party cookies set by Google Analytics, and the raw event data is exported into Google BigQuery.

Before diving into individual fields, here’s the mental model:

Browser Cookies → GA4 Processing → BigQuery Fields
Browser Layer

_ga
_gid
_ga<container-id>
GA4 Processing Layer

User identity stitching
Session grouping
Event enrichment
BigQuery Export

user_pseudo_id
ga_session_id
event_params
Key insight: GA4 does NOT expose cookies directly in BigQuery — it transforms them into event-level identity fields.

1. _ga (Client ID Cookie)

The primary Google Analytics cookie used to identify a returning browser/device.

GA1.2.123456789.1712345678

What it does

  • Identifies a browser/device combination
  • Persists user recognition across sessions
  • Forms the foundation of user tracking

In GA4 BigQuery

Not directly exported. Instead, it becomes:

user_pseudo_id

_ga is a browser identifier.
user_pseudo_id is GA4’s analytics-ready version of it.

2. _gid (Short-Term User Cookie)

A temporary cookie used for short-term user differentiation (usually ~24 hours).

What it does

  • Helps distinguish users in short time windows
  • Historically used in Universal Analytics for quick deduplication

In GA4 BigQuery

❌ Not used as a core identifier
❌ Not required for analysis
❌ Not mapped to any key field

_gid is legacy metadata. In GA4 BigQuery analysis, you can almost always ignore it.

3. _ga_<container-id> (Property Cookie)

A GA4-specific cookie tied to a specific measurement property.

_ga_ABC123XYZ

What it does

  • Associates activity with a GA4 property
  • Helps maintain measurement consistency
  • Supports session continuity in the browser

In BigQuery

❌ Not exported as a usable field. Instead, GA4 reconstructs sessions based on the timestamp of when the session began using:

  • ga_session_id
  • ga_session_number

Inside:

event_params

This cookie does not matter in BigQuery analysis, its logic is replaced by session parameters.

4. user_pseudo_id (GA4 User Identity)

The primary user identifier in GA4 BigQuery export. It is derived from browser/device identity (originally _ga).

What it does

  • Identifies a unique browser/device user
  • Acts as the foundation for all user-level analysis

Properties

  • Stable per browser/device
  • Changes if cookies are reset
  • Changes if consent is denied or reset

5. ga_session_id (Session Identifier)

A timestamp-based session identifier stored inside event parameters.

What it does

  • Groups events into sessions
  • Replaces cookie-based session tracking from Universal Analytics
event_params.key = "ga_session_id"

Sessions in GA4 are NOT cookie-driven—they are event-derived.

6. ga_session_number (Session Counter)

A sequential counter of sessions per user.

What it does

  • Tracks how many sessions a user has had
  • Helps identify new vs returning engagement

Use cases

  • Behavioral segmentation
  • Funnel analysis
  • Cohort building

One-Line Takeaway

Cookies exist only in the browser but GA4 transforms them into event-based identity fields before they reach BigQuery.

CookieGA4 RoleBigQuery Field
_gaUser identityuser_pseudo_id
_gidShort-term trackingNot used
_ga_<id>Session groupingga_session_id


Discover more from GA4 BIGQUERY ANALYTICS

Subscribe to get the latest posts sent to your email.

Discover more from GA4 BIGQUERY ANALYTICS

Subscribe now to keep reading and get access to the full archive.

Continue reading