Giter Club home page Giter Club logo

gatographite's Introduction

Push Google Analytics data to Graphite

Build status

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

gatographite's People

Contributors

soulgalore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gatographite's Issues

Console output

I guess it makes sense to show output or some kind of error message when pushing data to graphite. I wasted a lot of time for debugging yesterday and realized that my graphite was on other port...

analytics2influx: A little clone of your project

Hello Peter,

I just wanted to let you know, that I created an analytics2influx library, which is heavily inspired by gatographite. I hope you are ok with it and both projects can coexist peacefully :)

I'd like to port some of my additions back to your project if you like to. For instance:

  • GA Realtime Reporting API
  • configurable dimensions

Cheers,
Steffen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.