0.0.7 • Published 10 years ago

gars-zombie v0.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

Google Analytics Real Time Scraping (using ZombieJs)

Currently logs in to Google Analytics and scrapes the realtime page for the active visitors number from the overview screen.

Notes:

Installation

Using the official npm

$ npm install -g gars-zombie

From this repo

$ git clone https://github.com/sirshurf/gars-zombie.git
$ cd gars-zombie
$ npm install

Configuration

{
	"scraper":   [{
			"google": {
				"email": "<your email>",
				"password": "<your password>"
			},
			"report": [{
				"analytics": {
					"home_id": "<your google analytics home id>",
					"report_id": "<your google analytics project id>"
				},
				"metric": {
					"backend":"datadog",
					"name": "google.analytics.visitors",
					"tags": [ "tag1", "tag2" ],
					"hostname": "<your hostname>"
				}

			}]
	}],

	"backend": {
		"datadog": {
			"type": "datadog",
			"api_key": "<your datadog api key",
			"url": "https://app.datadoghq.com/api/v1/series"
		}
	}

}

Running it

From this repo

$ ./bin/gars-zombie -c <config file>

From npm (global)

$ gars-zombie -c <config file>

From npm local

$ ./node_modules/gars-zombie/bin/gars-zombie -c <config file>

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/<home_id>/
  • google.analytics.report_id : https://www.google.com/analytics/web/?hl=en#report/visitors-overview/<report_id>/
0.0.7

10 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago