Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

GA4/BigQuery: Ignore Referrer Set to TRUE even for Non-Direct Session Sources

In GA4, we are seeing both session_start events and sessions in general have the ignore_referrer parameter set to TRUE but the session source is something other than direct or referral (i.e. affiliates, email, etc.). These session sources are often from other mediums than referral traffic so they should not be marked with the ignore_referrer parameter. We also do not have any manual configuration of the ignore_referrer parameter in our GTM tags. In the GA4 UI, this is manageable because the session source/medium still appears accurate, but when we analyze our BigQuery data for the GA4 property, the ignore_referrer parameter appears to be purging the event-level UTM codes for those sessions and since GA4 BigQuery does not include session-scoped source/medium values in the schema then we have no way to identify the actual session source/medium and it gets commingled with our direct traffic (which also doesn't have an event-level UTM). Any potential resolution to this would be appreciated.  

7 1 879
1 REPLY 1

Hi @overtbre the behavior you’re noticing—where ignore_referrer is set to TRUE for sessions with non-direct traffic sources (like affiliates or email)—can definitely be confusing. It seems that GA4 is either discarding or not correctly associating UTM parameters at the event level for these sessions. While the GA4 UI still shows the correct session-level source/medium values, the BigQuery export doesn’t include session-scoped data, which creates gaps in your analysis.

Why Is This Happening?

Event-Level vs. Session-Level Data


GA4 exports all data to BigQuery at the event level, not the session level. Here’s what that means:

  • Session-specific fields like source and medium aren’t natively available in BigQuery.
  • When ignore_referrer = TRUE, the event-level UTM parameters may be removed, making sessions look like they’re coming from "direct" traffic instead.

What Could Be Causing It?

  • Misconfigurations in GTM or GA4: Even if you haven’t explicitly configured ignore_referrer in Google Tag Manager, default settings might be influencing it.
  • UTM Parameter Handling: GA4 might be ignoring UTM parameters for certain traffic sources when specific conditions aren’t met.

How to Solve this issue

Here are some solutions you can try to resolve or minimize this problem:

1. Reconstruct Session-Level Source/Medium in BigQuery


Since GA4’s BigQuery export doesn’t include session-level fields, you can rebuild the source/medium data yourself by aggregating and propagating event data.

Steps:

  • Identify session_start events, which usually contain the correct UTM parameters.
  • Use SQL logic to forward the source, medium, and campaign values from session_start to all subsequent events in the same session.

Here’s an example SQL query to propagate session-level source and medium:

 

WITH session_data AS (
SELECT user_pseudo_id,
MIN(event_timestamp) AS session_start_time,
MAX(CASE WHEN event_name = 'session_start' THEN traffic_source.source END) AS session_source,
MAX(CASE WHEN event_name = 'session_start' THEN traffic_source.medium END) AS session_medium
FROM `your_project.dataset.events_*`
GROUP BY user_pseudo_id )
SELECT e.*,
sd.session_source,
sd.session_medium
FROM `your_project.dataset.events_*` AS e
LEFT JOIN session_data AS sd
ON e.user_pseudo_id = sd.user_pseudo_id
AND e.event_timestamp >= sd.session_start_time;

This query identifies the session-level source and medium from session_start events and applies them to all events within that session.

2. Review Your GTM and GA4 Configuration


Even if you haven’t manually set ignore_referrer:

  • Double-check your GTM tags: Ensure there are no custom scripts or misconfigurations that could be clearing UTM parameters.
  • Verify GA4 Admin Settings: Look for any traffic filters or exclusions that might be affecting your data.

3. Use Third-Party Tools to Simplify the Process


If writing SQL queries feels like too much work, third-party tools like Windsor.ai can make this process easier. Tools like Windsor.ai can:

  • Enrich GA4 raw data with session-level details.
  • Provide pre-aggregated source/medium data, helping you avoid issues caused by ignore_referrer.

These platforms automate much of the data handling, making it seamless to integrate GA4 data into BigQuery without gaps.

Key Takeaways

  • Use SQL logic to reconstruct session-level source/medium values in BigQuery.
  • Double-check GTM and GA4 settings to rule out any misconfigurations that might trigger ignore_referrer.
  • Consider third-party tools like Windsor.ai to simplify integration and data enrichment.

By following these steps, you can close the gap between event-level data in BigQuery and the session-level insights visible in the GA4 UI.  Hope this helps!