MPEvent Class Reference

Inherits from MPBaseEvent : NSObject
Declared in MPEvent.h

Overview

This class represents an event to be logged using the mParticle SDK.

  category

Setting the category of an MPEvent adds a custom attribute using $Category as the key. Several integrations, such as Google Analytics, will use this key to perform data mapping. Other integrations will receive the attribute as $Category. Please reference the mParticle doc site for more information.

@property (nonatomic, strong, nullable) NSString *category

Discussion

Setting the category of an MPEvent adds a custom attribute using $Category as the key. Several integrations, such as Google Analytics, will use this key to perform data mapping. Other integrations will receive the attribute as $Category. Please reference the mParticle doc site for more information.

Declared In

MPEvent.h

  )

A dictionary containing further information about the event. The number of entries is limited to 100 key value pairs. Keys must be strings (up to 255 characters) and values can be strings (up to 4096 characters), numbers, booleans, or dates (Deprecated: use customAttributes instead)

@property (nonatomic, strong, nullable) NSDictionary<NSString*id> *DEPRECATED_MSG_ATTRIBUTE ( "use customAttributes instead" )

Discussion

A dictionary containing further information about the event. The number of entries is limited to 100 key value pairs. Keys must be strings (up to 255 characters) and values can be strings (up to 4096 characters), numbers, booleans, or dates

Declared In

MPEvent.h

  name

The name of the event to be logged (required not nil). The event name must not contain more than 255 characters.

@property (nonatomic, strong, nonnull) NSString *name

Discussion

The name of the event to be logged (required not nil). The event name must not contain more than 255 characters.

Declared In

MPEvent.h

  startTime

If using the beginTiming/endTiming methods, this property contains the time the event started. Otherwise it is nil.

@property (nonatomic, strong, nullable) NSDate *startTime

Discussion

If using the beginTiming/endTiming methods, this property contains the time the event started. Otherwise it is nil.

Declared In

MPEvent.h

  endTime

If using the beginTiming/endTiming methods, this property contains the time the event ended. Otherwise it is nil.

@property (nonatomic, strong, nullable) NSDate *endTime

Discussion

If using the beginTiming/endTiming methods, this property contains the time the event ended. Otherwise it is nil.

Declared In

MPEvent.h

– initWithName:type:

Initializes an instance of MPEvent

- (nullable instancetype)initWithName:(nonnull NSString *)name type:(MPEventType)type

Parameters

name

The name of the event to be logged (required not nil). The event name must not contain more than 255 characters.

type

An enum value that indicates the type of event to be logged.

Return Value

An instance of MPEvent or nil, if it could not be initialized.

Discussion

Initializes an instance of MPEvent

Declared In

MPEvent.h

  duration

The duration, in milliseconds, of an event. You can set this property directly, use the beginTiming/endTiming methods to calculate it automatically, or you can calll beginTimedEvent/endTimedEvent from the Mparticle sharedinstance to calculate it automatically.

@property (nonatomic, strong, nullable) NSNumber *duration

Discussion

The duration, in milliseconds, of an event. You can set this property directly, use the beginTiming/endTiming methods to calculate it automatically, or you can calll beginTimedEvent/endTimedEvent from the Mparticle sharedinstance to calculate it automatically.

Declared In

MPEvent.h

– beginTiming

Start timer for a timed event.

- (void)beginTiming

Discussion

Start timer for a timed event.

Declared In

MPEvent.h

– endTiming

Stop timer for a timed event

- (void)endTiming

Discussion

Stop timer for a timed event

Declared In

MPEvent.h

– breadcrumbDictionaryRepresentation

A Dictionary representation of this instance for uploading a breadcrumb event

- (nullable NSDictionary *)breadcrumbDictionaryRepresentation

Discussion

A Dictionary representation of this instance for uploading a breadcrumb event

Declared In

MPEvent.h

– screenDictionaryRepresentation

A Dictionary representation of this instance for uploadinga screen event

- (nullable NSDictionary *)screenDictionaryRepresentation

Discussion

A Dictionary representation of this instance for uploadinga screen event

Declared In

MPEvent.h