{"id":47719683,"url":"https://github.com/bellmano/umami-badges","last_synced_at":"2026-04-02T19:16:45.774Z","repository":{"id":334482205,"uuid":"1137619768","full_name":"bellmano/umami-badges","owner":"bellmano","description":"Generate badges for your Umami analytics data","archived":false,"fork":false,"pushed_at":"2026-03-26T14:24:43.000Z","size":695,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-27T05:44:41.965Z","etag":null,"topics":["badge","badges","css","github-badge","github-badges","html","javascript","umami","umami-analytics","website"],"latest_commit_sha":null,"homepage":"https://umami-badges.vercel.app","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/bellmano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://ko-fi.com/bellmano"]}},"created_at":"2026-01-19T15:55:43.000Z","updated_at":"2026-03-26T14:25:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bellmano/umami-badges","commit_stats":null,"previous_names":["bellmano/umami-github-badges","bellmano/umami-badges"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bellmano/umami-badges","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bellmano%2Fumami-badges","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bellmano%2Fumami-badges/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bellmano%2Fumami-badges/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bellmano%2Fumami-badges/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bellmano","download_url":"https://codeload.github.com/bellmano/umami-badges/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bellmano%2Fumami-badges/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31314255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"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":["badge","badges","css","github-badge","github-badges","html","javascript","umami","umami-analytics","website"],"created_at":"2026-04-02T19:16:44.886Z","updated_at":"2026-04-02T19:16:45.766Z","avatar_url":"https://github.com/bellmano.png","language":"JavaScript","funding_links":["https://ko-fi.com/bellmano"],"categories":[],"sub_categories":[],"readme":"# :ramen: Umami Badges \n\n![Total Page Views](https://umami-badges.vercel.app/api/views?website=ca16f4b3-a794-4597-a7e9-abba6ee32112\u0026token=api_O2dOgzOmyw1Y69y8HnngGdOtyoZ6N2Pi\u0026range=all\u0026style=for-the-badge\u0026label=Total+Page+Views\u0026cache=0)\n![Average Session Duration on Website](https://umami-badges.vercel.app/api/avg-session?website=ca16f4b3-a794-4597-a7e9-abba6ee32112\u0026token=api_O2dOgzOmyw1Y69y8HnngGdOtyoZ6N2Pi\u0026range=all\u0026style=for-the-badge\u0026label=Average+Session+Duration+on+Website\u0026cache=0)\n![Unique Visitors](https://umami-badges.vercel.app/api/visitors?website=ca16f4b3-a794-4597-a7e9-abba6ee32112\u0026token=api_O2dOgzOmyw1Y69y8HnngGdOtyoZ6N2Pi\u0026range=all\u0026style=for-the-badge\u0026label=Unique+Visitors\u0026cache=0)\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=bellmano_umami-badges\u0026metric=coverage\u0026token=6e9bb50bb14b2d851f65c161bef4a5e41dc5050c)](https://sonarcloud.io/summary/overall?id=bellmano_umami-badges)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=bellmano_umami-badges\u0026metric=security_rating\u0026token=6e9bb50bb14b2d851f65c161bef4a5e41dc5050c)](https://sonarcloud.io/summary/overall?id=bellmano_umami-badges)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=bellmano_umami-badges\u0026metric=sqale_rating\u0026token=6e9bb50bb14b2d851f65c161bef4a5e41dc5050c)](https://sonarcloud.io/summary/overall?id=bellmano_umami-badges)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=bellmano_umami-badges\u0026metric=reliability_rating\u0026token=6e9bb50bb14b2d851f65c161bef4a5e41dc5050c)](https://sonarcloud.io/summary/overall?id=bellmano_umami-badges)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=bellmano_umami-badges\u0026metric=bugs\u0026token=6e9bb50bb14b2d851f65c161bef4a5e41dc5050c)](https://sonarcloud.io/summary/overall?id=bellmano_umami-badges)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=bellmano_umami-badges\u0026metric=vulnerabilities\u0026token=6e9bb50bb14b2d851f65c161bef4a5e41dc5050c)](https://sonarcloud.io/summary/overall?id=bellmano_umami-badges)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=bellmano_umami-badges\u0026metric=code_smells\u0026token=6e9bb50bb14b2d851f65c161bef4a5e41dc5050c)](https://sonarcloud.io/summary/overall?id=bellmano_umami-badges)\n\nGenerate dynamic badges for your Umami website analytics! Show off your website traffic, page views, and visitor stats directly in your README files or on your website.\n\n## :rocket: Quick Start\n\n### 1. Get Your Website ID and API Key\n\nYou'll need:\n- Your Website ID (found in your website settings)\n- An API key (Account Settings → API keys)\n\n**:warning: Security Notice:** Your API key will be visible in the badge URL. This means anyone can view your website analytics data (views, visitors, etc.) but cannot modify settings or access other websites. Only use badges for public websites where you're comfortable sharing traffic statistics. You can rotate your API key anytime in Umami settings.\n\n### 2. Generate Your Badge\n\n**Option A: Use the Web Interface**\n\nVisit: **[umami-badges.vercel.app](https://umami-badges.vercel.app/)**\n\n**Option B: Build the URL yourself**\n\nDefault (Umami Cloud):\n```\nhttps://umami-badges.vercel.app/api/{metric}?website={WEBSITE_ID}\u0026token={API_TOKEN}\u0026range=all\u0026style=for-the-badge\u0026cache=0\n```\n\nSelf‑hosted or custom domain (add `umamiUrl`):\n```\nhttps://umami-badges.vercel.app/api/{metric}?website={WEBSITE_ID}\u0026token={API_TOKEN}\u0026range=all\u0026style=for-the-badge\u0026cache=0\u0026umamiUrl={CUSTOM_UMAMI_API_URL}\n```\n\n### 3. Add to Your README\n\n```markdown\n![Website Analytics](https://umami-badges.vercel.app/api/views?website=your-website-id\u0026token=your-api-token\u0026range=all\u0026style=for-the-badge\u0026cache=0)\n```\n\n## :bar_chart: Available Metrics\n\n| Metric | Description | Example |\n|--------|-------------|---------|\n| `views` | Total page views | ![Views](https://img.shields.io/badge/Views-12.5K-brightgreen?style=for-the-badge) |\n| `visitors` | Unique visitors | ![Visitors](https://img.shields.io/badge/Visitors-3.2K-green?style=for-the-badge) |\n| `visits` | Total visits | ![Visits](https://img.shields.io/badge/Visits-8.9K-blue?style=for-the-badge) |\n| `bounce-rate` | Bounce rate percentage | ![Bounce Rate](https://img.shields.io/badge/Bounce%20Rate-45.2%25-orange?style=for-the-badge) |\n| `avg-session` | Average session duration | ![Avg Session](https://img.shields.io/badge/Avg%20Session-1m_36s-purple?style=for-the-badge) |\n| `live` | Live visitors (last 30 minutes) | ![Live](https://img.shields.io/badge/Live%20Visitors-42-red?style=for-the-badge) |\n\n## :art: Customization Options\n\n| Parameter | Description | Values |\n|-----------|-------------|--------|\n| `range` | Time range for stats | `7d`, `30d`, `90d`, `all` (default: `all`) |\n| `style` | Badge style | `flat`, `flat-square`, `for-the-badge`, `plastic`, `social` |\n| `color` | Badge color | `brightgreen`, `green`, `blue`, `red`, `orange`, `yellow`, `purple`, or hex codes |\n| `label` | Custom label text | Any text (URL encoded) |\n\n## :test_tube: Running Tests\n\nTo run the tests and view coverage:\n\n1. Install the required dev dependency:\n\t```powershell\n\tnpm install\n\t```\n2. Run the test coverage script:\n\t```powershell\n\tnpm run test:coverage\n\t```\n\nThis will execute the tests and generate a coverage report.\n\n## :handshake: Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## :mega: Issues or Suggestions\nAny issues or suggestions, please [create an issue on Github](https://github.com/bellmano/umami-badges/issues).\n\n## :coffee: Buy me a coffee\nDonations are welcome to appreciate my work and to keep this project alive, but isn't required at all.\n\n\u003ca href=\"https://ko-fi.com/bellmano\"\u003e\u003cimg src=\"img/bellmano-kofi.jpg\" width=\"50%\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbellmano%2Fumami-badges","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbellmano%2Fumami-badges","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbellmano%2Fumami-badges/lists"}