User Segmentation


User Variables

To identify users, set values based on the Ad Rules dashboard configuration in your app, these values can be set/modified/removed at any time (even before initialisation) and will be used when attempting to load any ad type.

Supported data types: NSString, NSInteger, BOOL

Set User Data

Pass in a key (String) and the value to use.

[ setUserDataBool:YES forKey:@"paying_user"];
[ setUserDataString:@"A" forKey:@"group"];
[ setUserDataInteger:21 forKey:@"age"];

Remove User Data

Pass in the key, the key/value will be removed if it exists.

[ removeUserDataForKey:@"group"];

Get User Data

Data can be fetched by key or returned in a map with key(NSString), value(id). When fetching by key the return value will be an object, check its type before use. There are also methods to get values of the specific type.

TDProperties *properties =;
id object = [properties userDataObjectForKey:@"group"];
NSString *group = [properties userDataStringForKey:@"group"];
NSInteger age = [properties userDataIntegerForKey:@"age"];
BOOL isPayingUser = [properties userDataBooleanForKey:@"paying_user"];
NSDictionary *userData = properties.userData;

Note: If integer or boolean user data is fetched using -userDataObjectForKey: the value will be returned as NSNumber.

Need help?

If you are having any problems integrating, feel free to contact us on [email protected] and we will be more than happy to help.