Export Google Analytics data (log of events) Export Google Analytics data (log of events) database database

Export Google Analytics data (log of events)


Google Analytics doesn't provide you with any data that contains id

Its a part of Google Analytics Premium, you get a full table of all the info you want about fullVisitorId and visitId (sessionId)

Big Query Export Schema has a detailed info about the data you can have


There exists a way to do this without going for the premium service of Google Analytics

Solution : If you don't want the data to get aggregated add dimensions of your choice to segment the data. In this case user_id and event_id

Approach one

In Google Analytics Event Report is something you can use,

Event Category : send the user_id, generated by your JS code

Event Action : send the event_id, again generated by your JS code

Event Label : foo

Date this is a default dimension that is available in Google Analytics

Approach two

Custom Dimesnion : send the user_id, generated by your JS code

Event Category : send the event_id, generated by your JS code

Event Action : foo

Date this is a default dimension that is available in Google Analytics

There are benefits of using the second approach is that, once you set the custom dimension with a user_id, you can use it most of the reports other than the event report.


Data can be extracted from Google Analytics using Core Reporting API