User identifier
User identifier can be specified by calling:
class func setUserIdentifier(_ userIdentifier: String?)
+ (void)setUserIdentifier:(nullable NSString*)userIdentifier;
Identifiers can be found in the Dashboard and are very useful for finding specific user’s recordings.
User properties
Additional custom properties can be added to each recording session by calling:
class func setSessionProperty(value: String, forName name: String)
+ (void)setSessionPropertyValue:(nonnull NSString *)value forName:(nonnull NSString *)name;
These properties can be seen in the Dashboard at Visitor details.
If session property should be protected against accidental further changes it can be set as immutable. Immutable property value cannot be changed once it is set.
static var immutable: SLPropertyOption
class func setSessionProperty(value: String, forName name: String, options: SLPropertyOption)
typedef NS_OPTIONS(NSUInteger, SLPropertyOption) {
SLPropertyOptionDefaults = 0,
SLPropertyOptionImmutable = 1 << 0
};
+ (void)setSessionPropertyValue:(nonnull NSString *)value forName:(nonnull NSString *)name withOptions:(SLPropertyOption)options;
Smartlook.setSessionProperty(value: "immutable-value", forName: "my-property", options: .immutable)
[Smartlook setSessionPropertyValue:@"immutable-value" forName:@"my-property" withOptions:SLPropertyOptionImmutable];