2

Back in the day, much before there was google analytics, there used to be simple visitor counter for webpages. It was just an updating counter which you could link on any page & the page count would be updated each time the page had a hit.

Is there anything simple available for a Blog Page created through Github pages? Not interested in where the traffic comes from or at what time etc. Just the number of hits. Also don't want something like Google Analytics which blocked by a lot of people.

user93353
  • 13,733
  • 8
  • 60
  • 122
  • 1
    Similar question: [Finding the number of views of a website hosted on GitHub Pages](https://stackoverflow.com/questions/50773333/finding-the-number-of-views-of-a-website-hosted-on-github-pages) – Franck Dernoncourt Aug 18 '22 at 20:14

2 Answers2

2

You can add this in your GitHub Profile Readme (or wherever Markdown or HTML are supported):

<p align="center"> <img src="https://komarev.com/ghpvc/?username=GITHUB-USERNAME&label=Profile%20views&color=ce9927&style=flat" alt="GITHUB-USERNAME" /> </p>

Credits: https://github.com/antonkomarev/github-profile-views-counter

buondevid
  • 347
  • 2
  • 7
  • This would only be for the profile page. What about other pages? – user93353 Mar 24 '21 at 02:41
  • Also he doesn't talk about blog pages at all in his description only about repositories – user93353 Mar 24 '21 at 02:42
  • It's an HTML snippet, it's supported everywhere HTML (and even Markdown) is supported. Just try it out on your blog page. – buondevid Mar 24 '21 at 02:43
  • Have you check the HTML - it's not a link to the page - it's a link to only github name - not link to individual pages - ![](https://komarev.com/ghpvc/?username=your-github-username). You can't have different counters for different pages on your github repository - if I have 10 blogposts - I put the same HTML in all 10, their counts probably would get updated together - if at all. – user93353 Mar 24 '21 at 04:10
0

There is a GitHub Action that uses GitHub API. It updates daily and does not require any servers or databases. It automatically saves changes into the repository. Go to the template GitHub Insights Template