REQUEST: Add Inactivity Time Frame on Subscriber Command Page

Is it simple to add an option to select the inactivity period to look for subscribers to delete/blacklist?

@sloppyness There is a subscriber report that does that, menu Subscribers > Subscriber reports.

@duncanc I use that currently, then I use the Subscriber Command page to blacklist them, then I use the Reconcile Subscribers page to delete all Blacklisted subscribers.

I am looking to get this down to one step if possible. Any thoughts?

Thank you!

@sloppyness In a similar way to the Advanced Search results, I have added a button to copy the results of a report to the command page. That is, the email address of the subscribers listed in the report.

Thank you once again @duncanc!

The housekeeping plugin, along with obvious other functions, can be called by a cronjob. Would there be any way to run the inactive report and then Blacklist those subscribers using just a cronjob?

Thank you!

Switching plugins, can you add an option to the Housekeeping plugin that blacklists all inactive subscribers (have not opened) in the past X amount of time (30 day as an example)?

Thank you again for all your help and expertise in PHPList.

@sloppyness No, the “command” page does not support being called by a cron job.

I’m not sure why you think that you need to run the inactive report frequently. I would have thought just a few times each year to find people who do not appear to be active. Even then I would be very cautious about actually deleting or even blacklisting them.

@duncanc There are several reasons why I want the subscribers removed that have been inactive for 30 days or more. I would think this would be a nightly cronjob that removes anyone that has been inactive for X days or more.

I agree, blacklisting is probably a little harsh. What about moving them to a different list, or marking them in some way to not be sent any more mail without the administrator interaction?

@sloppyness I don’t think that adding to the housekeeping plugin is the best approach. I will look at adding a page to the Subscribers plugin that can be run from the command line or a cron job.

Greatly appreciated @duncanc!

@sloppyness The Subscribers plugin now has a command line page to run the inactive subscribers report. It can save the results to a file, or blacklist or delete the identified subscribers. See https://resources.phplist.com/plugin/subscribers#inactive_subscribers

1 Like

Thank you @duncanc! Now you know my next question is; is there a way to run the Delete Blacklisted Subscribers on the Reconcile Subscribers page from the command line to then run it as a cron?

@duncanc I have my cron set up this way:
0 0 */1 * * sudo /pathto/php/bin/php /pathto/lists/admin/index.php -p inactive -m SubscribersPlugin -c /pathto/lists/config/config.php -f /pathto/lists/inactives.csv -i “50 day” -a blacklist

It is blacklisting, not writing the file though. What am I doing wrong?

(of course /pathto/ is the actual path in my crontab)

Thank you!

@sloppyness The actions are alternatives, the default action of export, blacklist, and delete. You can run the command once to export the subscribers, and again to blacklist those.

@duncanc The report is now showing the actives for the days given… not inactives. Can you check please? When I run it on the command line or in the web interface, it is showing me ACTIVES, not inactives…
This report was run for 5 day inactives… it shows someone that last viewed today in it…

Help?

@sloppyness The selection criteria are

The report selects subscribers who have been sent at least one campaign in the period, and have not opened any of the campaigns they have been sent.

This is not affected by someone opening a campaign that was sent prior to the start of the period. In your case someone could have opened a campaign that was sent one month ago, but they will still be treated as inactive if they have not opened any of the campaigns sent to them in the past 5 days.

@duncanc When I run the report, The Last View is the EXACT number of days I run the report for. Each subscriber has a last view within the days I run the report for, it is not calculating inactives, it is calculating inactives with a last view INSIDE the report time frame I run it for.

From what I can see it is removing users that opened in the past X days. Please take a look and see. This was working as expected before your last update.

Thank you!!

@sloppyness The subscriber selection processing was not changed in the last update to the plugin. You might not be understand the selection though

For an interval of 5 days the subscribers selected are those who have been sent at least one campaign in the past 5 days and have not opened any of those campaigns.

So, if you have sent only one campaign then it will select everyone who has not opened that campaign, regardless of whether any has opened any other prior campaign within the past five days. This might not be what you actually want, but that processing has not changed.

The Last View field in the results is the most recent view of any campaign, including those sent earlier than the interval. I expect that those subscribers had viewed an earlier campaign but not those sent in the past 5 days. I can see that this can cause confusion so it might be best just to ignore it.

Trying to use a short period, such as 5 days, is probably not a good idea. You should think of the number of campaigns that you want to use as a criteria to treat people as inactive, i.e. not opening any of the past N campaigns. Then use that to decide on a suitable interval.

Initially I wanted “inactive” to be “not opened any of the past N campaigns” but the sql query became way too complex. Insteadusing “not opened any campaigns sent in the past N days” was simpler.

@duncanc I am referring to the Subscriber’s Report Page > Inactive Subscribers

The only selection is a time frame, one cannot select a specific campaign. The screenshot above illustrates the issue. Based on your explanation, the subscribers reported, does not match how you are saying the report works. Look at the dates above in my screenshot.

The report showed me subscribers that had opened in the last 5 days, not the other way around like it is supposed to be. Something has been changed in this report. It is not working the way it was and is now showing active subscribers for the specified time frame. Not sure if it is related to 3.5.9, or your update, although it is not working correctly any longer.

@sloppyness Just to repeat my previous explaination, the subscrbers listed are those who have been sent one or more campaigns in the past 5 days and have not opened any of those. They may well have opened an earlier campaign within the past 5 days and that is what you are seeing as the" last view" date.

Please look at the subscriber profile for one of the listed subscribers to see the history of campaigns. Here is an example of what I think you will be seeing. The subscriber was listed in the report because they have not opened the most recent campaign sent within 5 days. The last view date on the report shows the date of viewing the previous campaign, even though that is within 5 days.