Simple Google Analytics Dashboard Demo written in React and Material UI, with python for getting authorization token from Google Cloud Platform.
- Node.js 10.x
- React 16.8.x
- Redux 4.0.x
- Pyhton 3
- Flask 1.1.x
- Google Analytics Embed API
- Google API Client Library for Python
- Get a service account by following this tutorial, copy the content of JSON file
- Create config file
./backend/instance/config.py
, put the copied content of step 1 as configSERVICE_ACCOUNT_CREDENTIALS='{...}'
- Enable Google Analytics API
- Add the service account created in step 1 to the Google Analytics view you wish to display
- Add the view id to
REACT_APP_GA_VIEW_ID
of./frontend/.env
- Configure the domain for getting authorization token (i.e. endpoint of Python backend)
- Frontend:
yarn install
- Backend:
yarn setup:backend
- Frontend:
yarn start:frontend
- Backend:
yarn start:backend
- Frontend:
yarn build:frontend
- Datepicker for changing date
- Refresh token (as token will expire in 1 hour)
- Responsive handling (the api does not support window resize)