Google Analytics API Python quickstart

279 Views Asked by At

I would like to get some data out of Google Analytics. On step 3.3 on the quickstart guide is written to replace the value of SERVICE_ACCOUNT_EMAIL. The problem is that I cant find the variable SERVICE_ACCOUNT_EMAIL. Neither in the client_secrets.json file nor in the HelloAnalytics.py file.

Any ideas?

Guide: https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-py

1

There are 1 best solutions below

2
On BEST ANSWER

It's in the JSON file with the key "client_email" (at least in all my key files), and you should find it in the "IAM and admin" section of the API console (or Cloud console as it is apparently called now).

However you do not need to enter this anywhere. This is a typo, or a holdover from a previous version of the API. The analytics module will take the email address from the json file.