GithubHelp home page GithubHelp logo

Trending Gistlogs about gistlog HOT 5 OPEN

tighten avatar tighten commented on April 28, 2024
Trending Gistlogs

from gistlog.

Comments (5)

mattstauffer avatar mattstauffer commented on April 28, 2024

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.

from gistlog.

Hermannovich avatar Hermannovich commented on April 28, 2024

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 ?

from gistlog.

mattstauffer avatar mattstauffer commented on April 28, 2024

@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.

from gistlog.

mattstauffer avatar mattstauffer commented on April 28, 2024

Current plan:

  • Write a custom JS that feels very similar to the GA script
  • That custom JS will ping a local route
  • The local route will push the data up to GA via server push

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:

  • How many views were there on any URL in the last ___ days
  • What were the the top 10 URLs visited in the last ___ days, and how many page views did they get?

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").

from gistlog.

ashvinichilbule avatar ashvinichilbule commented on April 28, 2024

I want to contribute to the issue please assigned it to me

from gistlog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.