# gatographite

> Fetch Google Analytics statistics and send them to Graphite

Latest version **0.1.0** (published 2015-06-03) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install gatographite
pnpm add gatographite
yarn add gatographite
bun add gatographite
```

Provides the command `gatographite`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2015-06-03 |
| First published | 2015-06-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.7 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+6 in 3 direct dependencies) |
| Install scripts | no |
| Author | Peter Hedenskog |
| Maintainers | soulgalore |
| Keywords | google, analytics, ga, graphite, metrics, rum |

## Links

- npm: https://www.npmjs.com/package/gatographite
- npm.io page: https://npm.io/package/gatographite

## Dependencies (3)

- [moment](https://npm.io/package/moment.md) 2.10.3
- [minimist](https://npm.io/package/minimist.md) 1.1.0
- [googleapis](https://npm.io/package/googleapis.md) 2.0.4

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2015-06-03
- 0.0.6 — 2015-06-03
- 0.0.5 — 2015-06-03
- 0.0.4 — 2015-06-03
- 0.0.3 — 2015-06-02
- 0.0.2 — 2015-06-02
- 0.0.1 — 2015-06-02

## README

# Push Google Analytics data to Graphite

[![Build status][travis-image]][travis-url]

Fetch your Google Analytics data and send it to Graphite, massive love to  https://github.com/etsy/GoogleAnalyticsToGraphite for inspiration.

If you prefer Docker, you can use the Docker image: https://registry.hub.docker.com/u/sitespeedio/gatographite/

## Setup your Google Account and setup everything
To fetch the metrics from Google Analtics, we use the Google API v3. To get it up and running, it needs a couple of things. I'll add the steps asap but if you follow these http://www.bentedder.com/server-to-server-authorization-for-google-analytics-api-with-node-js/ instructions for now, it will hopefully work :)

## Configuration
You can either feed the script with params (check cli.js, I'll add docs later) or add your values to the export.sh file and source it, then all values are fetched from the environment variables.

### Choosing which data to fetch
Metrics that you can fetch is the one in the Google Analytics API:
https://developers.google.com/analytics/devguides/reporting/core/dimsmets

You choose that by giving a comma separated list to *metrics* like this:
```
gatographite --metrics ga:pageviews,ga:sessions,ga:avgTimeOnSite,ga:domContentLoadedTime
```

## Run

```
// Fetch data from yesterday and send to Graphite
gatographite
```

```
// Fetch data from three days back -> today and send to Graphite
gatographite 3
```

```
// Send data for a specific date
gatographite 2015-06-01
```

## Install
```
npm install -g gatographite
```



[travis-image]: https://img.shields.io/travis/soulgalore/gatographite.svg?style=flat-square
[travis-url]: https://travis-ci.org/soulgalore/gatographite

---
_Source: https://npm.io/package/gatographite · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
