More information on client-side segmentation can be found in paragraph Altering or canceling notifications on the device.
The client-side segmentation feature is introduced in version 1.10.0 of our plugin and further improved by segmentation on campaign history in version 1.12.0. The server-side segmentation is introduced on version 3.1.0 of the iOS SDK and 3.9.0 of the Android SDK.
Segmentation allows you to limit specific notifications to specific groups of users. This prevents your end users from receiving notifications that aren't relevant for them.
Two steps are needed when using segmentation, first the segment property and the appropriate value have to be set in the campaign (or notification) in the dashboard. Next to that they have to be set inside your app or via the API. When these match, the device will receive the notification.
The segmentation feature also allows you to distinguish the users in our custom reports, to set this you only need set the segmentation property inside your app or via the API/Dashboard.
For each type we expose methods to conveniently set a segment. An example for each type is shown below. When setting a value for an existing property the previous value gets overwritten. Set value to nil to clear the property.
A segmentation property can only be set after Plot plugin starts.
Information on how to get started with segmentation is available in the Segmentation - How to get started.
Segmenting via the API: Server-Side
// --- After Plot.init has been executed --- // Set the segment for being a premium member to true. Plot.setBooleanSegmentationProperty("premiumMember", true); // Set the segment for gender to male. Plot.setStringSegmentationProperty("gender", "M"); // Set the segment for year of birth to 1980. Plot.setLongSegmentationProperty("yearOfBirth", 1980); // Set the segment for money spent to $10.35. Plot.setDoubleSegmentationProperty("moneySpent", 10.35); // Set the signup date segment (the value is in seconds since the UNIX Epoch, just as System.currentTimeMillis()/1000). Plot.setDateSegmentationProperty("signUp", 1426503567);
A segmentation property can also be set to target specific users or to filter specific users data in our custom reports by providing the user id as a segmentation property.
// --- After Plot.init has been executed --- // Set the segment for an specific user id. Plot.setStringSegmentationProperty("user_id", "1234")
Any segmentation key has a limit of 40 characters and the value of 40 characters
The server-side segmentation is introduced on version 3.1.0 of the iOS SDK and 3.9.0 of the Android SDK. This feature allows setting segmentation properties via the API, these properties are then synchronized with the devices as if they were set on the client-side.
This feature removes the necessity to add more logic to your app and opens the door to use cases such as using third party segmentation platforms such as DMPs, further improving the impact of your campaigns.