Skip to content

Commit

Permalink
updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kanekotic committed Jul 2, 2018
1 parent bbeb06c commit 7b8fd7f
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 6 deletions.
52 changes: 50 additions & 2 deletions README.md
@@ -1,2 +1,50 @@
# gatoes
google analytics exporter to elastic search
# ![logomakr_32f2md](https://user-images.githubusercontent.com/3071208/42147664-29898cca-7dcf-11e8-9c50-2cf3845b7fe8.png)


this project will provide a command line and a library to export google analytics to your prefered endpoint (console, log management, or db).

## Use as library

currently you can retrieve in a simple way data from google analytics and route it to your prefered output. An example of retreaval is the next one.

```js
const importer = require('../lib/index').importer
path = require('path')

const email = 'your email' //email account from the user credentials
keyPath = path.join(__dirname, 'your credentials')// path to credentials json or pem
config = {
viewId: "some viewId",//the view id to query
daterange:{
"endDate":"2017-06-30",
"startDate":"2016-06-30"
},
metrics: "ga:users",
dimensions: "ga:date"
}

const example = async () => {
const result = await importer(email, keyPath, config)
console.log(JSON.stringify(result.data))
}

example()
```

## Use as Command Line

Soon

## TODO

- [x] Retrieve data from google analytics
- [x] Xreate library
- [ ] Create adapter for output console
- [ ] Create adapter logstash
- [ ] Create adapter fluentd
- [ ] Create adapter ES
- [ ] Create command line tool

### Logo
Check out the new logo that I created on <a href="http://logomakr.com" title="Logo Makr">LogoMakr.com</a> https://logomakr.com/32f2Md

8 changes: 4 additions & 4 deletions package.json
@@ -1,14 +1,14 @@
{
"name": "gatoes",
"name": "gatoo",
"version": "0.0.1",
"description": "google analytics export to elastic search",
"main": "index.js",
"description": "google analytics export",
"main": "lib/index.js",
"repository": "git@github.com:kanekotic/gatoes.git",
"author": "kanekotic <alvarojosepl@gmail.com>",
"license": "MIT",
"private": false,
"bin": {
"gatoes": "bin/gatoes.js"
"gatoo": "bin/gatoo.js"
},
"keywords": [
"command line",
Expand Down

0 comments on commit 7b8fd7f

Please sign in to comment.