google-bigquerygoogle-analyticsamplitude-analytics

how to get from google Analytics Api data for each event recorded?


I need to import from G-Analytics to Amplitude the historical data. The amplitude api show a data example of how to prepare the dato to ulpload to his site.

I need to export from GA each event ever recorded this fields and values:

{"event_type": "MainLandingScreen", "revenue": null, "ip": null, "device_manufacturer": null, "location_lng": null, "city": "San Francisco", "event_properties": {}, "platform": "Android", "location_lat": null, "os_version": null, "app_version": "0.2", "os_name": "android", "device_brand": null, "user_id": "780834", "device_id": "be4c8f2d-7c3c-e323-5a17-46e19c07eb3f", "dma": null, "language": "English", "device_model": "Google Nexus 10", "country": "United States", "region": "Bay Area", "user_properties": {"gender": "male", "referral_source": "Facebook", "push_enabled": false, "location_enabled": true, "age": 19, "profile_source": "Twitter"}, "session_id": 1436682631504, "insert_id": "3b6e196f-9404-4d63-91e7-189221e20b88", "carrier": "Verizon", "time": 1436682981567}

it is posible to retrieve this kind of information from the api of GA? or maybe with BIG-QUERY?


Solution

  • GA Data API will only return aggregated data and will not provide user level data like your example.

    You can use BigQuery export for Google Analytics to retrieve user level data. However, this will exclude demographic information as well as device id. You can review the GA4 web-ecommerce-demo-dataset to understand what data you can expect to get from BigQuery.