-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trending Gistlogs #41
Comments
I think view count would be the easiest way to start. Hook into the Google Analytics API and just provide some information about most viewed posts in the last ___. Cool idea. |
Hi @adamwathan and @mattstauffer I'm trying to implemented that functionnality, but I don't see how to test it locally, can you give me some hints please ? |
@Hermannovich That's a great question! Since we're already relying on the JavaScript Google Analytics push--and since that's faster than doing a server-side push--it seems like it'll be tough to accurately test that. My guess is that we instead take a look at our Google Analytics and make sure we know whether there's any diversity in the data--e.g. Do we get two separate page references for "gistlog.co/user/post" and "gistlog.co/user/post/"?-- and then make a stub that represents all the different cases we're expecting to get back from our data... we build a Google Analytics client that we use to read our data... and then in our tests we mock that client using the stub. |
Current plan:
This way we can get more accurate data, without introducing higher load times, in a way that will work even if we add whole-page caching down the road. Additionally, we can scrape out only the data we care about, therefore limiting Google's ability to collect personal information. From there, we can then build a really rudimentary local tool that interacts with Google Analytics' API via the Google SDK and can answer simple questions for us:
I think that alone merits a PR. From there we can work on design and planning for a trending gistlogs page, and decide what math we would want to use to understand "trending" (vs. just "lots of visits"). |
I want to contribute to the issue please assigned it to me |
No idea on what the implementation would be, how things would be scored, or anything, but it would be cool if the home page could show trending posts so you can see what people are reading.
Could be an upvote system, view count, shares, who knows, but the general job story is something like:
The text was updated successfully, but these errors were encountered: