PWAnalytics Class Reference
Inherits from | NSObject |
Declared in | PWAnalytics.h |
Overview
PWAnalytics
enables easy implementation of application workflow analytics. MaaSAnalytics supports standard analytics events, timed events and event parameters.
Tasks
Event Methods
-
+ addEvent:
-
+ addEvent:eventNamespace:
-
+ addEvent:withParameters:
-
+ addEvent:withParameters:eventNamespace:
-
+ startTimedEvent:
-
+ startTimedEvent:eventNamespace:
-
+ startTimedEvent:withParameters:
-
+ startTimedEvent:withParameters:eventNamespace:
-
+ pauseTimedEvent:
-
+ resumeTimedEvent:
-
+ endTimedEvent:
-
+ endTimedEvent:withParameters:
-
+ endTimedEvent:withParameters:eventNamespace:
Other Methods
Class Methods
addEvent:
Add an event to the analytics queue.
+ (void)addEvent:(NSString *__nonnull)eventName
Parameters
- eventName
Name of the event.
Declared In
PWAnalytics.h
addEvent:eventNamespace:
Add an event to the analytics queue.
+ (void)addEvent:(NSString *__nonnull)eventName eventNamespace:(NSString *__nonnull)eventNamespace
Parameters
- eventName
Name of the event.
- eventNamespace
The namespace of the analytic event. Used for custom event processing.
Declared In
PWAnalytics.h
addEvent:withParameters:
Add an event to the analytics queue. Parameters must follow these rules:
(1) Keys and values must be NSString
objects.
(2) There may be no more than 10 parameters. Extra parameters will be ignored.
(3) Each key or value that is longer than 256 characters will be truncated.
+ (void)addEvent:(NSString *__nonnull)eventName withParameters:(NSDictionary *__nullable)parameters
Parameters
- eventName
Name of the event.
- parameters
NSString
key / value parameters. For example,@{@"key" : @"value"}
.
Declared In
PWAnalytics.h
addEvent:withParameters:eventNamespace:
Add an event to the analytics queue. Parameters must follow these rules:
(1) Keys and values must be NSString
objects.
(2) There may be no more than 10 parameters. Extra parameters will be ignored.
(3) Each key or value that is longer than 256 characters will be truncated.
+ (void)addEvent:(NSString *__nonnull)eventName withParameters:(NSDictionary *__nullable)parameters eventNamespace:(NSString *__nullable)eventNamespace
Parameters
- eventName
Name of the event.
- parameters
NSString
key / value parameters. For example,@{@"key" : @"value"}
.
- eventNamespace
The namespace of the analytic event. Used for custom event processing.
Declared In
PWAnalytics.h
endTimedEvent:
End a timed event with the specified eventName
. The event will be ignored if the event duration is less than one second. This method will do nothing if the event name cannot be found.
+ (void)endTimedEvent:(NSString *__nonnull)eventName
Parameters
- eventName
The name of the event to end.
Declared In
PWAnalytics.h
endTimedEvent:withParameters:
End a timed event with the specified eventName
. The event will be ignored if the event duration is less than one second. This method will do nothing if the event name cannot be found. Parameters must follow these rules:
(1) Keys and values must be NSString
objects.
(2) There may be no more than 10 parameters. Extra parameters will be ignored.
(3) Each key or value that is longer than 256 characters will be truncated.
+ (void)endTimedEvent:(NSString *__nonnull)eventName withParameters:(NSDictionary *__nullable)parameters
Parameters
- eventName
The name of the event to end.
- parameters
NSString
key / value parameters. For example,@{@"key" : @"value"}
.
Declared In
PWAnalytics.h
endTimedEvent:withParameters:eventNamespace:
End a timed event with the specified eventName
. The event will be ignored if the event duration is less than one second. This method will do nothing if the event name cannot be found. Parameters must follow these rules:
(1) Keys and values must be NSString
objects.
(2) There may be no more than 10 parameters. Extra parameters will be ignored.
(3) Each key or value that is longer than 256 characters will be truncated.
+ (void)endTimedEvent:(NSString *__nonnull)eventName withParameters:(NSDictionary *__nullable)parameters eventNamespace:(NSString *__nullable)eventNamespace
Parameters
- eventName
The name of the event to end.
- parameters
NSString
key / value parameters. For example,@{@"key" : @"value"}
.
- eventNamespace
The namespace of the analytic event. Used for custom event processing.
Declared In
PWAnalytics.h
pauseTimedEvent:
Pause a timed event with the specified eventName
. If an event is ended while still in a paused state, then the paused time will be used as the end time. If an event is already paused, this method will do nothing.
+ (void)pauseTimedEvent:(NSString *__nonnull)eventName
Parameters
- eventName
The name of the event to pause.
Declared In
PWAnalytics.h
resumeTimedEvent:
Resume a timed event with the specified eventName
. If an event is ended while still in a paused state, then the paused time will be used as the end time. If an event is already paused, this method will do nothing.
+ (void)resumeTimedEvent:(NSString *__nonnull)eventName
Parameters
- eventName
The name of the event to resume.
Declared In
PWAnalytics.h
startTimedEvent:
Start a timed event. Calling startTimedEvent:
with the same eventName
prior to endTimedEvent:
will overwrite the previous start time.
+ (void)startTimedEvent:(NSString *__nonnull)eventName
Parameters
- eventName
Name of the event to start.
Declared In
PWAnalytics.h
startTimedEvent:eventNamespace:
Start a timed event. Calling startTimedEvent:
with the same eventName
prior to endTimedEvent:
will overwrite the previous start time.
+ (void)startTimedEvent:(NSString *__nonnull)eventName eventNamespace:(NSString *__nullable)eventNamespace
Parameters
- eventName
Name of the event to start.
- eventNamespace
The namespace of the analytic event. Used for custom event processing.
Declared In
PWAnalytics.h
startTimedEvent:withParameters:
Start a timed event with the specified parameters. Calling startTimedEvent:
with the same eventName
prior to endTimedEvent:
will overwrite the previous start time. Parameters must follow these rules:
(1) Keys and values must be NSString
objects.
(2) There may be no more than 10 parameters. Extra parameters will be ignored.
(3) Each key or value that is longer than 256 characters will be truncated.
+ (void)startTimedEvent:(NSString *__nonnull)eventName withParameters:(NSDictionary *__nullable)parameters
Parameters
- eventName
Name of the event to start.
- parameters
NSString
key / value parameters. For example,@{@"key" : @"value"}
.
Declared In
PWAnalytics.h
startTimedEvent:withParameters:eventNamespace:
Start a timed event with the specified parameters. Calling startTimedEvent:
with the same eventName
prior to endTimedEvent:
will overwrite the previous start time. Parameters must follow these rules:
(1) Keys and values must be NSString
objects.
(2) There may be no more than 10 parameters. Extra parameters will be ignored.
(3) Each key or value that is longer than 256 characters will be truncated.
+ (void)startTimedEvent:(NSString *__nonnull)eventName withParameters:(NSDictionary *__nullable)parameters eventNamespace:(NSString *__nullable)eventNamespace
Parameters
- eventName
Name of the event to start.
- parameters
NSString
key / value parameters. For example,@{@"key" : @"value"}
.
- eventNamespace
The namespace of the analytic event. Used for custom event processing.
Declared In
PWAnalytics.h