Skip to end of metadata
Go to start of metadata

Declared in:
MedialetsAnalyticsManager.h


Properties

currentLocation

@property(nonatomic, retain) CLLocation *currentLocation

The most recently retrieved user location.

Discussion:

The value of this property is nil if no location data has ever been retrieved. If desired, you can start event tracking without location
tracking and supply your own location data.

See Also;

- initialize 
- initializeWithAppID 



Method Summary

NSString * internetConnectionStatus
          Returns the most recently retrieved connection status.
static MedialetsAnalyticsManager sharedInstance
          Returns an instance of MedialetsAnalyticsManager.
void initialize:(BOOL) useLocation
          This is the preferred method to start the MedialetsAnalyticsManager tracking events for the application.
void initializeWithAppID:appVersion:locationManager:useLocation:
          This method will start the MedialetsAnalyticsManager tracking events for the application with the specified appID and appVersion and optionally with location services enabled.
void trackEvent:
          Stores an event locally to post to the server at a later time. Accepts either an NSString value as an event key, or an MMEvent object.
void trackEvent:withUserDict:
          Creates an event with a given name and user information and stores it to post to the server at a later time.
voide observeNotifications:fromObject:
          Adds entries to the NSNotificationCenter's dispatch table with the MedialetsAnalyticsManager as an observer for the supplied names and sender.
void observeNotification:fromObject:
          Adds an entry to the NSNotificationCenter's dispatch table with the MedialetsAnalyticsManager as an observer for the supplied name and sender.
void stopObservingNotifications:fromObject:
          Removes the matching entries from the NSNotificationCenter and stops tracking these notifications.
void stopObservingNotification:fromObject:
          Removes the matching entry from the NSNotificationCenter and stops tracking this notification.
MedialetsServerEnvironment activeServerEnvironment
          Returns the server environment to which events will be sent.


Method Detail

internetConnectionStatus

- (NSString *)internetConnectionStatus

Returns the most recently retrieved connection status.

Returns:
A string code indicating the "reach-ability" of the Medialets Muse™ tracking servers. Possible values are:

  • "NotConnected" Medialets Muse™ server is not reachable or no connection check has been made yet
  • "CDNConnected" Server is reachable via the Carrier Data Network (EDGE or 3G)
  • "WiFiConnected" Server is reachable via a WiFi connection
  • "InvalidNetworkStatus" An error occurred querying the network status

sharedInstance

+ (MedialetsAnalyticsManager *)sharedInstance

Returns an MedialetsAnalyticsManager instance
Discussion:

The MedialetsAnalyticsManager instance is created by the first call to sharedInstance.


initialize

- (void)initialize:(BOOL)useLocation

This method will start the MedialetsAnalyticsManager tracking events for the application with location services either disabled or enabled .

Parameters:

useLocation - If YES, tracking is started with location services enabled and the tracking system attempts to obtain the user's location and record it with all tracked events. If NO then tracking is started without location checking.

Discussion:

This method should be called on MedialetsAnalyticsManager's shared instance in the application delegate's +initialize method. 


initializeWithAppID:appVersion:locationManager:useLocation:

- (void)initializeWithAppID:(NSString *)anAppID appVersion:(NSString *)version locationManager: (CLLocationManager *)locManager useLocation:(BOOL)locationAccessEnabled

This method will start the MMAnalyticsManager tracking events for the application with the specified appID and optionally with location services enabled.

Parameters:

appID - The unique application identifier string generated by Medialets Muse™ for your application. This appID will override any value set in the application project's Info.plist file. Must not be nil.

appVersion - The current version of the application. This appVersion value will override any value set in the application project's Info.plist. Must not be nil. 

locationManager - if the app is already using an instance of the CLLocationManager, set the parameter to that instance, otherwise set to nil.  

useLocation - If YES, tracking is started with location services enabled and the tracking system attempts to obtain the user's location and record it with all tracked events. If NO, tracking is started without location checking.

Discussion:

