{"id":37142201,"url":"https://github.com/ticketmaster/googleanalytics_exporter","last_synced_at":"2026-01-14T16:41:37.159Z","repository":{"id":41523138,"uuid":"87360268","full_name":"ticketmaster/googleanalytics_exporter","owner":"ticketmaster","description":"Obtains Google Analytics RealTime metrics, and presents them to prometheus for scraping.","archived":false,"fork":false,"pushed_at":"2023-12-15T14:26:34.000Z","size":28,"stargazers_count":43,"open_issues_count":8,"forks_count":19,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-06-18T23:06:06.267Z","etag":null,"topics":["google-analytics","metrics","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ticketmaster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2017-04-05T21:58:30.000Z","updated_at":"2024-04-15T03:17:55.000Z","dependencies_parsed_at":"2024-01-15T06:07:29.701Z","dependency_job_id":null,"html_url":"https://github.com/ticketmaster/googleanalytics_exporter","commit_stats":{"total_commits":9,"total_committers":4,"mean_commits":2.25,"dds":0.5555555555555556,"last_synced_commit":"fff0eda8a33c6004528f0248457024b87323d9f5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ticketmaster/googleanalytics_exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticketmaster%2Fgoogleanalytics_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticketmaster%2Fgoogleanalytics_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticketmaster%2Fgoogleanalytics_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticketmaster%2Fgoogleanalytics_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ticketmaster","download_url":"https://codeload.github.com/ticketmaster/googleanalytics_exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticketmaster%2Fgoogleanalytics_exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28426162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["google-analytics","metrics","prometheus","prometheus-exporter"],"created_at":"2026-01-14T16:41:36.361Z","updated_at":"2026-01-14T16:41:37.153Z","avatar_url":"https://github.com/ticketmaster.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/paha/googleanalytics_exporter.svg?branch=master)](https://travis-ci.org/paha/googleanalytics_exporter)\n[![Go Report Card](https://goreportcard.com/badge/github.com/paha/googleanalytics_exporter)](https://goreportcard.com/report/github.com/paha/googleanalytics_exporter)\n[![Docker Repository on Quay](https://quay.io/repository/paha/ga-prom/status \"Docker Repository on Quay\")](https://quay.io/repository/paha/ga-prom)\n\n# Google Real Time Analytics to Prometheus\n\nObtains Google Analytics RealTime metrics, and presents them to prometheus for scraping.\n\n---\n\n## Quick start\n\n1. Copy your [Google creds][2] json file to ./config/ga_creds.json. The email from the json must be added to the GA project permissions, more on that bellow. We recommend you use port 9674 to avoid conflicts as per Prometheus' [default port allocations](https://github.com/prometheus/prometheus/wiki/Default-port-allocations)\n1. Create yaml configuration file (`./config/conf.yaml`):.\n    ```yaml\n    port: 9674\n    interval: 60\n    viewid: ga:123456789\n    metrics:\n    - rt:pageviews\n    - rt:activeUsers\n    ```\n1. Install dependencies, compile and run.\n    ```bash\n    GO111MODULE=on go build ganalytics.go\n    ./ganalytics\n    ```\n\n### ViewID for the Google Analytics\n\nFrom your Google Analytics Web UI: *Admin (Low left) ==\u003e View Settings (far right tab, named VIEW)'*\n\n*View ID* should be among *Basic Settings*. Prefix `ga:` must be added to the ID, e.g. `ga:1234556` while adding it to the config.\n\n### Google creds\n\n[Google API manager][2] allows to create OAuth 2.0 credentials for Google APIs. Use *Service account key* credentials type, upon creation a json creds file will be provided. Project RO permissions should be sufficient.\n\n\u003e*The email from GA API creds must be added to analytics project metrics will be obtained from.*\u003e\n\n\n### Cross compile on a MAC\n\n* [Alpine docker image][3] is used for delivery.\n* go should be installed with common compilers - `brew install go --with-cc-common`\n* `creds.json` and `config.yaml` expected to be in `./config/`\n\n```bash\nCGO_ENABLED=0 GOOS=linux go build -ldflags \"-s\" -a -installsuffix cgo ganalytics.go\ndocker build -t ganalytics .\ndocker run -it -p 9674:9674 -v $(pwd)/config:/ga/config ganalytics\n```\n\n## Author\n\nPavel Snagovsky, pavel@snagovsky.com\n\n## License\n\nLicensed under the terms of [MIT license][4], see [LICENSE][5] file\n\n[1]: https://github.com/Masterminds/glide\n[2]: https://console.developers.google.com/apis/credentials\n[3]: https://hub.docker.com/_/alpine/\n[4]: https://choosealicense.com/licenses/mit/\n[5]: ./LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticketmaster%2Fgoogleanalytics_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fticketmaster%2Fgoogleanalytics_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticketmaster%2Fgoogleanalytics_exporter/lists"}