With the release of the iOS SDK 2.4 and Android SDK 2.2 we have also released the capability to target a specific subgroup of your app users.
The system is very flexible and can be used for multiple use cases. Here is a list of examples:
From a data privacy perspective, we designed the feature in a way so that data is only stored on the client. We are providing a new API in the SDKs the enable customers to set any String key values
which filters the campaigns for the current app user.
Here an example which can be used in your application:
public class MyApplication extends MultiDexApplication {
public SensorbergSdk sensorbergSDK;
@Override
public void onCreate() {
//initialize your SDK properly
Map<String, String> attributes = new HashMap<>();
if (userMananger.userloggedIn) {
attributes.put("user_LoggedIn", "true");
attributes.put("user_hometown", userMananger.getHomeTown());
}
attributes.put("score", "above1000");
SensorbergSDK.setAttributes(attributes);
}
}
And on iOS:
NSDictionary *attributes = @{ @"userLoggedIn":@YES,
@"userHomeTown":@"Berlin"};
[[SBManager sharedManager] setTargetAttributes:attributes];
To clear the attributes pass a nil
: [[SBManager sharedManager] setTargetAttributes:nil]
ou are responsible for keeping the attributes in sync. If the user logs out, make sure to clear the attributes and send them to the SDK again. If you donĀ“t clear the attributes, they remain unchanged in the SDK. This feature is only available on the new portal Your account must be on portal.sensorberg.com if you want to use this feature. A full release of the management UI on this feature is scheduled for January 2017.You should already have your app ready to use this feature, so start integrating today!