Monday 15 July 2013

oauth 2.0 - Google Analytics - Access custom segments through Service Account -



oauth 2.0 - Google Analytics - Access custom segments through Service Account -

my application needs fetch google analytics info backend servers.

i using google service business relationship in application. though have given permissions service business relationship through google developer console, turns out service business relationship cannot access custom segments of user account.

a way have been re-create these segments user business relationship service account, there seems no way login via service business relationship , able re-create segments user business relationship service account.

so, there seems no way able fetch custom segments in web application backend...

is there way so? can other account(web application, installed application account) serve purpose? reading documentation of above 2 google accounts reveals user prompted authentication (at to the lowest degree once) during authorization in these 2 accounts not feasible in backend servers.

i found similar thread query google analytics v3 - how create custom segments api service accounts , user in thread resorted not using segments @ all, need utilize them in account.

ps: writing application in rubyonrails , using ruby gem google authentication

answer: no there no way add together segments service account. mangment api allows list segments not add together them. segment management api documentation

an idea: normal oauth2 authenticate using account, save refresh token someplace , utilize in application see data. application , able see segments.

sorry don't know ruby cant help getting thought working.

google-analytics oauth-2.0 google-analytics-api segments service-accounts

No comments:

Post a Comment