Segmented Notifications
Segmenting allows you to create different groups that your app users can subscribe to, so they can choose what notifications they want to receive.
For example, you could have segments for Business, Sports, Music, and Cooking. App users can select which ones they are interested in, and turn on and off notifications in their app settings.
Segmenting is only available in the Agency Plus plan. To upgrade, visit https://apppresser.com/account, click Licenses, then click "View upgrades".
Creating Segments
First, you need to setup your push notification profiles following our documentation for iOS and/or Android.
You should then see an "Add Segment" button, click it and give your segment a name. Do not use spaces, numbers, or special characters. For example, "Sports", "Business", or "Music" are good segment names.
There is a limit of 50 segments total per account, across all apps. (Not 50 per app, 50 per account)
Once your segments have been created, you need to add a settings page to your app.
Create a Push Settings Page
AppPresser 4: click this link
If you just purchased, you are using AppPresser 4. Please click the link above.
AppPresser 3 Only
In your app customizer, go to Custom Pages => Add New => Custom HTML.
All you have to do is add this button to any custom HTML page:
<button ion-button (click)="showSegments()">Notification Settings</button>
AppPresser 3 only: Here is example code for a more robust settings page:
<ion-list> <button ion-item (click)="showSegments()">Notification Settings</button> </ion-list>
Add that page to your menu and rebuild your app.
Use ion-list or button from the Ionic Framework to style it to your preference.
Clicking the notification settings button will open the push settings page, which allows users to subscribe and unsubscribe from your segments.
showSegments(options)
The showSegments() function is used on your button to open a modal (popup) and can be configured with a title and a CSS class name.
Parameters | Type | Required | Usage |
---|---|---|---|
options | object | optional | Two options are title and cssClass. You can use either one, both or use no options at all. {title:'Weather Alerts', cssClass:'weather-alert-modal'} <button ion-item (click)="showSegments({title:'Weather Alerts', cssClass:'weather-alert-modal'})"> Notification Settings for Weather Alerts </button> |
Pushing to Segments
To send a push to a segment, you have a few options.
The first is to choose your segment when sending a push manually through your app dashboard.
Our push notifications API allows you to send pushes from any 3rd party application, and you can include the segment ARN in your request to send to a segment. Learn more.