Domanda

I am making a game and would like to have a statistics page from my users. Is there a way for me to track their total amount of time that they have spent in my app?

È stato utile?

Soluzione

Use Flurry Analytics: http://www.flurry.com/

Getting Started: http://support.flurry.com/index.php?title=Analytics/GettingStarted/TechnicalQuickStart

Integration is very simple, just do this:

#import "Flurry.h"
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[Flurry startSession:@"YOUR_API_KEY"];
//your code
}

To log event:

[Flurry logEvent:@"EVENT_NAME"];

Altri suggerimenti

as radesix writes you need a metrics framework. In the company I work for we use Google Analytics. It gives a pretty good overview and is very easy to use:

To start it up

// Optional: automatically send uncaught exceptions to Google Analytics.
[GAI sharedInstance].trackUncaughtExceptions = YES;
// Optional: set Google Analytics dispatch interval to e.g. 20 seconds.
[GAI sharedInstance].dispatchInterval = 20;
// Optional: set debug to YES for extra debugging information.
[GAI sharedInstance].debug = YES;
// Create tracker instance.
[[GAI sharedInstance] trackerWithTrackingId:@"YOUR TRACKING ID"];

To track an event:

id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
 [tracker sendEventWithCategory:@"TITLE" withAction:@"paused" withLabel:@"success" withValue:[NSNumber numberWithInt:5]];

Read more at http://www.google.com/analytics/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top