google-analyticsgoogle-apiservice-accountsgoogle-developers-consolegoogle-reporting-api

Google Analytics - Does the Service Account have to be created from the Google profile that hosts the Google Analytics Account?


I am currently using access and refresh tokens to pull data from the Google Analytics Reporting API (v4). As I work to automate the extraction of data from Google Analytics, I hope to shift to using a Service Account. My question is does the Service Account have to be created from the Google profile that hosts the Google Analytics Account?


Solution

  • Anyone can create the service account but in order for the service account to have access to the analytics data you must take the service account email address and add it as a user in the Google analytics admin section at the account level then it will be able to read the data.

    So as long as you know someone with admin access to the google analytics account it doesnt matter who creates the service account.