Live data from Hacker News

How to track and display profile views on GitHub

rushter.com

31–40 of 113 posts

Re: How to track and display profile views on GitHub

#31
post #7

Earlier quoted context omitted.

I agree, but I think such information should be available to all people. Some people will be doing this anyway, and they can hide this by using a transparent pixel.

What benefits do you feel you get from this over the view counting Github already does for you?

You can't view profile statistics right now. Personally, my intent was to demonstrate the concept. I don't have plans using it.

Re: How to track and display profile views on GitHub

#32

Which exact headers are being leaked by GitHub? Depending on what they leak, this could be something only useful for counting hits (if all they leak is the implicit time of the request), or for fully tracking users (if they leak Etags, original IPs, etc). It's too bad the author removed the badge from their Github profile. It would be interesting to see the effect of this post on profile views.

Github does not send any extra information.

    "GET /counter.svg HTTP/1.1" 200 565 "-" "github-camo (62249a1c)"

I've reverted the badge.

Re: How to track and display profile views on GitHub

#33
post #14

You could also simply click on the "Insights" tab of the repository you created to host the README.md page.

From TFA:

> According to my tests, profile views do not count as repo views, and I hope, in the future, we will be able to see traffic stats in the repository that hosts the README file.

Re: How to track and display profile views on GitHub

#34

First I heard about a readme for your profile page. So the facebook-ification of GitHub progresses? At what point is LinkedIn going to be merged into GitHub? (Only partially /s)

It's just gone live in the last day or so. The designer talked about it here a few weeks ago: https://twitter.com/pifafu/status/1265773172520914944

Personally I don't see much reason for this to be implemented via a git repository (rather than a text field in a database, like the existing Bio text), other than "we're GitHub, everything's a git repository, so why not".

At the moment, it's a single-file repository. Perhaps they have some ideas for other things that could be served from there too.

Weirdly at the moment it's required to be a public repository. This seems counterproductive: if it's my personal information blurb I don't much want other people looking at its history and I certainly don't want them forking it. (Are there any non-malicious reasons for doing that?)

Re: How to track and display profile views on GitHub

#35
post #14

You could also simply click on the "Insights" tab of the repository you created to host the README.md page.

From TFA: > According to my tests, profile views do not count as repo views, and I hope, in the future, we will be able to see traffic stats in the repository that hosts the README file.

My bad, I missed that part. Hopefully Github will implement this feature.

Re: How to track and display profile views on GitHub

#36
post #28

Unrelated badge ideas: 1. Write a watcher that periodically reports whether you’re actively using a coding-related app (Terminal, VS Code, etc.) to a server you control, and serve a “coding”/“not coding” badge on your profile page; (could even detect which project you’re working on, and display that;) 2. Write an Apple Watch app that periodically reports whether you’re asleep, and serve a “sleeping”/“awake”/“unknown”…

Sounds dystopian.

Re: How to track and display profile views on GitHub

#37
post #28

Unrelated badge ideas: 1. Write a watcher that periodically reports whether you’re actively using a coding-related app (Terminal, VS Code, etc.) to a server you control, and serve a “coding”/“not coding” badge on your profile page; (could even detect which project you’re working on, and display that;) 2. Write an Apple Watch app that periodically reports whether you’re asleep, and serve a “sleeping”/“awake”/“unknown”…

> Write a watcher that periodically reports whether you’re actively using a coding-related app (Terminal, VS Code, etc.) to a server you control, and serve a “coding”/“not coding” badge on your profile page; (could even detect which project you’re working on, and display that;)

Sounds like Discord.

Re: How to track and display profile views on GitHub

#38
post #28

Unrelated badge ideas: 1. Write a watcher that periodically reports whether you’re actively using a coding-related app (Terminal, VS Code, etc.) to a server you control, and serve a “coding”/“not coding” badge on your profile page; (could even detect which project you’re working on, and display that;) 2. Write an Apple Watch app that periodically reports whether you’re asleep, and serve a “sleeping”/“awake”/“unknown”…

3. Write an integration to the local cemetery, and after funeral is successfully detected serve "alive/dead" badge on the profile page.

Re: How to track and display profile views on GitHub

#39
post #6
post #2

Everything old is new again. I used this same technique on MySpace 15 years ago. I wonder if Github will try to filter that out the same way MySpace did back in the day.

I did some research before writing an article. GitHub started proxying images in 2014, and there are a lot of repositories that use this technique to keep their stats. I think GitHub is OK with that.

Re: proxy security concerns:

>Unlike GitHub, most of them don't even bother proxying the image to hide IP, referrer, and browser agent. If you want to allow external images on your site, you must proxy them and hide everything about a person who requested it. > A person with bad intentions can trick a victim into opening your profile that looks completely legit and detect his IP and a browser.

Can you explain this in more detail? Given a profile host that doesn't proxy, how does that attack work?

Re: How to track and display profile views on GitHub

#40

Which exact headers are being leaked by GitHub? Depending on what they leak, this could be something only useful for counting hits (if all they leak is the implicit time of the request), or for fully tracking users (if they leak Etags, original IPs, etc). It's too bad the author removed the badge from their Github profile. It would be interesting to see the effect of this post on profile views.

Github proxies all image requests, like GMail as a security measure. The cache busting technique the author refers to only ensures the security proxy doesn’t cache the image data, which would prevent the counter going up
Post reply on HN