问题
What can be the reason the user_id
is null
in BigQuery? Data from Analytics is sent to BigQuery but the user_id
is not passed along. The user_id
is sent to Google Analytics but what could be the reason it is not available in BigQuery?
回答1:
I am operating under the assumption that this field is intentionally held out from all Google Analytics -> BigQuery extracts based on the following:
- https://support.google.com/analytics/answer/6205850?hl=en#limits
- Of particular note, the line "The User ID value can not be queried as a dimension in reports in either the web interface or the APIs". I take this to mean that it will never leave the confines of Google Analytics, including to BigQuery.
- I have not been able to get anything but
null
in my tables either.
Sorry I do not have better news for you!
回答2:
Confirmed by Google Analytics 360 support, the userId
only have non-null values in BigQuery tables that are exported from User-ID enabled views in Google Analytics. For non-User-ID views, you only see null
values for the userId
column and you have to use a custom dimension to capture User Ids and query them in BigQuery.
In order to check which Google Analytics view you have linked to BigQuery, you can either look at the dataset ID in BigQuery (which is the same as the Analytics View ID) or directly the linked Google Analytics view in Admin > All Products [Property column] > BigQuery in the Google Analytics UI.
来源:https://stackoverflow.com/questions/38832034/user-id-not-showing-up-in-bigquery