All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.

Author Topic: WP-PostViews order by Average Views per Day  (Read 4948 times)

0 Members and 1 Guest are viewing this topic.

Offline aSKer

  • Newbie
  • *
  • Posts: 9
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: custom
WP-PostViews order by Average Views per Day
« on: 08 February 2011, 10:11 »
Hey there,

currently I am using this query to display a list of posts:
v_sortby=views&v_orderby=desc&showposts=10

The problem is that once a post is in the top spot, other posts will have a lot of trouble to gain the same visibility, so I thought that it would be great if you would include another way of sorting posts based on Average PostViews Per Day.

By doing a query to get the difference between post time and current server time you could get the time factor then divide the PostViews by this number... This way, the list would auto-depreciate posts which are old and maybe not receiving a tremendous amount of traffic. And on the other hand, it would give a chance to fresh posts to get a good spot on the list... Post would then be sorted by popularity over time.

To be honest, I've seen other plugins out there already doing this, but I've been a long time user of WP-PostViews and got a whole bunch of views data with it that I would not like to just throw away.

So, do you think you could implement something like: "v_sortby=average" to sort with Average PostViews Per Day?
Hell yeah!

Offline aSKer

  • Newbie
  • *
  • Posts: 9
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: custom
Re: WP-PostViews order by Average Views per Day
« Reply #1 on: 16 March 2011, 02:29 »
hmm... bump?
Hell yeah!

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: WP-PostViews order by Average Views per Day
« Reply #2 on: 17 March 2011, 00:59 »
Sorry that is not possible because WP-PostViews does not logged any other data besides accumulating the postviews to keep it light and simple

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline aSKer

  • Newbie
  • *
  • Posts: 9
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: custom
Re: WP-PostViews order by Average Views per Day
« Reply #3 on: 20 March 2011, 09:47 »
I think that you misunderstood me there.
There is no need to change anything to WP-PostViews, it's just a Custom Query that needs to be made:

WP-Postviews stores Post views for each post.
WordPress stores Time Stamp for each post.

For each post, do the math:

Today (from Server Time) - Post Day (from TimeStamp) = Number of days since publication
Postviews (from WP-Postviews) / Number of days since publication = Average Views per day

Then order posts based on this last value...
Hell yeah!

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: WP-PostViews order by Average Views per Day
« Reply #4 on: 20 March 2011, 12:41 »
I see, that is possible but it is not accurate because it is still accumulative though.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline aSKer

  • Newbie
  • *
  • Posts: 9
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: custom
Re: WP-PostViews order by Average Views per Day
« Reply #5 on: 21 March 2011, 10:52 »
IMO it is accurate because for a given post which had an X amount of postviews. You would always use this total to make the computation...

And all is needed is an average per day, not an exact value for day1 + exact value for day2 + exact value for dayX...

If post1 published on day1 receives: 6 visits on day1 + 3 visits on day2 + 2 visits on day3 = total of 11 visits.
If post2 published on day2 receives: 5 visits on day2 + 3 visits on day3 = total of 8 visits.

Now let's assume we display a list of posts ordered by average postviews per day on day4.

post1:
Day4 (from Server Time) - Day1 (from TimeStamp) = 3 days since publication
11 Postviews (from WP-Postviews) / 3 days since publication = 3.66 Average Views per day

post2:
Day4 (from Server Time) - Day2 (from TimeStamp) = 2 days since publication
8 Postviews (from WP-Postviews) / 2 days since publication = 4 Average Views per day

So post2 would be listed higher than post1 (even though it received a lower total of postviews).

Currently if one of your posts received 2000 postviews due to a Digg and your other posts received 150 visits on average, with current system the digged posts is going to stay on top of the list for months (if not years or even forever because being number 1 it still receives visits).

With the system I'm describing, older posts would need a growing number of postviews to stay on top of the list... If they receive a surge of traffic on one day then nothing, they would slowly lose their "weight" in the list of posts.
Hell yeah!

Offline aSKer

  • Newbie
  • *
  • Posts: 9
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: custom
Re: WP-PostViews order by Average Views per Day
« Reply #6 on: 21 March 2011, 15:55 »
By developing the explanation, I see an issue.
When a post goes live, it usually receives a huge spike in traffic.
So this way of sorting posts would probably need to exclude the posts "younger" than 7/10/15/30 days.
This way, the original spike of traffic will be flattened.
Hell yeah!

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: WP-PostViews order by Average Views per Day
« Reply #7 on: 22 March 2011, 01:03 »
Make sense, I will keep that in mind and see if I have the time to implement it. But most likely it will not be using "v_sortby=average" because it might be a technical constraint. It shall be like get_average_postviews() or something

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline aSKer

  • Newbie
  • *
  • Posts: 9
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: custom
Re: WP-PostViews order by Average Views per Day
« Reply #8 on: 18 April 2011, 08:47 »
bump? ;)
Hell yeah!