angular-ganalytics
v1.0.0
Published
Consuming Google Analytics Core Reporting Service (Server - Server) Auth to display Reports & dashboards with angularJS, NodeJS & Google Charts.
Downloads
31
Maintainers
Readme
angular-gAnalytics
Consuming Google Analytics Core Reporting Service (Server - Server) Auth to display Reports & dashboards with angularJS, NodeJS & Google Charts.
Server NodeJs Backend
Follow these steps before deploying your server:
- Register an application in Google API console center.
- Enable Analytics API.
- Create a service account [Manage Service Account] (https://console.developers.google.com/permissions/serviceaccounts).
- Register the newly created service account email into the Google Analytics property in permission section under property administration.
- Create New Credentials (Service Account private Key .p12) [Manage Credentials] (https://console.developers.google.com/apis/credentials).
- Transform your .p12 key to .pem to sign yours JWT, in order to achieve that you should have openSSl installed on your machine
> openssl pkcs12 -in YOUR_PRIVATE_KEY_FILE.p12 -out demo_certificate.pem -nodes
- You should store your pem key in safe place on your server.
- Update config.js file
'GA_SERVICE_ACCOUNT': 'GOOGLE SERVICE ACCOUNT',
'GA_KEY_PATH': "PEM KEY PATH",