INSAnalytics Class Reference
| Inherits from | NSObject |
|---|---|
| Conforms to | INSSDKModule |
| Declared in | INSAnalytics.h |
Overview
INSAnalytics class is conform to INSSDKModule protocol and provides an interface to Insiteo analytics backend.
Tracking methods will return immediately and cache the event to be handled “eventually.” That is, the request will be sent according to your configuration if possible or the next time a network connection is available.
Custom Events
+ trackCustomEvent:metadata:debug:error:
Tracks the occurrence of a custom event with additional metadata.
+ (BOOL)trackCustomEvent:(NSString *)name metadata:(NSDictionary<NSString*,NSString*> *)metadata debug:(BOOL)isDebug error:(NSError **)errorParameters
name |
The event name. |
|---|---|
metadata |
Related event metadata. Keys and values should be NSStrings, will throw otherwise. |
isDebug |
Boolean used to tag the custom event as debug. |
error |
Pointer to a |
Return Value
YES is the event creation succeed, NO otherwise.
Discussion
To track a specific event consider the following example:
NSError error; NSDictionary metadata = @{ @“mydata1”: @“data1”, @“mydata2”: @“data2”, @“mydata3”: @“data3” }; [INSAnalytics trackCustomEvent:@“myevent” metadata:metadata debug:NO error:&error];
Declared In
INSAnalytics.h
Debug Mode
+ setDebugMode:
Enables or disables Analytics debug mode.
+ (void)setDebugMode:(BOOL)enableParameters
enable |
Passing |
|---|
Declared In
INSAnalytics.h