mirror of
https://github.com/antonkomarev/github-profile-views-counter.git
synced 2026-05-25 01:02:22 -04:00
How to ignore own profile views? #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ranamahmud on GitHub (Jul 21, 2020).
Currently, the GitHub profile view counter increases counter by one when a user reloads his GitHub profile page. For more accurate counter it should exclude profile views by the owner of the GitHub repository.
@antonkomarev commented on GitHub (Jul 21, 2020):
Hi @ranamahmud!
In short: it is impossible.
GitHub passes all images URLs through their GitHub Camo proxy service. This means that only GitHub can track personal information, such as visitors User Agent or IP address. Third party cloud service stores only views timestamps and total count of views.
@ranamahmud commented on GitHub (Jul 21, 2020):
We can try adding a JavaScript script in the rmd file that'll check the current username in the browser's address bar and if that matches the repo owner's name then it'll exclude the view count.
@antonkomarev commented on GitHub (Jul 21, 2020):
We can't add JS, it's a markdown in GitHub. GitHub protects users from such things. Otherwise it will be security issue and people will be able to place tracking cookies. GitHub doing it right.
@antonkomarev commented on GitHub (Jul 21, 2020):
<script>tag is encoded.@ranamahmud commented on GitHub (Jul 21, 2020):
Got it.
@ksdkamesh99 commented on GitHub (Sep 25, 2020):
Hi @ranamahmud I too got the same idea but now it is cleared . Thanks for clarifying @antonkomarev .
@vishalcseiitg commented on GitHub (Oct 2, 2022):
Thanks for sharing