项目
在 GitHub 查看
tanyazyabkina/GA4_API_python
关于
Download GA4 data summaries using Google Analytics Data API and python
数据与分析实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 0
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Google Analytics 4 (GA4) Data API with Python
Important links:
- Google Quickstart guide: https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries
- API dimensions and metrics: https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema
- Google developer's guides: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties https://googleapis.dev/python/analyticsdata/latest/data_v1beta/beta_analytics_data.html
Blog post with detailed instructions: https://probabilistically.com/ga4-bigquery-backfill/
The overview of the process:
- Get API keys: create a GCP project, authorize Google Analytics Data API, create a service account, create JSON keys for the account.
- Add service account as a viewer to your GA4 propert(Admin->User Management)
- Install google-analytics-data package.
- Set os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = 'your_api_key.json'
- Send request, get output. Done!
If you have trouble installing/importing Google Analytics data in your environment, run the code on Google Colab. The JSON would need to be saved as the key
探索相关项目
加载中…