ga_session_id is unique identifier on Google Analytics?

Viewed 3873
3 Answers

ga_session_id is not supposed to be globally unique (afaik it's based on a skewed in-device timestamp) but in most circumstances (except for edge cases) it should be locally unique for a given user_pseudo_id

session_id is not unique (two or more users can have the same session_id).

It is just timestamp when the session started, so we need to concat session_id and user_pseudo_id or user_id.

I think the problem is the query used, with this I see the unique values associated correctly in my data:

SELECT event_timestamp, user_id, user_pseudo_id, event_name, event_params.value.int_value AS session_id 
FROM `MYTABLE`,
UNNEST (event_params) AS event_params
WHERE event_params.key = "ga_session_id" LIMIT 1000
Related