Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedi4ever/gars
Google Analytics Realtime Scraper (using CasperJs)
https://github.com/jedi4ever/gars
Last synced: about 2 months ago
JSON representation
Google Analytics Realtime Scraper (using CasperJs)
- Host: GitHub
- URL: https://github.com/jedi4ever/gars
- Owner: jedi4ever
- Created: 2014-02-10T10:21:17.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-04-29T20:17:37.000Z (over 7 years ago)
- Last Synced: 2024-10-08T15:14:54.586Z (3 months ago)
- Language: JavaScript
- Size: 164 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Google Analytics Real Time Scraping
==============================================
Currently logs in to Google Analytics and scrapes the realtime page for the active visitors number from the overview screen.Notes:
- Inspired by:
-
-
- Currently only support datadog as a backend, more to come soon
- This project uses casperjs to scrape the metrics# Installation
## Using the official npm
`$ npm install -g gars`## From this repo
```
$ git clone http://github.com/jedi4ever/gars.git
$ npm install
```# Configuration
```
{
"google": {
"email": "",
"password": "",
"analytics": {
"home_id": "",
"report_id": ""
}
},
"casperjs": {
"verbose": true,
"logLevel": "info"
},
"metric": {
"name": "google.analytics.visitors",
"tags": [ "tag1", "tag2" ],
"hostname": ""
},
"backend": {
"datadog": {
"api_key": "`## From npm (global)
`$ gars `## From npm local
`$ ./node_modules/gars/bin/gars `# Finding the ids
Once logged into the analytics. Note the following ids:- `google.analytics.home_id` : `https://www.google.com/analytics/web/?hl=en#home//`
- `google.analytics.report_id` : `https://www.google.com/analytics/web/?hl=en#report/visitors-overview//`# Notes
- http://stackoverflow.com/questions/19617113/hide-the-footprint-of-casperjs-with-google-analytics