Inherits from UAEvent : NSObject
Declared in UACustomEvent.h

Overview

A UACustomEvent captures information regarding a custom event for UAAnalytics.

Properties

eventName

The event’s name. The name’s length must not exceed 255 characters or it will invalidate the event.

@property (nonatomic, copy) NSString *eventName

Declared In

UACustomEvent.h

eventValue

The event’s value. The value must be between -231 and 231 - 1 or it will invalidate the event.

@property (nonatomic, strong, nullable) NSDecimalNumber *eventValue

Declared In

UACustomEvent.h

interactionID

The event’s interaction ID. The ID’s length must not exceed 255 characters or it will invalidate the event.

@property (nonatomic, copy, nullable) NSString *interactionID

Declared In

UACustomEvent.h

interactionType

The event’s interaction type. The type’s length must not exceed 255 characters or it will invalidate the event.

@property (nonatomic, copy, nullable) NSString *interactionType

Declared In

UACustomEvent.h

transactionID

The event’s interaction ID. The ID’s length must not exceed 255 characters or it will invalidate the event.

@property (nonatomic, copy, nullable) NSString *transactionID

Declared In

UACustomEvent.h

Class Methods

eventWithName:

Factory method for creating a custom event.

+ (instancetype)eventWithName:(NSString *)eventName

Parameters

eventName

The name of the event. The event’s name must not exceed 255 characters or it will invalidate the event.

Declared In

UACustomEvent.h

eventWithName:value:

Factory method for creating a custom event with a value.

+ (instancetype)eventWithName:(NSString *)eventName value:(nullable NSNumber *)eventValue

Parameters

eventName

The name of the event. The event’s name must not exceed 255 characters or it will invalidate the event.

eventValue

The value of the event. The value must be between -231 and 231 - 1 or it will invalidate the event.

Declared In

UACustomEvent.h

eventWithName:valueFromString:

Factory method for creating a custom event with a value from a string.

+ (instancetype)eventWithName:(NSString *)eventName valueFromString:(nullable NSString *)eventValue

Parameters

eventName

The name of the event. The event’s name must not exceed 255 characters or it will invalidate the event.

eventValue

The value of the event as a string. The value must be a valid number between -231 and 231 - 1 or it will invalidate the event.

Declared In

UACustomEvent.h

Instance Methods

setBoolProperty:forKey:

Sets a custom BOOL property.

- (void)setBoolProperty:(BOOL)value forKey:(NSString *)key

Parameters

value

The property value.

key

The property key.

Declared In

UACustomEvent.h

setInteractionFromMessage:

Sets the custom event’s interaction type and ID from a UAInboxMessage.

- (void)setInteractionFromMessage:(UAInboxMessage *)message

Parameters

message

The UAInboxMessage to set the custom event’s interaction type and ID from.

Declared In

UACustomEvent.h

setNumberProperty:forKey:

Sets a custom Number property.

- (void)setNumberProperty:(NSNumber *)value forKey:(NSString *)key

Parameters

value

The property value.

key

The property key.

Declared In

UACustomEvent.h

setStringArrayProperty:forKey:

Sets a custom String array property. The array must not exceed 20 entries and each entry’s length must not exceed 255 characters or it will invalidate the event.

- (void)setStringArrayProperty:(NSArray<NSString*> *)value forKey:(NSString *)key

Parameters

value

The property value.

key

The property key.

Declared In

UACustomEvent.h

setStringProperty:forKey:

Sets a custom String property. The value’s length must not exceed 255 characters or it will invalidate the event.

- (void)setStringProperty:(NSString *)value forKey:(NSString *)key

Parameters

value

The property value.

key

The property key.

Declared In

UACustomEvent.h