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 Type | Description |
|---|---|
ad_storage | Controls storage of advertising cookies (e.g., for remarketing). |
analytics_storage | Controls storage of analytics cookies (e.g., for GA4 tracking). |
🔄 GA4 Behavior Based on Consent:
Consent Granted? (analytics_storage) | Behavior |
|---|---|
| Yes | Full session tracking, cookies set (e.g., client_id, session info). |
| No | Limited 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_startevent ga_session_idandga_session_numberuser_pseudo_id(cookie-based ID)
- A
- 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_startevents - 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
- Fire Consent Prompt Immediately
Ask for consent as soon as the page loads — reduce the chance of missed sessions. - Use Default Consent Mode Tags
Set upgtag('consent', ...)or Tag Manager to handle consent automatically. - Monitor Consent Impact
Compare pre- and post-consent mode session volumes. Expect up to 20–50% drop depending on opt-in rates. - Fallback to Cookieless Tracking
Consider sending anonymized pings (no cookies, no identifiers) to maintain some signal. - Use GA4 Modeled Data
GA4 uses machine learning to estimate sessions/conversions where data is missing due to denied consent.
Summary
| With Consent Mode | Impact on Sessions |
|---|---|
| Consent Given | Normal session tracking with cookies |
| Consent Denied | No sessions, no cookies, anonymized or dropped events |
| Consent Delayed | Session 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!!

Comments
One response
[…] Understanding GA4 Sessions with Consent Mode Enabled […]