Analytics PHP Interface (GAPI) User Impersonation -


i've got around 100 sites in analytics across few different google accounts , 1 single account has full permissions every site. if possible i'd avoid having manually add permissions google service account each analytics profile.

i'm using google analytics php interface

when attempting impersonate user using $delegate_email argument, following exception:

gapi: failed authenticate user. error: "{     "error": "unauthorized_client",     "error_description": "unauthorized client or scope in request." } 

i have read elsewhere needing 'delegate domain-wide authority service account' using google apps admin console. don't have google apps @ all. there way around this?

tl;dr there way read access google analytics using service account , impersonating user without google apps?

i first encourage go through various scenarios listed on google oauth 2.0 documentation , decide best application.

service account require add user each account wish access, web server application end user authorizes application read google analytics data.

the scope looking is:

https://www.googleapis.com/auth/analytics.readonly 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -