The "(not set)" value in the source and medium dimensions in Google Analytics 4 can have a few different reasons. Here are some of the most common:
The user did not come from a referral source. This could be because they came directly to your website or app, or they came from a social media platform or another channel that does not send referral information to Google Analytics.
The user's referral information was stripped by a third-party tool or service. Some ad blockers and other privacy tools can strip referral information from web pages, which can then result in "(not set)" values in Google Analytics.
There was an error in the measurement code. If the measurement code on your website or app is not properly implemented, it may not be able to collect referral information correctly. This can also result in "(not set)" values.
To troubleshoot "(not set)" values in the source and medium dimensions, you can use the following steps:
Check your website or app's measurement code to make sure it is properly implemented.
Use the "Referral Exclusions" setting in Google Analytics to exclude any third-party tools or services that may be stripping referral information.
Look for errors in your Google Analytics reports. If you see a lot of "(not set)" values, it may be a sign that there is an error in your measurement code.
If you are still having trouble with "(not set)" values, you can contact Google Analytics support for help. Here are some additional tips for troubleshooting "(not set)" values:
Use the "Real-Time" report to see if you can see the referral information in real time. This can help you to determine if the problem is with your measurement code or with the referral source itself.
Use the "Custom Dimensions" feature to create a custom dimension for the referral source. This can help you to track referral information even if it is not being sent to Google Analytics correctly.
Use the "Export" feature to export your Google Analytics data to a spreadsheet. This can help you to analyze your data more closely and to identify any patterns that may be causing "(not set)" values.
The best recommendation to understand how the GA4 is capturing the (not set) is from the "Custom Dimension" feature: Here are the steps on how to use the "Custom Dimensions" feature for the source in GA4:
Go to the Admin section of your Google Analytics account.
Click on the Custom Definitions tab.
Click on the Custom Dimensions tab.
Click on the Create Custom Dimension button.
In the Name field, enter a name for your custom dimension.
In the Dimension Type field, select Source.
In the Event parameter field, enter the name of the event parameter that contains the source information.
Click on the Create button.
Once you have created your custom dimension, you can use it in your Google Analytics reports. To do this, go to the Reports section of your Google Analytics account and select the report that you want to use. In the Dimensions section, select your custom dimension. This will add your custom dimension to the report.
Here is an example of how you can use a custom dimension to track the source of your traffic:
Create a custom dimension called source.
Set the dimension type to Source.
Set the event parameter to utm_source.
Now, whenever a user visits your website or app from a referral source, the source information will be stored in the source custom dimension. You can then use the source custom dimension to create reports that show you where your traffic is coming from. Here are some additional tips for using custom dimensions:
You can create multiple custom dimensions to track different types of data.
You can use custom dimensions to create custom reports that are tailored to your specific needs.
You can use custom dimensions to segment your data and create more accurate reports.
I hope this helps!
Comments