google cloud platform - Trouble Looking For Events WITHIN a Session In BigQuery or WITHIN Multiple Sessions -


i wanted second pair of eyes & confirming best way within session @ hit level in bigquery. have read bigquery developer documentation thoroughly that provides insight on working within session. challenge this. let assume write high level query count number of sessions exist , group sessions device.device category below:

select device.devicecategory,  count(distinct concat (fullvisitorid, string (visitid)), 10000000) sessions (table_date_range([xxxxxx.ga_sessions_], timestamp('2015-01-01'), timestamp('2015-06-30'))) group each device.devicecategory order sessions desc 

i run follow query following find number of distinct users (client id's):

select device.devicecategory,  count(distinct fullvisitorid) users (table_date_range([xxxxxx.ga_sessions_], timestamp('2015-01-01'), timestamp('2015-06-30'))) group each device.devicecategory order users desc 

(note broke because of sheer size of data working produces runs greater 5tb in cases).

my challenge following. feel have wrong approach , have not had success within function. every user id (or full visitor id), want within various sessions find out how many sessions many had desktop , how many mobile. basically, these cross device users. want collect table these users. started here:

select count(distinct concat (fullvisitorid, string (visitid)), 10000000) sessions (table_date_range([xxxxxx.ga_sessions_], timestamp('2015-01-01'), timestamp('2015-06-30'))) device.devicecategory = 'desktop' , device.devicecategory = 'mobile' 

this not correct though. moreover, version write of within query giving me non-sense results or results have 0 number. have strategies or tips recommend way forward here? best way use within function sessions may have multiple events happening within session (with goal being collecting user id's meet requirements within session or on various sessions). 2 days ago did in manual way manually working through steps , saving intermediate data frames generate counts. said, wanted see if there guidance using single query?

i'm not sure if question still open on end, believe see problem, , not misuse of within function. data understanding problem.

when dealing ga , cross-device identification, cannot reliably use combination of fullvisitorid , visitid identify users, these derived cookie ga places on users browser. thus, leveraging fullvisitorid identify specific browser on specific device more accurately specific user.

in order track users across devices, must able leverage userid functionality follow link. requires have user sign in in way, giving them identifier can use across of devices , tie behavior together.

after implement type of user identification can control, rather ga's cookie assignment, can use details across sessions , within individual sessions.

hope helps!


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -