GA4 UI vs BigQuery Export - Paid Search Differences

Hi, 

We are having problems to math Paid Search traffic source ( session based ) between GA4 UI and BigQuery Export. Can someone help?

Problem: Session Traffic Medium doesn’t match between GA4 Export and GA4 UI. 

  • GA4 Export in BQ: Almost all session medium are associated with organic or referral for google source traffic ( unnest(event_params) as ep where ep.key = "medium") - and we were expecting to see cpc. The cpc appears only in the user_medium - which is the traffic_medium column which is related to the user acquisition (very first access) NOT the traffic acquisition.
  • GA4 UI: There are several session where the session medium is set as cpc ( session traffic medium ) that doesn't exist in BigQuery

paid_search_ga4_ui.jpgpaid_search_ga4_big_query.jpg

We've followed the the article below ( session based queries )
ga4bigquery.com/traffic-source-dimensions-metrics-ga4

@ms4446 

Solved Solved
0 3 1,118
1 ACCEPTED SOLUTION

We are experiencing the same issue and it's a massive headache. We export GA4 data from BigQuery and it gets used in many downstream reports. The issue seems to be specific to Google and Bing. 

Events that are clearly google/cpc (have a gclid present) are almost always tagged as google/organic and have no other auto-tagged params. Often, no campaign name is present. It could be a tagging issue, but we've checked campaigns and can't find any glaring issues.  I'm having to ask marketers to auto-append utms to separate event parameters and then I remap them correctly in our warehouse. This is incredibly frustrating, especially since Google Ads and GA4 are both Google products

Is there any work being done to remedy this problem? I've seen references to this issue going back over a year, but no official direction in GA4's documentation. Even Google's new AI tool is telling me this is a known issue... Given the fast-approaching deprecation of UA we are in a bit of a bind here. Thanks.

View solution in original post

3 REPLIES 3

The issue you're facing with the mismatch in session traffic medium between GA4 UI and BQ Export is a complex one, often arising from differences in how data is processed and attributed in GA4 and BigQuery. Here are some potential causes and solutions:

  1. Data Processing and Attribution Differences: GA4 UI and BigQuery might process and attribute session data differently. In GA4 UI, the session medium might be updated in real-time based on user interactions, while in BigQuery, the data might be more static, reflecting the state at the time of export. This can lead to discrepancies, especially for metrics like session medium which can change based on user behavior.

  2. User Acquisition vs. Traffic Acquisition: In your BigQuery export, it seems that the user_medium (related to the user's first access) is showing 'cpc', but the session medium (related to specific sessions) is showing as 'organic' or 'referral'. This indicates that while users may initially come through paid search (cpc), their subsequent sessions are being attributed to organic or referral sources. This is a key distinction as GA4 UI might be showing session medium based on the latest session, whereas BigQuery is showing the medium associated with the user's first interaction.

  3. Query Structure in BigQuery: The way you're querying the data in BigQuery might be affecting the results. When you unnest event_params and filter where ep.key = "medium", ensure that you're accurately capturing the session-level medium and not just the user-level medium. It might be necessary to adjust the query to better align with how GA4 UI attributes session medium.

  4. Session Definition and Boundaries: Ensure that the definition and boundaries of a session are consistent between GA4 UI and your BigQuery queries. Differences in session timeout settings, user inactivity periods, and other session parameters can lead to different session attributions.

  5. Check for Data Latency: There could be a latency in data export from GA4 to BigQuery. If the data in BigQuery is not up-to-date, it might not yet reflect the most recent session mediums.

  6. Review Tagging and Configuration: Incorrect or inconsistent tagging in GA4 can lead to discrepancies in how session mediums are reported. Review your GA4 configuration and tagging setup to ensure accuracy.

To troubleshoot further:

  • Revisit Your BigQuery Query: Review and possibly revise your BigQuery query to ensure it aligns with how GA4 UI reports session medium. Pay attention to how sessions are defined and how different parameters are being interpreted.

  • Compare with Other Reports: Use other reports in GA4 and BigQuery to cross-validate the data. This can help identify if the issue is isolated to specific reports or a broader data processing issue.

This is a frequently encountered scenario. Here are some links/articles that have helped us.

Bridging the gap between Google Analytics UI and BigQuery export: https://developers.google.com/analytics/blog/2023/bigquery-vs-ui

Why your BigQuery results don't (exactly) match with Google Analytics reports (GA4)https://www.ga4bigquery.com/why-your-bigquery-results-dont-exactly-match-with-the-google-analytics-r...

If you are using the direct integration to BigQuery, you could also explore using the Analytics Data Api instead: https://developers.google.com/analytics/devguides/reporting/data/v1

Hope this helps! 

We are experiencing the same issue and it's a massive headache. We export GA4 data from BigQuery and it gets used in many downstream reports. The issue seems to be specific to Google and Bing. 

Events that are clearly google/cpc (have a gclid present) are almost always tagged as google/organic and have no other auto-tagged params. Often, no campaign name is present. It could be a tagging issue, but we've checked campaigns and can't find any glaring issues.  I'm having to ask marketers to auto-append utms to separate event parameters and then I remap them correctly in our warehouse. This is incredibly frustrating, especially since Google Ads and GA4 are both Google products

Is there any work being done to remedy this problem? I've seen references to this issue going back over a year, but no official direction in GA4's documentation. Even Google's new AI tool is telling me this is a known issue... Given the fast-approaching deprecation of UA we are in a bit of a bind here. Thanks.