You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A badge with just the number of times the badge has been displayed by unique users would be nice.
I searched the website but perhaps I am blind and I did not find it.
While an interesting idea, I'm not sure it best aligns with project goals.
As stated in our contribution guideline badges should present information useful to developers from a documented API.
While some developers might be interested in such counters, there are a few problems here:
Information is not directly related to developers work.
Shields depends on an API to provide said info.
Shields is not built to hold information over time, like the number of requests of an image.
Could you provide info regarding benefits of the badge and API source that it might use?
Could you provide info regarding benefits of the badge and API source that it might use?
Benefits: let's assume I have a badge that tells me how many downloads I had.
It would be useful to know how many people visited the "repository main page" (where the readme is displayed.
To have a comparison.
About the data source, github should have an api for that..
Thank you for the data sources, but there are some limitations here that might render them not suitable for this use case.
Let me start by saying api-insights is not relevant here, as it tracks api usage and not user page views.
regarding the traffic endpoint:
This view (and API) shows repository page views and unique visitors, as well as referrers and popular content.
These metrics reflect how many times the GitHub repo itself was visited in a browser, potentially including times when a badge in the README was visible.
Limitation: It does not count badge impressions outside the GitHub repository (e.g., when badges are embedded on blogs or other sites). It also only covers the last 14 days and requires repo admin permissions to access.
So in short:
api-insights is not relevant here
traffic endpoint requires permissions and is very limited in what it provides.
Activity
jNullj commentedon Jul 26, 2025
While an interesting idea, I'm not sure it best aligns with project goals.
As stated in our contribution guideline badges should present information useful to developers from a documented API.
While some developers might be interested in such counters, there are a few problems here:
Could you provide info regarding benefits of the badge and API source that it might use?
0wwafa commentedon Jul 27, 2025
Benefits: let's assume I have a badge that tells me how many downloads I had.
It would be useful to know how many people visited the "repository main page" (where the readme is displayed.
To have a comparison.
About the data source, github should have an api for that..
Source: https://github.com/[USER]/[REPO]/graphs/traffic?partial=top_lists
https://github.com/badges/shields/graphs/traffic?partial=top_lists
or:
https://docs.github.com/en/rest/orgs/api-insights?apiVersion=2022-11-28#get-summary-stats
jNullj commentedon Jul 27, 2025
Thank you for the data sources, but there are some limitations here that might render them not suitable for this use case.
Let me start by saying api-insights is not relevant here, as it tracks api usage and not user page views.
regarding the traffic endpoint:
So in short:
heliocarlitos commentedon Feb 15, 2026
PyvesB commentedon Jun 20, 2026
@heliocarlitos feel free to add a reference to your project on https://github.com/badges/awesome-badges :)
heliocarlitos commentedon Jun 21, 2026
@PyvesB
Great. Liked it! I'm going to take a closer look to see how to add these tools to the project.