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

GA4 Export issue

DVS
Bronze 1
Bronze 1

Hi all ,

I am trying to analyse the number of transactions from the big query export of ga4 analytics to big query. But i often see that one session id has multiple mediums associated to it , is this normal? But the main problem i face is that, if there is a session with a transaction coming from a any particular medium, the value is not populated for that medium , but it is populated for a null medium ? why is that  and how can i solve this?

Thanks

1 1 1,875
1 REPLY 1

Yes, it is normal for one session ID to have multiple mediums associated with it. This can happen when a user visits your website or app through multiple channels during the same session. For example, a user might start their session by clicking on a paid search ad, then browse your website for a while, and then come back later through a direct link. In this case, both "paid search" and "direct" would be associated with the session ID.

If you are using the default attribution model, Google Analytics 4 will attribute the transaction to the last medium that the user interacted with before the transaction occurred. However, you can customize your attribution model to give credit to different mediums in different ways.

Transactions Associated with Null Medium

There are a few reasons why transactions might be attributed to the "null" medium:

  • Missing or incorrect UTM parameters: If the UTM parameters for a traffic source are missing or incorrect, Google Analytics 4 will not be able to identify the medium and will attribute the transaction to "null".
  • Direct traffic: Transactions from direct traffic are also attributed to "null". This is because direct traffic does not come from a known source or medium.
  • Referral exclusion: If you have excluded a referral source from Google Analytics 4, any transactions from that source will be attributed to "null".
  • Tracking issues: If there is a problem with your tracking code or setup, Google Analytics 4 may not be able to correctly identify the medium for transactions.

Solutions:

  • Audit UTM parameters: Make sure that all of your URLs are tagged correctly with UTM parameters.
  • Check referral exclusions: Make sure that you have not excluded any legitimate traffic sources from Google Analytics 4.
  • Review tracking configuration: Make sure that your GA4 tracking code is set up correctly.
  • Use BigQuery to clean data: You can use BigQuery to clean and transform your GA4 data to replace null mediums with a more meaningful value, such as "Unknown".

SQL Query in BigQuery:

The following SQL query can be used to replace null mediums with "Unknown":

 

UPDATE `dataset.table`
SET medium = 'Unknown'
WHERE medium IS NULL;
  • Deep dive into data: Before making any changes, conduct a thorough analysis to understand the reasons behind the issues. This will help you to identify the best solutions for your specific needs.
  • Consultation with experts: If you are unsure about how to troubleshoot the issue or implement the solutions, it is advisable to consult with a GA4 expert or data analyst.