Setting Up Push Notification Segmentation in Mobile Apps
Sending the same notification to your entire user base — that's not segmentation, that's spam. CTR drops, unsubscribes grow, iOS starts throttling delivery through Apple's notification throttling for apps with low engagement rate. Proper segmentation is a technical task, not a marketing one.
How Segmentation Works at SDK Level
Any notification platform (OneSignal, Firebase, Braze, Airship) builds segments based on two sources: user attributes (tags, properties) and behavioral data (events, sessions, purchases).
The client's job is one — correctly transmit data:
// Android — after each significant action
OneSignal.User.addTag("subscription_tier", "premium")
OneSignal.User.addTag("last_active_days", "0")
OneSignal.User.addTag("preferred_category", "electronics")
// When location changes (with user permission)
OneSignal.User.addTag("region", "UA-30") // ISO 3166-2
// iOS — same thing
OneSignal.User.addTag("onboarding_completed", "true")
OneSignal.User.addTag("cart_items_count", "\(cart.items.count)")
Tags are strings. All comparison happens server-side. Important: don't send a tag on every app launch — that's unnecessary traffic. Send only when the value changes.
Behavioral Segments and Triggers
The most common case — triggered send on event: user abandoned cart, hasn't opened app in 7 days, completed onboarding but didn't take first action.
This requires server-side logic. The mobile client only records events:
// Firebase Analytics — events automatically available in Audience Builder
FirebaseAnalytics.getInstance(context).logEvent("checkout_started") {
param("cart_value", 1250.0)
param("items_count", 3L)
}
In Firebase Audiences you can build a segment: "users who triggered checkout_started but not purchase_complete in the last 24 hours" — and send them a notification through FCM directly or through Firebase In-App Messaging.
If using Braze — segments there are built through Canvas with conditional branches. Client integration through Braze SDK:
// iOS
Appboy.sharedInstance()?.logCustomEvent("item_viewed", withProperties: [
"item_id": "SKU-4892",
"category": "shoes"
])
Geo-Segmentation
Geo-segmentation in push — not "located in Kyiv right now", but "user region from profile" or geofences.
OneSignal supports automatic location detection with setLocationShared(true). But Apple and Google are stricter about background geolocation. More reliable — pass region from user profile as a tag.
For real geofences (notification on zone entry) — CoreLocation on iOS with CLLocationManager.startMonitoring(for:) or Geofencing API on Android through GeofencingClient. This works through local notifications or silent push to update data.
Device and Platform Segments
// Send only to iOS users with app version >= 3.0
{
"filters": [
{ "field": "device_type", "relation": "=", "value": "iOS" },
{ "operator": "AND" },
{ "field": "app_version", "relation": ">=", "value": "3.0" }
]
}
This is useful when releasing a feature available only in the new version — don't send a deep link to a screen that doesn't exist in the old app.
Common Segmentation Setup Mistakes
Tags are written inconsistently: some developers write "true"/"false", others "1"/"0", still others just add or delete the tag. As a result, the segment "users with tag notifications_enabled = true" doesn't capture those who just have the tag without a value.
Better to fix the tag schema in a separate enum:
object UserTags {
const val SUBSCRIPTION = "subscription_tier"
const val REGION = "region_iso"
const val LAST_ORDER_DAYS = "last_order_days_ago"
fun updateLastOrderDays(daysSince: Int) {
OneSignal.User.addTag(LAST_ORDER_DAYS, daysSince.toString())
}
}
Timeframe
Designing tag schema and behavioral events, implementing SDK integration on iOS + Android (or Flutter), setting up automatic segments on platform — 5–8 working days. Complex trigger chains with server logic (e.g., Braze Canvas or custom cron worker) — from 2 weeks.







