简体   繁体   中英

Extract data using Google Analytics API without login gmail account

I am using Googe Analytics API. I had successfully configured google analytics api and get successful data but issue is that when I use any other email account to login and view the page, it says authentication issue.

I want to access analytics api without gmail login. I will hard code credentials to for login, but how to do it with javaScript?

How to get analytics data without login in api?

So if I am correct, you want to retrieve data from a Google specific account without having to log in or sign in that account.

You could use tokens to connect the API rather than manually log in (if that is what you are referring). Other options could be extracting the data into a virtual repository that you can use for presentation layer on the client side so you don't have to deal with credentials or security flaws on having to log in or hard code the authentication.

This should be do-able on javascript and jquery to make your data viewable.

To query GA without authenticating each time you will need obtain and store the refresh token while authenticating GA. (not sure if we can retrieve refresh token with Js)

Once we have refresh token we can query API for access token again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM