Code Monkey home page Code Monkey logo

Comments (5)

RomanBoegli avatar RomanBoegli commented on September 1, 2024

That's a good and interesting question. Let's assume we know the following information:

  • requester's user-id (because he is logged in) or IP address (less concise but better than nothing)
  • estimated time to read (ETR)
  • time spend on the article page

When a show the article page to a requester, we count a new view.
When the same requester requests the same article within a time span which is shorter than (say) 2x the article's ETR, we ignore the view.
Requests after the 2x ETR duration will increase the counter again.

We could refine this strategy with the time spend (TS) on the article page. For instance, if an article with an ETR of 10 minutes is shown 7 minutes to a requester, then we count 0.7 views. However, a single view measurement won't exceed 1.0 (e.g. requester leaves the article open for hours).

What do you think?

from lightread.

RomanBoegli avatar RomanBoegli commented on September 1, 2024

Alternatively, we could also distinguish between views and reads. Views would then simply be the number of article requests while reads is the summation of the TS/ETR values.

from lightread.

RomanBoegli avatar RomanBoegli commented on September 1, 2024

I prepared our database accordingly...

from lightread.

TKone7 avatar TKone7 commented on September 1, 2024

I agree with the first part of your proposal, to count all requests except for some reasons (same user / IP within a certain time frame).
I have doubts about the measure of "time spent" (TS). Since we are operating statelessly it is not trivial to figure out how long the user spent on the site reading. We only know when we delivered it, and when he requested some other page. But he could also just close the browser window (so he quit reading but we don't know for sure when) or open another page in a different tab (could look as he went to another page but might still be reading it somewhere else). Without sophisticated client side tracking code this approach is not feasible in my opinion. I, therefore, recommend to chose an approach that is viable statelessly.

from lightread.

RomanBoegli avatar RomanBoegli commented on September 1, 2024

done

from lightread.

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.