meta data for this page
Differences
This shows you the differences between two versions of the page.
plugin:segment [2019/02/14 14:41] – [Add segment conditions] duncanc | plugin:segment [2024/05/20 00:00] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Segment ====== | ||
+ | |||
+ | ---- plugin ---- | ||
+ | |||
+ | description: | ||
+ | author | ||
+ | type : | ||
+ | compatible : phplist 3 | ||
+ | depends | ||
+ | conflicts | ||
+ | similar | ||
+ | tags : | ||
+ | |||
+ | sourcerepo : https:// | ||
+ | donationurl: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Purpose ====== | ||
+ | |||
+ | This plugin provides flexible segmentation of subscribers when sending a campaign. | ||
+ | |||
+ | It allows you to filter the subscribers based on attribute values and subscriber data: | ||
+ | * campaign activity | ||
+ | - was sent/was not sent a recent campaign or any campaign within a period | ||
+ | - opened/did not open a recent campaign or any campaign within a period | ||
+ | - clicked/did not click any link in a recent campaign or any campaign within a period | ||
+ | * Entered date (the date they signed-up to phplist) | ||
+ | * List entered date (the date they subscribed to one of the lists to which the message is being sent) | ||
+ | * email address | ||
+ | * subscriber id (the incrementing number assigned to each subscriber) | ||
+ | * subscriber unique id (the 32 character value assigned to each subscriber) | ||
+ | * List membership, belongs to ALL of the selected lists | ||
+ | * any attribute value | ||
+ | |||
+ | When the campaign is sent then only those subscribers who meet either any or all of the conditions will be selected. | ||
+ | |||
+ | The filtering of subscribers happens when phplist is actually sending the campaign. As phplist processes each subscriber it calls the plugin to decide whether or not to send to that subscriber. Therefore, when phplist starts to process a campaign it will appear that it is sending to the complete list because at that point it does not know which subscribers will be selected by the plugin. | ||
+ | |||
+ | To ensure that you understand this approach, you should send a test campaign to a small list to confirm that the correct subscribers are selected. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====== Installation ====== | ||
+ | |||
+ | phpList now includes this plugin, which can be enabled on the Manage Plugins page. | ||
+ | |||
+ | See the README file on the GitHub page https:// | ||
+ | |||
+ | |||
+ | ===== Support ===== | ||
+ | Please raise any questions or problems in the user forum https:// | ||
+ | |||
+ | ===== Translations ===== | ||
+ | |||
+ | The text displayed by the plugin can be translated into other languages. See the file plugins/ | ||
+ | |||
+ | To create a new language file, copy translations_en.php to translations_xx.php, | ||
+ | |||
+ | ====== Usage ====== | ||
+ | |||
+ | |||
+ | ===== Add segment conditions ===== | ||
+ | |||
+ | The plugin adds a tab to the Send a campaign page on which you can create segment conditions to filter the subscribers who will receive the campaign. | ||
+ | |||
+ | <WRAP center round box 80%> | ||
+ | {{: | ||
+ | </ | ||
+ | |||
+ | You can choose whether subscribers must meet all conditions or any of the conditions. Then add one or more conditions: | ||
+ | -select an attribute or a subscriber field from the drop-down list. | ||
+ | -the page will then refresh automatically showing a list of the operators for the selected field and a target input field. | ||
+ | -select an operator and then enter or select the target value | ||
+ | |||
+ | Any number of conditions can be created but usually one or two should be sufficient. Then click the Calculate button to see how many subscribers will be selected when the campaign is actually sent. | ||
+ | |||
+ | |||
+ | ===== Calculating the number of subscribers ===== | ||
+ | |||
+ | The plugin calculates the number of subscribers using the lists chosen on the Lists tab. It selects only those subscribers who belong to the lists and who meet either any or all of the conditions. Also, it excludes unconfirmed or blacklisted subscribers, | ||
+ | A warning will be displayed if there are any incomplete conditions, where the target value has not been selected. | ||
+ | |||
+ | The calculation provides an idea of the number of subscribers using the current data. When the campaign is actually sent the plugin selects the subscribers again. Therefore, if there have been new subscriptions, | ||
+ | |||
+ | ==== On anniversary operator ==== | ||
+ | |||
+ | This operator can be used when you have a date attribute holding the date of an event, such as birth date. It is used to send a campaign to subscribers on the anniversary of that date, such as the birthday. For this to work effectively you need to set the campaign to requeue each day and ensure that the queue is processed regularly, ideally using a cron job. | ||
+ | |||
+ | When you initially create the campaign and select this operator on the Segment tab the calculation of subscribers will include those whose anniversary is the current day. That will be accurate if the campaign is to be first sent on the same day, but the actual subscribers selected will definitely be different if the campaign is sent on a later day. It is still useful to see the number of subscribers for the current day in order to be confident of the calculation' | ||
+ | |||
+ | ==== After interval operator ==== | ||
+ | |||
+ | When the "after interval" | ||
+ | |||
+ | The plugin displays the first 50 subscribers' | ||
+ | |||
+ | When the subscribers are displayed the full set of selected subscribers can be downloaded. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ===== Processing the queue ===== | ||
+ | |||
+ | When phplist processes the message queue the plugin selects the subscribers who meet the conditions for each message. It writes a record to the event log showing the number of subscribers selected. | ||
+ | {{ : | ||
+ | ===== Entering the target value ===== | ||
+ | ^Field / Attribute type^Entering the target value^ | ||
+ | |textline, textarea, hidden attributes, email address, subscriber id and unique id|Entered directly in the text field.| | ||
+ | |select, radio button attributes|Selected from the multi-select list box.| | ||
+ | |Entered date and date attributes|A date is selected using the date-picker control. \\ An interval is entered directly in the text field and can be a number of days, weeks, months, quarters or years. For example | ||
+ | |checkbox attributes|These do not have target values.| | ||
+ | |checkboxgroup attributes|Selected from the multi-select list box.| | ||
+ | |campaign activity|A prior campaign is selected from the drop-down list. The list contains only campaigns sent to the lists selected on the Lists tab. \\ For the " | ||
+ | |||
+ | ==== Choosing target values from a multi-select list ==== | ||
+ | |||
+ | The target values for select, radio button, and checkbox group attributes are presented as a multi-select list. When target values have not yet been chosen then the list will be displayed similarly to this | ||
+ | |||
+ | {{: | ||
+ | |||
+ | To show the list of values you need to click the area | ||
+ | {{: | ||
+ | Then you can select one or more target values, after which they will be displayed similarly to this | ||
+ | {{: | ||
+ | |||
+ | ===== Evaluating conditions ===== | ||
+ | ^Operator^How the condition is evaluated^ | ||
+ | |" | ||
+ | |"is blank" and "is not blank" | ||
+ | |" | ||
+ | |" | ||
+ | |"is included" | ||
+ | |"is before" | ||
+ | |"is between" | ||
+ | |" | ||
+ | |"on anniversary" | ||
+ | |"is checked" | ||
+ | |"one checked", | ||
+ | |"is one of", "is none of" | ||
+ | |"was sent", "was not sent" | ||
+ | |" | ||
+ | |" | ||
+ | |" | ||
+ | |||
+ | ===== Empty or missing attribute values ===== | ||
+ | The way that the plugin handles empty or missing attribute values varies slightly for each type of attribute and its operators. | ||
+ | ^Attribute type^Missing, | ||
+ | |textline, textarea, hidden|Treated as an empty string. So, for example, the operator ' | ||
+ | |select, radio button|Treated as select list index of 0. So, for example, the operator 'is one of' will be false, and the operator 'is none of' will be true.| | ||
+ | |checkbox|Treated as being unchecked. So the operator ' | ||
+ | |checkboxgroup|Treated as all being unchecked. So the operators 'one checked' | ||
+ | |date|Values are ignored. So subscribers with these values will not be selected for any operator, ' | ||
+ | ===== Saving and reusing segments ===== | ||
+ | |||
+ | The current set of conditions can be saved for later use. Enter a name for the segment and click the Save segment button. If the segment name already exists then it will be replaced. | ||
+ | {{ : | ||
+ | Saved segments appear in a drop-down list, from which one or more can be selected. When selected the conditions will be added to any current conditions. | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{ : | ||
+ | A saved segment that is not needed any longer can be removed by editing a value on the Settings page within the Segmentation settings group. The field " | ||
+ | <WRAP clear></ | ||
+ | |||
+ | |||
+ | |||
+ | ===== A simple autoresponder ===== | ||
+ | You can use the plugin to create a simple autoresponder for a date attribute by using the "after interval" | ||
+ | |||
+ | On the Schedule tab set the campaign to requeue every day and set the embargo time to be the time of day that you want it to be sent. | ||
+ | Use a cron job that runs at least once a day just after the embargo time to process the queue. | ||
+ | |||
+ | ====== Configuration ====== | ||
+ | |||
+ | The plugin adds a Segmentation group to the Settings page where you can enter: | ||
+ | * The size of the list of previous campaigns for Campaign activity. The default is 10. | ||
+ | * The number of selected subscribers to display. The default is 50 and the value must be in the range 5 - 500. | ||
+ | * The list of saved segments. You can delete saved segments but not rename or add. | ||
+ | ====== Change Log ====== | ||
+ | |||
+ | See the GitHub page https:// | ||
+ | |||
+ | |||
+ | |||