This method should be called on MedialetsAnalyticsManager's shared instance in the application delegate's +initialize method. While configuration of the application's appID is done in the Info.plist file by default, some developers wish to set all such information in code.


trackEvent

- (void)trackEvent:(id)event

Stores an event locally to post to the server at a later time. Accepts either an NSString value as an event key, or an MMEvent object.

Parameters:

event - (an NSString value) The name of the event. The event key can be any string. The Medialets Muse™ application will create a unique set of metrics for each unique key you use.

[[MedialetsAnalyticsManager sharedInstance] trackEvent:@"Level1PlayBegan"];

event - (an MedialetsEvent value) An MedialetsEvent instance. Create an MedialetsEvent, use the MedialetsEvent methods to add your data, then pass the event to this routine to save the event.

MedialetsEvent *myEvent = [[MMEvent alloc] initWithKey:@"Level2PlayBegan"];
                                    [myEvent setString:@"Dungeon" forKey:@"Level1EndPoint"];
                                  [myEvent setDuration:self.duration forKey:@"Level1Time"];
[[MedialetsAnalyticsManager sharedInstance] trackEvent:myEvent]; [myEvent release];

See Also:
- trackEvent:withUserDict:


trackEvent:withUserDict:

- (void)trackEvent:(NSString *)eventKey withUserDict:(NSDictionary *)userDict

Creates an event with a given name and user information and stores it to post to the server at a later time.

Parameters:

eventKey - The name of the event. The event key can be any string. The Medialets Muse™ application will create a unique set of metrics for each unique key you use. Must not be nil.

userDict - Information about the event. May be nil.

See Also:
- trackEvent:


observeNotifications:fromObject:

- (void)observeNotifications:(NSArray *)names fromObject:(id) notificationSender

Adds entries to the NSNotificationCenter's dispatch table with the MedialetsAnalyticsManager as an observer for the supplied names and sender.

Parameters:

names - An array of notification names to observe and track as events. The name of each notification will be used as the eventKey for the tracked event. If names is nil or an empty array, all notifications from notificationSender will be tracked.

notificationSender - The object whose notifications should be tracked. When nil, all notifications with the listed names are tracked regardless of the sender.

See Also:
- stopObservingNotifications:fromObject:


observeNotification:fromObject:

- (void)observeNotification:(NSString *)notificationName fromObject:(id)notificationSender

Adds an entry to the NSNotificationCenter's dispatch table with the MedialetsAnalyticsManager as an observer for the supplied name and sender.

Parameters:

name - A notification name to observe and track as an event. The name of the notification will be used as the eventKey for the tracked event. If name is nil, all notifications from notificationSender will be tracked.

notificationSender - The object whose notifications should be tracked. When nil, all notifications with the listed name is tracked regardless of the sender.

See Also:
- stopObservingNotification:fromObject:


stopObservingNotifications:fromObject:

- (void)stopObservingNotifications:(NSArray *)names fromObject:(id)notificationSender

Removes the matching entries from the NSNotificationCenter and stops tracking these notifications.

Parameters:

names - An array of notification names to stop observing and tracking. If names is nil or an empty array, all notifications from notificationSender will stop being tracked.

notificationSender - The object whose named notifications should stop being tracked. When nil, all notifications with the listed names are removed from observation regardless of the sender.

Discussion:
Be sure to invoke this method (or stopObservingNotification:fromObject:) before notificationSender is deallocated.


stopObservingNotification:fromObject:

- (void)stopObservingNotification:(NSString *)notificationName fromObject:(id)notificationSender

Removes the matching entry from the NSNotificationCenter and stops tracking this notification.

Parameters:

name - A notification name to stop observing and tracking. If name is nil, all notifications from notificationSender will stop being tracked.
notificationSender - The object whose named notifications should stop being tracked. When nil, all notifications with the listed name are removed from observation regardless of the sender.



activeServerEnvironment

@property (nonatomic, readonly) MedialetsServerEnvironment activeServerEnvironment;

Returns the active server environment to which the SDK will send events.



Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.