I am using Embed API to display Google Analytics statistics on charts by following this tutorial https://github.com/googleanalytics/embed-api-demos/blob/master/site/1-basic-dashboard.html According to this user has to login each time to see charts.But the problem is that for deployed applications we dont want to give our email id and pass to client.Os there is a way to generate a access or refresh token using java script.If so then show an example sniped code. Thanks in advance!
It sounds like you are trying to give others access to see your own Google Analytics account. Unfortunately there is no secure way to do this with the embedded API. It will always require authentication because its JavaScript and runs client side.
What I recommend you do instead would be to create a service account to access the Google Analytics API and then use Google charts to display similar graphics your users will then be able to see your data. You will have to create all of this in a server sided programing language.
Due to security reasons it is not possible use a service account with JavaScript.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加