Unlock the power of Google Analytics with Big Query

Understanding GA4 Sessions with Consent Mode Enabled

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.


Amazon Prime
Check Out Amazon Deals
Discover top offers on books, gadgets & more.

Shop Now
1. What is a Session in GA4?

In GA4, a session is defined as:

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):

This affects:


Session Behavior in BigQuery (With Consent Mode)

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

✅ If analytics_storage = GRANTED:

❌ If analytics_storage = DENIED:


How It Affects Reporting

📌 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 GA4 BigQuery

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

Continue reading