How can we access specific Google Analytics accoun

2019-02-19 20:28发布

We're developing a web application that allows clients to create and display products. We'd like to provide our clients with metrics from our Google Analytics account regarding their products in their administration panel.

Unfortunately, the GA API documentation does not shed any light on how to do this; all the example are based around OAuth 2.0 authentication in order to gain access to a users GA data instead of the site account.

Is there a way to access Google Analytics data for an account we have access to but the user of the web application does not? I suspect the answer is "no", but if so is there a way we can technically achieve this?

3条回答
beautiful°
2楼-- · 2019-02-19 21:26

You can create your own dashboard by accessing the analytics data with an API. See https://developers.google.com/analytics/devguides/reporting/

查看更多
爷、活的狠高调
3楼-- · 2019-02-19 21:27

GAPI can do this for you, the account details go in the code rather than needing a user to auth a GA account: GAPI - Google Analytics API PHP Interface

查看更多
Evening l夕情丶
4楼-- · 2019-02-19 21:31

Is there a way to access Google Analytics data for an account we have access to but the user of the web application does not?

Yes, you can use a refresh token. Store the refresh token in a db or secure config file, then use it to show the client stats on their dashboard.

查看更多
登录 后发表回答