Sihyun Kwon
Sihyun Kwon

Reputation: 41

ga_session_id is unique identifier on Google Analytics?

I checked the official docs here: https://support.google.com/firebase/answer/7061705?hl=en

enter image description here

But, when I checked my data, there are several user_id and user_pseudo_id in one ga_session_id. How is it possible?

enter image description here

Upvotes: 4

Views: 14829

Answers (3)

foxchip
foxchip

Reputation: 111

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.

Upvotes: 7

Romulo Carvalho
Romulo Carvalho

Reputation: 121

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

Upvotes: 12

Michele Pisani
Michele Pisani

Reputation: 14179

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

Upvotes: 0

Related Questions