When Consent Mode is enabled in Google Analytics 4 (GA4), the way sessions are initiated, maintained, and reported changes significantly. This ensures compliance with privacy laws (like GDPR or CCPA), but also impacts how you interpret session data in BigQuery or the GA4 UI.


1. What is a Session in GA4?

In GA4, a session is defined as:

  • A group of user interactions (events) that take place within a given time frame.
  • It starts with a special event called session_start.
  • It’s tracked using two identifiers:
    • ga_session_id (numeric session ID)
    • ga_session_number (the count of sessions for that user)

Default timeout is 30 minutes of inactivity, but this can be customized.

Unlike Universal Analytics, GA4 does not restart a session at midnight or when new campaign parameters are detected.


2. What Changes with Consent Mode?

When Consent Mode is active, GA4 adapts tracking behavior based on user consent status. There are two primary types of consent GA4 responds to:

Consent TypeDescription
ad_storageControls storage of advertising cookies (e.g., for remarketing).
analytics_storageControls storage of analytics cookies (e.g., for GA4 tracking).
🔄 GA4 Behavior Based on Consent:
Consent Granted? (analytics_storage)Behavior
YesFull session tracking, cookies set (e.g., client_id, session info).
NoLimited tracking; no cookies, no session continuity, anonymous pings.

3. What Happens When Consent Is Delayed?

If a user delays giving consent (e.g., clicks “Accept All” after a few seconds):

  • GA4 will not start a session until consent is granted.
  • The first session event (session_start) will be triggered after consent.
  • All events prior to consent are either:
    • Dropped, or
    • Sent as cookieless pings (no user/session IDs), depending on implementation.

This affects:

  • Session counts → Underreported compared to UA or GA4 without consent mode
  • Bounce rate / engagement rate → May appear inflated due to fewer sessions
  • Attribution → Consent delay can cause first-touch source/medium to be lost

Session Behavior in BigQuery (With Consent Mode)

If you’re exporting GA4 to BigQuery, here’s what you’ll notice:

✅ If analytics_storage = GRANTED:

  • Each session has:
    • A session_start event
    • ga_session_id and ga_session_number
    • user_pseudo_id (cookie-based ID)
  • Session stitching works as expected

❌ If analytics_storage = DENIED:

  • No cookies → no user_pseudo_id, ga_session_id
  • Events show up with:
    • Null or placeholder IDs
    • No session_start events
    • Session grouping becomes impossible
  • Still useful for aggregate event counts, but no session analytics

How It Affects Reporting
  • GA4 UI: Sessions and users may appear to drop after enabling consent mode.
  • Attribution reports: May lose source/medium for traffic unless consent is immediate.
  • Conversion tracking: Delayed or missed if consent not granted before the action.
  • Audience building: Limited, since user identifiers are unavailable.

📌 Tip: Use modeled data features in GA4 to fill in gaps when possible.


Best Practices
  1. Fire Consent Prompt Immediately
    Ask for consent as soon as the page loads — reduce the chance of missed sessions.
  2. Use Default Consent Mode Tags
    Set up gtag('consent', ...) or Tag Manager to handle consent automatically.
  3. Monitor Consent Impact
    Compare pre- and post-consent mode session volumes. Expect up to 20–50% drop depending on opt-in rates.
  4. Fallback to Cookieless Tracking
    Consider sending anonymized pings (no cookies, no identifiers) to maintain some signal.
  5. Use GA4 Modeled Data
    GA4 uses machine learning to estimate sessions/conversions where data is missing due to denied consent.

Summary
With Consent ModeImpact on Sessions
Consent GivenNormal session tracking with cookies
Consent DeniedNo sessions, no cookies, anonymized or dropped events
Consent DelayedSession starts only after consent is granted

Understanding this behavior is critical for interpreting your GA4 reports correctly and explaining any drops in session or conversion numbers post-consent deployment.

🚀 Coming Next: In the next post, we’ll dive into the exact SQL query you can use in BigQuery to calculate sessions only when users have granted analytics consent. You’ll learn how to filter for analytics_storage = granted, identify valid session_start events, and handle edge cases where consent is delayed or denied. Please subscribe to stay connected!!


Discover more from GA4BigQuery

Subscribe to get the latest posts sent to your email.

Posted in

One response to “Understanding GA4 Sessions with Consent Mode Enabled”

  1. How to Track User Journeys in GA4 BigQuery with Session Stitching – GA4BigQueryBlog Avatar

    […] Understanding GA4 Sessions with Consent Mode Enabled […]

    Like

Leave a comment

Discover more from GA4BigQuery

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

Continue reading