📢 Report number of PVs per week
- Run
npm install
$ npm install --global ga-reporter
-
Enable Reporting API v4
Enable Reporting API v4 and save the authentication information asclient_secrets.json
.
For more information. -
Add service account to the Google Analytics account
You can use the mail address of itemclient_email
of theclient_secrets.json
. Use this email address to add a user to the Google analytics view.
For more information. -
Setup
Runga-reporter
and Enter the absolute path ofclient_secrets.json
and a View ID.
You can use the Account Explorer to find a View ID.
$ ga-reporter
? Enter your client_secrets.json's path: /home/username/client_secrets.json
? Enter your a viewID: 123456
$ node index.js --help
Usage
$ ga-reporter <input>
Options
--delete, -d Delete settings