简体   繁体   English

如何从 google Analytics Api 获取记录的每个事件的数据?

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

I need to import from G-Analytics to Amplitude the historical data.我需要从 G-Analytics 将历史数据导入 Amplitude。 The amplitude api show a data example of how to prepare the dato to ulpload to his site.振幅 api 显示了一个数据示例,说明如何准备数据以上传到他的站点。

I need to export from GA each event ever recorded this fields and values:我需要从 GA 中导出每个记录过这些字段和值的事件:

{"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} {“event_type”:“MainLandingScreen”,“revenue”:null,“ip”:null,“device_manufacturer”:null,“location_lng”:null,“city”:“旧金山”,“event_properties”:{},“平台”:“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" ": "湾区", "user_properties": {"性别": "男", "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? GA的api可以查到这种信息吗? or maybe with BIG-QUERY?或者可能使用 BIG-QUERY?

Yes, exporting GA4 to BQ would be much easier than trying to access GA4's data through the reporting api .是的, 将 GA4 导出到 BQ比尝试通过报告 api访问 GA4 的数据要容易得多。

Once your data is in BQ, you'll have a lot more options for further export since there are many connectors to BQ in various ETL tools.一旦您的数据在 BQ 中,您将有更多的选择来进一步导出,因为在各种 ETL 工具中有许多连接到 BQ 的连接器。 BQ offers many comfy options for data export too. BQ 也提供了许多舒适的数据导出选项。

Oh, you may need to flatten your GA4 table in BQ since it stores event and user properties as json. And, surprise-surprise, BQ is incapable of querying json. Pretty odd decision on Google's side to store the data like that.哦,您可能需要在 BQ 中展平您的 GA4 表,因为它将事件和用户属性存储为 json。而且,令人惊讶的是,BQ 无法查询 json。谷歌方面做出如此存储数据的决定非常奇怪。 Anyhow, there are many articles indicating how to do that, here's a good one: Flattening Google Analytics data (with repeated fields) not working anymore无论如何,有很多文章指出如何做到这一点,这里有一篇很好: Flattening Google Analytics data (with repeated fields) not working anymore

GA Data API will only return aggregated data and will not provide user level data like your example. GA 数据 API只会返回聚合数据,不会像您的示例那样提供用户级别的数据。

You can use BigQuery export for Google Analytics to retrieve user level data.您可以使用Google Analytics 的 BigQuery 导出来检索用户级别的数据。 However, this will exclude demographic information as well as device id.但是,这将排除人口统计信息和设备 ID。 You can review the GA4 web-ecommerce-demo-dataset to understand what data you can expect to get from BigQuery.您可以查看GA4 web-ecommerce-demo-dataset以了解您可以从 BigQuery 获得哪些数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过从 Google Analytics 4 Data API 中的前端发送的特定参数读取自定义事件? - How can I read a custom event by a specific parameter sent from the frontend in Google Analytics 4 Data API? Google Analytics 4 报告了 api 个过时数据 - Google Analytics 4 reported for api outdated data 通过 oauth2(同意屏幕)从 Google Analytics Data API (Ga4) 中提取数据 - Extract data from Google Analytics Data API (Ga4) via oauth2 (consent screen) Sending Google Analytics Events via API: How to get app_instance_id or client_id from Firebase SDK from web client? - Sending Google Analytics Events via API: How to get app_instance_id or client_id from Firebase SDK from web client? 如何在没有 BigQuery 的情况下使用 api 从 Firebase 分析中获取原始事件? - how to get raw events from Firebase analytics using api without BigQuery? Google 日历 API 将事件数据发送到 Google PubSub - Google Calendar API sending event data to Google PubSub 谷歌分析对旧数据的访问 - Google analytics access to old data Google Analytics 获取实时报告 - Google analytics get realtime report 如何在 nodejs @google-analytics/data library 中查询综合浏览量 - How to query pageviews in nodejs @google-analytics/data library 如何外部化 API Manager Analytics - How to externalize API Manager Analytics
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM