🚀 GitHub Profile Views Counter

Set up this GitHub profile views counter for your profile that does not require any services to record views

Free Projects And Source Codes
4 min readJun 19, 2021
GitHub Profile Views Counter

Many GitHub page views counters are not stable as it seems. Any service disruptions or simply removal of these services can lose your profile views. Use this GitHub Action to record changes. It generates badges, charts, and tables for each repository and a badge for total views for your profile.

Why do you need 🚀 GitHub Profile Views Counter?

The main problem of using external services is what you do when they cut off their services? You will see a broken URL of the SVG you used to see profile views, and the next thing is you already lost thousands of profile views.

But this GitHub Profile Views Counter is different from others. It’s a public repository in your profile, and it stores all the data and SVG files. So you don’t lose anything, and it updates the page views every 6 hours. It fetches insights data of your repository from GitHub API. It records the number of unique visitors and also page views.

Features

Charts — The action generates charts for the week, month, and year. The below chart is for the week for a repository. Go to gayanvoice/my-profile-view-counter to see how it works.

Tables — The action generates charts for the week, month, and year. The below chart is for the wee

Setup

1 — 🚀 Go to gayanvoice/github-profile-views-counter and click on Use this template button to create a new repository.

By using a template you don’t need to create the files from scratch, and all you need is to change the configuration

GitHub Profile Views Counter — create using the template
Click on Use this template button to create a new repository

2 —⚡️ Enter a repository name and select repository type to public repository and click on Create repository from template button.

You can give any name for the repository. You need to select repository type to public. Because GitHub provides an unlimited number of action minutes for public repositories.

If you choose private, the free usage will limit to 2000 minutes per month. Go to GitHub Pricing page for more pricing plans.

GitHub Profile Views Counter — click on Create repository from template button to create the repository
Click on Create repository from template button to create the repository

After you click on Create repository from template button, it will take some time to create the repository.

3 — 🔒 Create a new personal access token with repo and workflow options

Go to Personal Access Tokens and click on Generate new token button. Give it any name and select repo and workflow options and click on Generate token button. ✂️ Copy the token.

GitHub Profile Views Counter — create a new personal access token with repo and workflow options
Create a new personal access token with repo and workflow options

4 —🔑 Go to your profile views counter repository and go to Settings, and select Secrets option from left side bar. Click on New repository secret button and enter name as INSIGHTS_TOKEN and 📋 paste the personal access token under value. Click on Add secret button.

GitHub Profile Views Counter — add repository secret by using repository secrets
Add repository secret by using repository secrets

5 — 📄 Go to your profile views counter repository. Go to config.json and click on edit button. Add repository names.

GitHub Profile Views Counter — edit config.json file
Edit config.json file to add repository names

6 — Go to your profile views counter repository and click on Actions tab. Select the workflow and click on 🟥 Run workflow button.

GitHub Profile Views Counter — click on run workflow button
Click on run workflow button

It will take few minutes depends on number of repositories you have entered to the workflow. It will generate total views badge, repository badges, and markdown files.

This action is written by gayanvoice. Don’t forget to follow him on GitHub, Medium and Twitter.

--

--

Free Projects And Source Codes
Free Projects And Source Codes

Written by Free Projects And Source Codes

0 Followers

Open-Sourcerer who hunts JavaScript and Java projects from the web. Do you like awesome repositories? Follow me.