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
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:
Solutions:
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;