21
Okt
2009
Tip: Google Analytics in je iPhone app
Je kent ongetwijfeld Google Analytics voor websites. Maar wist je ook dat je precies diezelfde analytics tegenwoordig ook bijzonder eenvoudig in je iPhone apps kunt integreren?
- //=== Initialiseer Google Analytics in je AppDelegate:
-
- #import "GANTracker.h"
-
- - (void)applicationDidFinishLaunching:(UIApplication *)application
- {
- //--- Google Analytics
-
- [[GANTracker sharedTracker] startTrackerWithAccountID:@"UA-12345678-1"
- dispatchPeriod:10
- delegate:nil];
- ...
- }
-
- //=== En track de pageviews in je ViewControllers:
-
- - (void)viewDidAppear:(BOOL)animated
- {
- //--- Google Analytics
-
- NSError *error;
- [[GANTracker sharedTracker] trackPageview:@"NaamVanPagina" withError:&error];
-
- ...
- }
Meer info: Google Analytics voor iPhone apps