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.
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.
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.
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.
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.
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.
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.
5 β π Go to your profile views counter repository. Go to config.json and click on edit button. 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.
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.
- Repository: gayanvoice/github-profile-views-counter
- Source - gayanvoice/github-insights
- Code: MIT Β© Gayan Kuruppu