Segmentation Tags
Segmentation tags are custom strings you provide to group users/devices for targeted Bubbl campaigns.
They are attached to device registration and used by campaign targeting logic.
Behavior
- Stored as the current tag set for the device.
- Can be updated at any time by sending a new list.
- Empty list removes all active segmentation tags for that device.
- Applied to subsequent targeting decisions after sync.
When to Set Them
Set initial tags during SDK boot (where supported) when you already know user attributes.
Update tags whenever user state changes (for example plan tier, onboarding status, or feature cohort).
Code Snippets
Android
BubblSdk.updateSegments(listOf("vip", "early_access")) { success ->
if (success) {
// UI success state
} else {
// UI error state
}
}
iOS
BubblPlugin.shared.updateSegments(segmentations: ["vip", "beta"]) { result in
switch result {
case .success(let ok):
print("segments updated", ok)
case .failure(let error):
print("segment update failed", error)
}
}
React Native
import { BubblBridge } from '@bubbl-tech/react-native-sdk';
async function pushSegments() {
const ok = await BubblBridge.updateSegments(['vip', 'early_access']);
if (!ok) {
throw new Error('Segment update failed');
}
}
Flutter
import 'package:bubbl_flutter_sdk/bubbl_flutter_sdk.dart';
final BubblFlutterSdk sdk = BubblFlutterSdk.instance;
await sdk.updateSegments(<String>['vip', 'early_access']);
Platform Methods
- Android: see
android-sdk/method-reference.md(BubblSdk.updateSegments(segmentations: List<String>, callback)) - iOS: see
ios-sdk/method-reference.md(updateSegments(segmentations:completion:)) - React Native: see
react-native-sdk/method-reference.md(updateSegments(segmentations: string[])) - Flutter: see
flutter-sdk/method-reference.md(updateSegments(tags): Future<bool>)