-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub proxies both HTTP and HTTPS resources, which means the beacon does not receive all the hits. Hence, removing the GitHub example. That said, the good news is that GitHub now offers own analytics: https://github.com/blog/1672-introducing-github-traffic-analytics
- Loading branch information
Showing
1 changed file
with
7 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6acd862
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@igrigorik per the guidance GitHub gave for badges, you can still get these beacons to not cache if you add
Cache-Control: no-cache
andETag
headers (see github/markup#224 (comment)).Wouldn't that work for this beacon too?
6acd862
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, great find. Indeed, it would. Up for making a pull? :-)
6acd862
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get, how is this really helping us? in the topic github/markup#224 (comment) they discuss issues with badges, e.g. if you have a new etag github will bust the cache and you can see updated badge. How does it work for the beacon? do we need to generate Etags randomly on every request? but this does not solve the core issue, in the analytics you will see github robot not the original visitor. just my $0.02
6acd862
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a bit more digging (was related to how we process badges). It appears you can use a very short expires header too to make most requests get through.
However, you're right that the user identity will be lost. So you can u can get counts (potentially with some inaccuracy for simultaneous visits), but not the rich client info. Still, in some scenarios that's helpful.
I'll see if I can find the time to submit a PR. Code seems simple, just need to have time to setup an app engine instance and such too.