Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kanekotic
committed
Jul 2, 2018
1 parent
bbeb06c
commit 7b8fd7f
Showing
2 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters