panakour / google-analytics

Get data from google analytics (API v4) using PHP
MIT License
26 stars 10 forks source link

Request access to another account's analytics data? #8

Closed newalphamedia closed 3 years ago

newalphamedia commented 4 years ago

Hello!

Is it possible using this library to request access to someone else's google analytics account with "read only" permissions? For example, you could send someone a link where they follow it and login and accept - your application will then have access to that accounts reporting? This would be quite useful for third parties who need support - do you know if it's possible? I believe it would work with google's "oauth" system, somehow?

Thank you.

panakour commented 4 years ago

Hello, I think it would work following the bellow guide https://github.com/panakour/google-analytics#create-credential-with-google-analytics-api-v4

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