loading...

Add a visitor count on your GitHub profile with one line of Markdown

ryanlanciaux profile image Ryan Lanciaux ・1 min read

In a previous article, I wrote about how you could add a visitor counter to your GitHub profile with a little node/express app. The article suggested that if you wanted to add a counter to your GitHub profile, you could copy and run the code on your own server. I've recently updated this operation to be a lot easier.

You can now add a counter to your GitHub profile with the following line of Markdown

![Visitor Count](https://profile-counter.glitch.me/{YOUR USER}/count.svg)

I'd love to know what you think!

Discussion

markdown guide
 

I built the same thing a few days ago, hosting it on my dedicated server so it won't get any rate-limit oder downtime. badges.pufler.dev πŸ‘

 

It looks amazing. I can advise you to use a dedicated server if you want your site to work perfectly all the time. I use intergrid.com.au/dedicated.php.au for many years, they have the best offers at the best prices. I really appreciate that they provide help and they were in general first to explain to me what exactly I needed. Try to check it, maybe you'll find it useful for your purposes. Moreover, it is available not only in one country, so it'd be useful for people from different countries.

 
 
 

Very cool. Looks nice.

A note of potential clarification.. this is using a β€œboosted” server (paid feature) in glitch. There should be no downtime or rate limiting like the non-boosted tier.

 

Oh, didn't know that, I figured it was a normal free glitch instance like the one that went more or less down. Cool!

 

Tired of updating GitHub profle README with latest features again & again?

If yes, then I have developed a tool to do the same for you in just 1 click πŸ€“

πŸš€ Try the tool: live tool

If you find the tool useful, show some love by giving a ⭐ on github repo

GitHub logo rahuldkjain / github-profile-readme-generator

πŸš€ Generate github profile README easily with latest add-ons like visitors count, github stats, etc using minimal UI.

Github Profile Readme Generator

Github Profile Readme Generator

github-profile-readme-generator licence github-profile-readme-generator forks github-profile-readme-generator stars github-profile-readme-generator issues github-profile-readme-generator pull-requests

github-profile-readme-generator gif

View Demo Β· Report Bug Β· Request Feature

Loved the tool? Please consider donating πŸ’Έ to help it improve!

Tired of editing Github Profile README with new features?

This tool provides an easy way to create github profile readme with latest addons like visitors count, github stats etc.

πŸš€ Try it out: Live demo

🧐 Features

Just fill the details like Name, Tagline, Dev Platforms Username, Current Work, Portfolio, Blog etc. with a minimal UI.

Click on Generate README to get your README in markdown You can preview the README too.

You can add latest addons like visitors count, shields, dev icons, github stats etc to your README in just one click.

Installation Steps

  1. Clone the repository
git clone https://github.com/rahuldkjain/github-profile-readme-generator.git
  1. Change the working directory
cd github-profile-readme-generator
  1. Install dependencies
npm install
  1. Run the app
npm start

πŸŒŸβ€¦

 

Sounds good! I'll give a try! also it would be nice if you add some room for Dribbble on the social tab, because some coders are even designers! (like me πŸ˜‹)

 
 
 

Hey Rahul, that's a pretty useful tool.It looks like the visitor counter is counting even the browser refreshes from same user.Is this expected?

 

Yes because its visit-count not unique-visit-count

 

There was another provider with same service named visitor-profile-badge, It recently stopped working and I was left with no other option other than to just remove it. I hope your application is there to stay :) because it's not good that you make something it stops working cause of server or other load.

 

I was not aware of that one. I have no intent on removing this one :D

 

Seems to add page views - pretty different from a real visitor count. Hit refresh, the count goes up

 

Refresh is a new view of the page :) it’s working as intended

 

So, this is also a new view of the page! πŸ˜„

curl https://profile-counter.glitch.me/{YOUR USER}/count.svg

Curl is pretty cool πŸ‘

You'd be better off checking the referrer to make sure the image was loaded in the context of the page where the counter is. Otherwise, you're just counting 'loads' of that image - wherever they may have come from

A referrer check would work in many contexts, however, the primary intent of this project is for use on GitHub. GitHub has a caching later that prevents tracking docs.github.com/en/github/authenti... - this is a β€œfor fun” project that I made quickly in hopes people would have fun with it on their GitHub profiles. If this were a commercial product or an analytics package that was not for use on GitHub, I would check the referrer among other things.

If you are interested in making changes (as a new project), the code is available in the prior article mentioned above (noting there is no database in that version)

 

this script increase counter on each hit. you can wind up the counter by reloading the page to insane indicators!

 

So you're saying it works? :D Each time you reload the page it counts as a new visit. This is partially due to every visit coming from GitHub's camo caching layer (no way to tell if it's a repeat visitor since they are ALL repeat visitors).

 

Yes! we can build a command line script with a loop that triggers the page with specific intervals! after day or two we get up to 2K views. πŸ˜„

 

Thank you Ryan, easily way with awesome result!

 

Thanks for the kind words! Glad it works out for you :)

 

Neat trick! It works :) Thanks

 

Coolio!!! Got it up and running in no time! (had to create the repo as referenced in dev.to/m0nica/how-to-create-a-gith...)

Thanks!!!