{"id":18908863,"url":"https://github.com/riesinger/plausible-exporter","last_synced_at":"2025-07-23T18:05:09.767Z","repository":{"id":65183099,"uuid":"539193648","full_name":"riesinger/plausible-exporter","owner":"riesinger","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-09T16:47:37.000Z","size":99,"stargazers_count":25,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T07:12:46.988Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/riesinger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2022-09-20T21:11:33.000Z","updated_at":"2025-04-10T12:40:15.000Z","dependencies_parsed_at":"2024-03-14T13:37:33.423Z","dependency_job_id":"c6e719e5-ed66-4808-984e-61f57801e2c9","html_url":"https://github.com/riesinger/plausible-exporter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/riesinger/plausible-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riesinger%2Fplausible-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riesinger%2Fplausible-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riesinger%2Fplausible-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riesinger%2Fplausible-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riesinger","download_url":"https://codeload.github.com/riesinger/plausible-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riesinger%2Fplausible-exporter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266726613,"owners_count":23974926,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-08T09:29:09.816Z","updated_at":"2025-07-23T18:05:09.733Z","avatar_url":"https://github.com/riesinger.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plausible-exporter\n\n\u003cimg width=\"1438\" alt=\"image\" src=\"https://user-images.githubusercontent.com/6919894/193658233-18ecc4a2-52c7-4c48-b409-d315a4a44c41.png\"\u003e\n\n`plausible-exporter` is a Prometheus exporter for [Plausible Analytics](https://plausible.io).\nIt enables you to keep an overview of your websites statistics in Prometheus.\n\n## Usage\n\n`plausible-exporter` can be run as a Docker container (preferrably) or built from source and run as a static binary.\n\n### docker-compose\n\n```yaml\nversion: \"3\"\nservices:\n  plausible-exporter:\n    image: ghcr.io/riesinger/plausible-exporter:latest\n    environment:\n      - PLAUSIBLE_HOST=https://plausible.io\n      - PLAUSIBLE_SITE_IDS=your-web.site\n      - PLAUSIBLE_TOKEN=\u003cthe-token-you-created-in-plausible\u003e\n    ports:\n      - 8080:8080\n```\n\nFor configuration see [this section](#configuration).\n\n### Binary\n\nTo run the exporter as binary, clone this repo, build the Go binary and run it:\n\n```sh\ngit clone https://github.com/riesinger/plausible-exporter\nmake # or \"make static\"\n./plausible-exporter\n```\n\nFor configuration see [this section](#configuration).\n\n### Kubernetes / Helm\n\nIf you want to run this exporter inside a Kubernetes cluster you can use this [community contributed Helm chart](https://charts.pascaliske.dev/charts/plausible-exporter/) by [@pascaliske](https://github.com/pascaliske).\n\nFor configuration see [this section](#configuration).\n\n### Configuration\n\nThe exporter can be configured via a `config.yaml` file placed in `/etc/plausible-exporter` or via environment variables.\n\nWhen put into a config file, the variable names are `snake_cased`, when set via the environment, the variables must be `UPPER_SNAKE_CASED`.\nAll options can be set in the config file or environment variables, with environment variables taking precedence.\n\n| Option               | Required | Description                                                            | Default        |\n| -------------------- | -------- | ---------------------------------------------------------------------- | -------------- |\n| `plausible_host`     | ✅       | The hostname and protocol of your plausible server                     | -              |\n| `plausible_site_ids` | ✅       | The IDs of the sites you want to fetch from plausible, as a list       | -              |\n| `plausible_token`    | ✅       | A valid API token for your plausible server                            | -              |\n| `listen_address`     | ❌       | Which host and port to listen to                                       | `0.0.0.0:8080` |\n| `bearer_auth_token`  | ❌       | Bearer token to authorize metrics route through `Authorization` header | -              |\n\n\u003e **Note:** Config options that are lists must be comma-separated when passed as an environment variable, e.g. `PLAUSIBLE_SITE_IDS=riesinger.dev,nononsense.cooking`\n\n### Prometheus\n\nThis exporter creates 4 metrics:\n\n- `plausible_visitors` - How many visitors were on your site on the current day\n- `plausible_visit_duration` - How long an average visit to your site was (in seconds)\n- `plausible_pageviews` - How many page views your site had today\n- `plausible_bounce_rate` - How many visitors left your site (in percent, 0-100)\n\nIn case you've configured multiple sites to be scraped, you can differentiate between them with the `site_id` label.\n\n### Grafana\n\nYou can use the exported metrics just like you'd use any other metric scraped by Prometheus.\nThe `examples` folder contains a small [demo dashboard](./examples/grafana-dashboard.json). You can use this as a starting point for integrating the metrics into your own dashboards.\n\n#### Authorization\n\nIf you want to restrict access to the metrics endpoint, you can set the `bearer_auth_token` (`BEARER_AUTH_TOKEN` environment variable) option.\nThis will require the client to send a `Authorization: Bearer \u003ctoken\u003e` header with the request.\n\n## License\n\nThis project is MIT-licensed, see [LICENSE.md](./LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friesinger%2Fplausible-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friesinger%2Fplausible-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friesinger%2Fplausible-exporter/lists"}