DEV Community

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

Ryan Lanciaux on July 16, 2020

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 suggest...
Collapse
 
pujux profile image
Julian Pufler

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 👍

Collapse
 
janmam111 profile image
JanMam111 • Edited

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.

Collapse
 
pujux profile image
Julian Pufler

Thank you!

Collapse
 
jdromero88 profile image
José Romero

Thanks I added it to my profile!
github.com/jdromero88

Collapse
 
pujux profile image
Julian Pufler

awesome!

Collapse
 
ryanlanciaux profile image
Ryan Lanciaux

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.

Collapse
 
pujux profile image
Julian Pufler

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

Collapse
 
rahuldkjain profile image
Rahul Jain

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 the 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 join discord community of github profile readme generator

github-profile-readme-generator gif

View Demo · Report Bug · Request Feature

Loved the tool? Please consider donating 💸 to help it improve!

sponsor github profile readme generator Buy Coffee for rahuldkjain Buy Me A Coffee

Tired of editing GitHub Profile README with new features? This tool provides an easy way to create a GitHub profile readme with the latest add-ons such as visitors count, github stats, etc. 🚀 Demo

Try the tool: GitHub Profile README Generator

🧐 Features

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

  • Uniform Dev Icons

  • Uniform Social Icons

  • Visitors Counter Badge

  • GitHub Profile Stats Card

  • GitHub Top Skills

  • GitHub Streak Stats

  • Dynamic Dev(.)to Blogs (GitHub Action)

  • Dynamic Medium Blogs (GitHub Action)

  • Dynamic Personal Blogs from RSS Feed (GitHub Action)

  • Wakatime Stats contribute

  • Buy Me A Coffee button

Click on Generate README to get your README in markdown

Collapse
 
ryanlanciaux profile image
Ryan Lanciaux

Cool.

Collapse
 
vikramkadiam profile image
Vikram Kadiam

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?

Collapse
 
rahuldkjain profile image
Rahul Jain

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

Collapse
 
king11 profile image
Lakshya Singh • Edited

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.

Collapse
 
ryanlanciaux profile image
Ryan Lanciaux

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

Collapse
 
gayanvoice profile image
Gayan Kuruppu

I created this 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

Collapse
 
jonrandy profile image
Jon Randy 🎖️

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

Collapse
 
ryanlanciaux profile image
Ryan Lanciaux

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

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

So, this is also a new view of the page! 😄

curl https://profile-counter.glitch.me/{YOUR USER}/count.svg
Thread Thread
 
ryanlanciaux profile image
Ryan Lanciaux

Curl is pretty cool 👍

Thread Thread
 
jonrandy profile image
Jon Randy 🎖️

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

Thread Thread
 
ryanlanciaux profile image
Ryan Lanciaux

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)

Collapse
 
ljnce profile image
Luca

Thank you Ryan, easily way with awesome result!

Collapse
 
ryanlanciaux profile image
Ryan Lanciaux

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

Collapse
 
rahuldkjain profile image
Rahul Jain

Considered

Collapse
 
nirbhayvashisht profile image
Nirbhay Vashisht

It is awesome. Thanks

Collapse
 
princemuel profile image
Prince Muel

how do you insert the {your user} variable?

Collapse
 
olton profile image
Serhii Pimenov • Edited

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

Collapse
 
ryanlanciaux profile image
Ryan Lanciaux

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).

Collapse
 
ng_update profile image
Kieran

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!!!

Collapse
 
minhaz_rabbi_5d1a22a61516 profile image
minhaz rabbi

How can I color it? the block is all black and the text is green.

Image description