https://github.com/chonthu/go-google-analytics
Simple Reporting for Google Analytics
https://github.com/chonthu/go-google-analytics
Last synced: 9 months ago
JSON representation
Simple Reporting for Google Analytics
- Host: GitHub
- URL: https://github.com/chonthu/go-google-analytics
- Owner: chonthu
- License: mit
- Created: 2015-06-01T13:50:00.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-09T11:38:07.000Z (over 10 years ago)
- Last Synced: 2024-10-25T05:25:21.017Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 160 KB
- Stars: 15
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - google-analytics - Simple wrapper for easy google analytics reporting. (Third-party APIs / Utility/Miscellaneous)
- awesome-go-cn - google-analytics
- awesome-go-cn - google-analytics - google-analytics) [![godoc][D]](https://godoc.org/github.com/chonthu/go-google-analytics) (第三方api / 实用程序/Miscellaneous)
- awesome-go-plus - google-analytics - Simple wrapper for easy google analytics reporting.  (Third-party APIs / Utility/Miscellaneous)
- fucking-awesome-go - :octocat: google-analytics - A simple wrapper for easy google analytics reporting. :star: 4 :fork_and_knife: 0 (Third-party APIs / Advanced Console UIs)
- awesome-go-cn - google-analytics
- awesome-go - go-google-analytics - Simple Reporting for Google Analytics - ★ 12 (Third-party APIs)
- awesome-go - google-analytics - | - | - | (Third-party APIs / HTTP Clients)
- awesome-go - google-analytics - Simple wrapper for easy google analytics reporting. (Third-party APIs / Utility/Miscellaneous)
- awesome-go - google-analytics - Simple wrapper for easy google analytics reporting. - :arrow_down:1 - :star:5 (Third-party APIs / HTTP Clients)
- fucking-awesome-go - google-analytics - Simple wrapper for easy google analytics reporting. (Third-party APIs / Utility/Miscellaneous)
- awesome-go-cn - google-analytics - google-analytics) [![godoc][D]](https://godoc.org/github.com/chonthu/go-google-analytics) (第三方api / 实用程序/Miscellaneous)
- awesome-go - google-analytics - Simple wrapper for easy google analytics reporting. (Third-party APIs / Advanced Console UIs)
- awesome-go - google-analytics - Simple wrapper for easy google analytics reporting. (Third-party APIs / HTTP Clients)
- awesome-go-zh - google-analytics
- awesome-go - google-analytics - Simple wrapper for easy google analytics reporting. (Third-party APIs / Utility/Miscellaneous)
- awesome-go-extra - go-google-analytics - 06-01T13:50:00Z|2015-06-09T11:38:07Z| (Third-party APIs / Fail injection)
- awesome-go - google-analytics - Simple wrapper for easy google analytics reporting. (<span id="第三方api-third-party-apis">第三方API Third-party APIs</span> / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go-with-stars - google-analytics - Simple wrapper for easy google analytics reporting. (Third-party APIs / Utility/Miscellaneous)
- awesome-go - google-analytics - Simple wrapper for easy google analytics reporting. (Third-party APIs / Utility/Miscellaneous)
- awesome-go - google-analytics - Simple wrapper for easy google analytics reporting. (Third-party APIs / Utility/Miscellaneous)
- awesome-Char - google-analytics - Simple wrapper for easy google analytics reporting. (Third-party APIs / HTTP Clients)
README
##Google analytics Data pull
Lightweight Golang library for pulling Google Analytics API data.
Built for use with Core Reporting API (v3):
https://developers.google.com/analytics/devguides/reporting/core/v3/reference
### Install
```
go get github.com/chonthu/go-google-analytics
```
### Authentication
In order to authenticate this library for use with your Google Analytics account, an oauth2 token needs to be generated. For a new project login to [Google Developers Console](https://console.developers.google.com) and Create Project.
Add Analytics API to list of APIs, create a new "Installed" App Client ID and download it in JSON format.
Place the client_secret.json in the root of your application. Ps. you have to renaming it from the crazy name to just "client_secret.json"
### Usage
See Examples [here](https://github.com/chonthu/go-google-analytics/tree/master/examples)
### Testing
Unit tests are included with this library, use `go test ./...` to run through the set provided.
** This doesnt really work yet, but working on it **
### Changelog
#### 1.0.0
- cleaner naming
- clearner working examples
#### 0.1.1:
- Implemented batch processing
- New request period segmentation functionality
- Cleaner error reporting and resolution suggestions
#### 0.1.0:
- Initial release