wpsharks / s2member

s2Member® Framework (membership management for WordPress®).
64 stars 36 forks source link

Display Graph/UI Stats for User Downloads #222

Open jaswrks opened 10 years ago

jaswrks commented 10 years ago

s2Member collects a lot of information about protected files downloaded by a user. It would be nice to expose this information to a site owner for each user; and collectively too. Perhaps via graphs/charts combined with per-user stats in the dashboard.

See also: https://websharks.zendesk.com/agent/#/tickets/3155

dimitriosvasileiou commented 10 years ago

I have been using s2member for awhile now and I love the features and functionality. However, there are a few things that are very basic and yet, they are missing.

Tracking members' downloads is one of them. Perhaps I should say 'display' as tracking is already happening.

I run a magazine and I have thousands of members at various membership levels. They can download one issue per month but unfortunately, they can also download back issues (this is how s2member works). My problem is that some of them do download back issues and then they complain that, although their membership hasn't run out, they cannot download future issues. Of course, it is impossible for me to prove what and when they have downloaded it.

I know that downloads are being monitor, that's certain. How hard is it to display those downloads in each member's page? All we need is the file name, the number of downloads and the date the download took place.

I have been watching for over 2 years now all the requests from s2member users on the subject, I believe it is time to implement this feature as soon as possible. Personally, I am tired of waiting, the lack of it has caused me nothing but many days of stress.

jaswrks commented 10 years ago

Yep, the functionality is definitely in there, and I agree that bringing it into the UI should be on our list. Hopefully we can make some progress on this soon. Until then, it might interest you to know that some work was done on this awhile back; but mostly for developers.

s2Member exposes several API Functions that allow you to extend it in various ways. One of these is the s2member_user_downloads() function that has been around for awhile now. You might take a look here at the codex article. See also: the full list of API Functions.

<?php
$user_id = 123;
$downloads = s2member_user_downloads($user_id);
echo $downloads['currently'].'<br />';
echo $downloads['allowed'].'<br />';
echo $downloads['allowed_days'].'<br />';
print_r($downloads); // for a full list of all elements in the return value.

There are also several API Constants exposed by s2Member via PHP, JavaScript, and through the [s2Get constant="" /] shortcode. These can be used to present some of this information on-site as necessary. See: http://www.s2member.com/codex/stable/s2member/api_constants/package-summary/

[s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED" /]
[s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS" /]
[s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED" /]
[s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY" /]

See also: Dashboard ⥱ s2Member ⥱ API / Scripting for more examples.

jaswrks commented 10 years ago

Others worth noting here...

s2member_total_downloads_of() s2member_total_unique_downloads_of()

dimitriosvasileiou commented 10 years ago

OK, but all this requires knowledge or hiring someone. Can we have it displayed in the member's page please?

jaswrks commented 10 years ago

@raamdev @BruceCaldwell Can I interest either of you in chart building?

dimitriosvasileiou commented 10 years ago

I have no idea why I received an email about this, Jason, I am not even quoted.

jaswrks commented 10 years ago

I have no idea why I received an email about this, Jason, I am not even quoted.

Sounds like you "watched" this GitHub issue inadvertently. Please click the "Unwatch" button at the top of this page at GitHub to unsubscribe.

raamdev commented 10 years ago

@dimitriosvasileiou If you leave a comment on any GitHub issue on GitHub, you are automatically marked as "participating" in the issue and therefore will get all new replies to that issue unless you specifically unsubscribe from it (which you can do from the right side). See the screenshot below:

2014-07-21_18-27-43

SmilePix commented 10 years ago

I am another s2Member who wishes this would be in the UI. I will try what Jason has suggested, but am hoping for a more robust and simpler solution in the very near future.

Sam

clavaque commented 10 years ago

Another vote for this feature: https://websharks.zendesk.com/agent/#/tickets/3569

raamdev commented 9 years ago

Another vote for tracking downloads and being able to view downloads on a per-user basis (internal ticket): https://websharks.zendesk.com/agent/tickets/5711