{"id":17891359,"url":"https://github.com/alvarolorentedev/gatoo","last_synced_at":"2026-01-19T08:32:18.060Z","repository":{"id":40750779,"uuid":"138699643","full_name":"alvarolorentedev/gatoo","owner":"alvarolorentedev","description":"google analytics exporter to multiple outputs","archived":false,"fork":false,"pushed_at":"2024-08-31T21:12:21.000Z","size":1057,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T02:55:23.587Z","etag":null,"topics":["analytics","export","google","google-analytics"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvarolorentedev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["kanekotic"],"custom":["https://www.paypal.me/kanekotic/"]}},"created_at":"2018-06-26T07:18:07.000Z","updated_at":"2022-08-08T12:06:25.000Z","dependencies_parsed_at":"2024-10-28T14:28:47.158Z","dependency_job_id":"1e8a1266-f6ee-4767-91ac-60ef61286c08","html_url":"https://github.com/alvarolorentedev/gatoo","commit_stats":{"total_commits":348,"total_committers":4,"mean_commits":87.0,"dds":"0.13505747126436785","last_synced_commit":"d6674948e7736e5c0adbdf614111533402a3594e"},"previous_names":["kanekotic/gatoes","alvarolorentedev/gatoo","kanekotic/gatoo"],"tags_count":172,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarolorentedev%2Fgatoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarolorentedev%2Fgatoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarolorentedev%2Fgatoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarolorentedev%2Fgatoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvarolorentedev","download_url":"https://codeload.github.com/alvarolorentedev/gatoo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773730,"owners_count":20993633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","export","google","google-analytics"],"created_at":"2024-10-28T14:16:44.907Z","updated_at":"2026-01-19T08:32:18.044Z","avatar_url":"https://github.com/alvarolorentedev.png","language":"JavaScript","funding_links":["https://github.com/sponsors/kanekotic","https://www.paypal.me/kanekotic/"],"categories":[],"sub_categories":[],"readme":"# ![logomakr_32f2md](https://user-images.githubusercontent.com/3071208/42147664-29898cca-7dcf-11e8-9c50-2cf3845b7fe8.png)\n\n[![Build Status](https://travis-ci.org/kanekotic/gatoo.svg?branch=master)](https://travis-ci.org/kanekotic/gatoo)\n[![codecov](https://codecov.io/gh/kanekotic/gatoo/branch/master/graph/badge.svg)](https://codecov.io/gh/kanekotic/gatoo)\n[![npm](https://img.shields.io/npm/dt/gatoo.svg)](https://github.com/kanekotic/gatoo)\n[![GitHub license](https://img.shields.io/github/license/kanekotic/gatoo.svg)](https://github.com/kanekotic/gatoo/blob/master/LICENSE)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/kanekotic/gatoo/graphs/commit-activity)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/kanekotic/)\n\nthis project will provide a command line and a library to export google analytics to your prefered endpoint (console, log management, or db).\n\n## Use as Command Line\ninstall globally with `npm install gatoo -g`. Aftyer this it can be run with the next command:\n\n```bash\ngatoo console \u003cemail\u003e \u003cReplativePath\u003e \u003cviewId\u003e \u003cstartDate\u003e \u003cendDate\u003e \u003cmetrics\u003e \u003cdimensions\u003e\n```\n\n## Use as library\n\nfirst step is to add this to your project throught `yarn add gatoo` or `npm install gatoo`\n\ncurrently you can retrieve in a simple way data from google analytics and route it to your prefered output. An example of retrieval is the next one.\n\n### Import\n```js\nconst importer = require('../lib/index').importer\n    path = require('path')\n    \nconst email = 'your email' //email account from the user credentials\n    keyPath = path.join(__dirname, 'your credentials')// path to credentials json or pem\n    config = {\n    viewId: \"some viewId\",//the view id to query\n    daterange:{\n        \"endDate\":\"2017-06-30\",\n        \"startDate\":\"2016-06-30\"\n      },\n      metrics: \"ga:users\",\n      dimensions: \"ga:date\"\n    }\n\nconst example = async () =\u003e {\n    const result = await importer(email, keyPath, config)\n    console.log(JSON.stringify(result.data))\n}\n\nexample()\n```\n\n### Export\n```js\nconst exporter = require('../lib/index').exporter\n    path = require('path')\n    \nconst email = 'your email' //email account from the user credentials\n    keyPath = path.join(__dirname, 'your credentials')// path to credentials json or pem\n    config = {\n    viewId: \"some viewId\",//the view id to query\n    daterange:{\n        \"endDate\":\"2017-06-30\",\n        \"startDate\":\"2016-06-30\"\n      },\n      metrics: \"ga:users\",\n      dimensions: \"ga:date\"\n    }\n\nconst doSomething () =\u003e {}\n\nconst example = async () =\u003e {\n    const result = await exporter(email, keyPath, config,  doSomething)\n}\n\nexample()\n```\n\n### Export to console\n```js\nconst exporter = require('../lib/index').outputTo\n    path = require('path')\n    \nconst email = 'your email' //email account from the user credentials\n    keyPath = path.join(__dirname, 'your credentials')// path to credentials json or pem\n    config = {\n    viewId: \"some viewId\",//the view id to query\n    daterange:{\n        \"endDate\":\"2017-06-30\",\n        \"startDate\":\"2016-06-30\"\n      },\n      metrics: \"ga:users\",\n      dimensions: \"ga:date\"\n    }\n\nconst example = async () =\u003e {\n    const result = await outputTo.console(email, keyPath, config)\n}\n\nexample()\n```\n\n## TODO\n\n- [x] Retrieve data from google analytics \n- [x] Create library\n- [x] Create adapter for output console  \n- [x] Create command line tool console  \n- [ ] Create adapter logstash  \n- [ ] Create adapter fluentd  \n- [ ] Create adapter ES  \n- [ ] Create command line tool logstash  \n- [ ] Create command line tool fluentd  \n- [ ] Create command line tool ES  \n\n### Logo\nCheck out the new logo that I created on \u003ca href=\"http://logomakr.com\" title=\"Logo Makr\"\u003eLogoMakr.com\u003c/a\u003e https://logomakr.com/32f2Md\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarolorentedev%2Fgatoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvarolorentedev%2Fgatoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarolorentedev%2Fgatoo/lists"}