antonkomarev / github-profile-views-counter

It counts how many times your GitHub profile has been viewed. Free cloud micro-service.
https://komarev.com/sources/github-profile-views-counter
MIT License
3.91k stars 357 forks source link

Profile Hits Counter doesn't count hits on GitLab, Azure DevOps or Bitbucket #96

Open HariSekhon opened 1 month ago

HariSekhon commented 1 month ago

The profile hits counter doesn't include hits from the same README mirrored to GitLab, Azure DevOps or Bitbucket when you refresh those pages.

I replicate all of my repos to all 4 platforms to test features and also for resilience if GitHub is ever down or hacked I have backup copies of my repos on the other hosting platforms (my doc on how to push to all 4 automatically on every simple git push is in my Knowledge-Base).

Example:

refresh this page - it increments the profile views counter:

https://github.com/HariSekhon

but if you refresh the GitLab page it doesn't:

https://gitlab.com/HariSekhon

and same with the Azure DevOps repo README directly since they don't use this homepage:

https://dev.azure.com/harisekhon/GitHub/_git/HariSekhon

and same for Bitbucket README:

https://bitbucket.org/harisekhon/harisekhon/src/main/

yet even a direct refresh of the GitHub README does increment the counter:

https://github.com/HariSekhon/HariSekhon/blob/main/README.md

I suspect you have some kind of referer filter for github.com which should be extended to include gitlab.com, dev.azure.com and bitbucket.org?

This appears to also be the case on YHype - which btw is awkward to test because https://yhype.me/github/profile-views is really slow to load in between each refresh to test it and can be confounded by other profile views on GitHub in that time.

antonkomarev commented 1 month ago

@HariSekhon it is intended, this project is named GitHub Profile Views Counter.

Views from other services are not working right now because we are checking the source of the request. GitHub passes all the images through their proxy service Camo, so all of the requests are coming from its IP addresses and fixed User Agent. This helps us to avoid spam attacks (not all, but some of them).

You may add a PR, to add GitLab support, I'll try to dive in for the review. IMHO, other services like Bitbucket are pretty dead as public sources hosting. I've never met any of the popular open source projects on Azure or Bitbucket. They are mostly for the enterprise solutions, for the companies who are not sharing their code with the community and they don't need to track views count.

antonkomarev commented 1 month ago

YHYPE tracking pixel works absolutely the same as GHPVC pixel.