Segmentation Plugin Interval Change

Is there a way to change the intervals on the Campaign Activity > opened > selections?

Currently the options are 7 day, 1 month and 3 months. I would like 1 day, 3 days and 5 days.
I would also like to add time intervals to the Campaign Activity > Clicked > selections

Can some one explain the files I would need to edit and the lines?

Thank you any help is greatly appreciated!

@sloppyness Look at the file plugins/SegmentPlugin/SubscriberConditionActivity.php

You should be able to add entries to two arrays that have related rows. The $aggregatedIntervals value must be a valid mysql INTERVAL value

    $this->aggregatedCaptions = [
        'last7day' => s('Any campaigns within the last 7 days'),
        'last1month' => s('Any campaigns within the last 1 month'),
        'last3month' => s('Any campaigns within the last 3 months'),
    ];
    $this->aggregatedIntervals = [
        'last7day' => '7 DAY',
        'last1month' => '1 MONTH',
        'last3month' => '3 MONTH',
    ];

Bear in mind that the plugin is included with phplist and will be replaced when you upgrade phplist.

Thank you @duncanc!!! I was able to change the intervals for the Opened selection.

How do I add those same interval options to the Clicked selection?

Again, thank you in advance this will save me HOURS of manual work.

@sloppyness The plugin currently supports the aggregated campaigns only for opened/not opened. The same can be developed for clicked/not clicked but I just didn’t do that originally.

Bear in mind that “clicked” will apply to any link in a campaign, it won’t be possible to select subscribers who clicked a specific link in a campaign.

@sloppyness I have changed the plugin so that the aggregated campaigns applies also to sent/not sent and clicked/not clicked.
You can update the plugin on the Manage Plugins page using the URL
https://github.com/bramley/phplist-plugin-segment/archive/master.zip
but any changes that you have made will be overwritten.

Thank you. I was not expecting you to update, although I thoroughly appreciate it @duncanc!!!

Just to reply back, this is working exactly as expected. Thank you!

1 Like