Analytics for Github Pages #31474
Replies: 51 comments 75 replies
|
@Artucuno Hey there, I believe that feature (or at least most of it) is available in GitHub already. You can follow the steps below:
Hope this answers your question 😁 |
|
that sounds exactly like Google Analytics, well you can use Google Analytics for GitHub Pages if you are really into it, I tried it before |
|
Hello, @melvincwng - the Traffic stats at the location you specified appear to be directly related to repository traffic (https://docs.github.com/en/rest/metrics/traffic). In other words, when folks view the repository via github.com, stats are tracked. What I would like to see (and what I think @Artucuno is asking), is a set of similar traffic stats as to what GitHub Pages (project.github.io) traffic is happening:
My primary reason for asking this is that a tool like Google Analytics is over-engineered for these basic needs. Also, it's far less privacy-focused. I'm simply looking for equivalent-type of stats for GitHub Pages as what is provided for Github Repos. UPDATE: I did just manage to figure out that you can get some of this type of reporting if you sign up for a free Cloudflare account and enable web analytics on cloudflare. You can read about it on the Cloudflare Blog |
|
I agree with this proposal and I think it should be kind of mandatory. Most of us are privacy focused folks and I’d love to have, not just analytics, but direct access to logs of every request to GitHub pages, I mean server logs. We could then use any software or tool to generate analytics from them. |
|
Just wanted to echo the sentiment in this thread that having some built-in mechanism for:
Would be super useful! |
|
Oh yes please! |
|
Would be nice to have something super simple, like the visitor counts for different pages. Similar to Popular content on the Traffic data, but for pages hosted on Pages. |
|
This would be very useful. |
|
Google analytics can be used instead |
|
Having the logs would be super helpful, even if user info has to be scrubbed. I'd be very interested in knowing what URLs are referring my pages. |
|
Bump! Like a lot of posters, I don't use Google Analytics for ethical reasons (third-party tracking scripts are nasty), but I'd love to have basic server-side traffic info — even just pageviews/day — to know how many people are visiting. |
|
In case any product people read this: The number 1 reason that would make me churn right now is need to have insight into my site's traffic. I've deliberately chosen to not include any cookies nor 3rd party content in my site, and would have to rely solely on server logs to have this kind of insight. I can do without it for now, but eventually that'll be my reason to host somewhere else. |
|
Seems like we can do this using a |
|
No progress on this topic yet? All the people I know who migrates from Pages is precisely because of the lack of this feature. Nobody talks about exposing IP addresses or anything similar, but rather something as simple as counting daily visits. I found several threads about the same. What is so problematic, dangerous or complicated about this that these requests have been ignored for more than 7 years? I guess Microsoft wants to somehow get rid of this service. If not, I don't understand why they don't provide something so seemingly basic. |
|
Using Deno Deploy, where it's possible to sign in with GitHub account, and export the code to GitHub. Server Request from GitHub origin Analytics on https://dash.deno.com/projects/xxx-zzz-123/analytics/24h |
|
Github, Microsoft, this is still basic functionality that everyone wants, and you have to already be tracking on your end. Can we get this? |
|
Would an e2ee solution work for you people? Currently trying to build one and wanted to get a heads-up if it might serve exactly this purpose. You create a keypair in the browser, add the analytics script (in the same way as it happens with GA) to your static webpage. If now a visitor is opening your page the same stats are gathered, but they are encrypted in-Browser before being streamed to some remote back-end. You can then open the dashboard, pull the encrypted analytics and decrypt them on your local machine and the JS shows the analysis results. It's not ready yet, but your answers might provide valueable feedback! EDIT: Now i saw that most of you want only to see the logs. That's fine. Can't solve this problem. But an e2ee would at least keep the analytics part private to you. And you don't have to track anyone. Simple metrics should already suffice like the unique visitors / acitvity duration et al.. There is no tracking required for these stats. |
|
Bump. I would love this being implemented. It's such a basic thing to have. |
|
Why not some Javascript? You don't have to be "sneaky". You can still respect privacy while collecting the data. You could save to CSV and render using ApexCharts and do it all within your repo. |
|
Could this be implemented already? |
|
Mandatory monthly bump to this thread. Anything yet? |
|
Up |
|
How is this not implemented yet? It is almost 2026! |
|
LOL... Okay, if nobody picks it up by 2026, I'll spend some time in January doing what I can i.e. basic page count + timezone + browser language metrics. |
|
@NadimGhaznavi What were you proposing to do about this issue? |
|
I would love this feature :) Please GitHub, make it so! |
|
This is really a basic feature that just needs some API and UI changes to display the data that is almost surely already collected internally, we don't even need complex stats just the basic page metrics like; visitor count, that way we developers can know what's popular and focus on improving it. Also, it helps a motivator seeing the popularity of a site. This is really causing me to consider moving to Cloudflare Pages |
|
lmao it's 2026 now GitHub why not just ask your Copilot to achieve this feature? |


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey! I'm not sure if its already a thing but Github Pages should have a graph in the traffic tab of your Github Repo with the visitors count, country of origin, etc.
Thanks.
(13/09/2024) EDIT:
As of now, there is still no way to view Github pages traffic inside of your Github repo. If you are looking for a service with built-in analytics, I recommend using Cloudflare pages.
Cloudflare Pages also supports Jekyll and has automated builds from Git, so migration from Github Pages is super simple. [Comparison]
All reactions