Hey guys, i have a doubt in setting up the session...
# ask-questions
Hey guys, i have a doubt in setting up the session count metric for the GA4 account connected to Bigquery. I know we have session_start metric. But when ever the repeat user visits the website the session_start metric doesn't works well. So i want to count the total session based on session_id which gets recorded in the event_params key. Below is the example of query i set up in the GB but the end results which results in the experiment is very huge (If the user count is 1000, the session count which appears there is 20k) SELECT user_pseudo_id as anonymous_id, TIMESTAMP_MICROS(event_timestamp) as timestamp, count( DISTINCT CONCAT( user_pseudo_id, "-", ( SELECT value.int_value FROM unnest (event_params) WHERE key="ga_session_id" ) ) ) as value FROM
I guess i need to count the unique session id based on user_pseudo_id any idea on how to that please ?? @helpful-application-7107
Hey @fresh-football-47124 please help me with the above.
you need more where clauses as you’ve unnesting the event params
you’re going to get a row per param
but you should be able to run this in BigQuery to get the data right
you might just need to unique by user_pseudo_id
We tried adding DISTINCT for user_pseudi_id at the select statement but still, the numbers are huge. Yeah we can get the data at the big query right, but how to capture the right session counts for tracking purposes please let me know @fresh-football-47124 @cuddly-finland-73937
If you managed to query the data correctly in BQ, you can just use that in GrowthBook