React : Get data from Google Analytics API

Viewed 551

I'm creating an application using React and Laravel.

I integrated successfuly Google Analytics using this react-ga so when I check my Analytics dashboard the statistics of the pages of my project are there.

Now I want to display those data in my application to the users.

I've searched alot and I found that I need to use Embed API. The problem here is that it request an authentification each time a user want to access to the data. Searched some more and the solution was apparently to setup a service account as a user in Google Analytics.

Now that I have the account set, the API key generated, I don't know how to call the data from the server to my application.

There is this guide for javascript but I had a hard time implementing in React.

0 Answers
Related