Carl Mangold

Flash & iPhone coding & concepting
  • Home
  • Bright.app
  • Commentaar
  • iPhone
  • Nieuws
  • Obj-C tips
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?

GANTracker.h
  1. //=== Initialiseer Google Analytics in je AppDelegate:
  2.  
  3. #import "GANTracker.h"
  4.  
  5. - (void)applicationDidFinishLaunching:(UIApplication *)application
  6. {
  7. //--- Google Analytics
  8.  
  9. [[GANTracker sharedTracker] startTrackerWithAccountID:@"UA-12345678-1"
  10. dispatchPeriod:10
  11. delegate:nil];
  12. ...
  13. }
  14.  
  15. //=== En track de pageviews in je ViewControllers:
  16.  
  17. - (void)viewDidAppear:(BOOL)animated
  18. {
  19. //--- Google Analytics
  20.  
  21. NSError *error;
  22. [[GANTracker sharedTracker] trackPageview:@"NaamVanPagina" withError:&error];
  23.  
  24. ...
  25. }

Meer info: Google Analytics voor iPhone apps

Tags: iPhone, obj-c tip

This entry was posted on woensdag, oktober 21st, 2009 at 13:56 by Carl Mangold and is filed under Obj-C tips, iPhone. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Klik hier om het antwoord te annuleren.

« Tip: UINavigationBar met achtergrondafbeelding
The Internet is not designed for the iPhone »
  • RSS

    • Alle berichten
    • Alle reacties
  • Archieven

  • Kalender

    • oktober 2009
      M D W D V Z Z
      « Sep   Nov »
       1234
      567891011
      12131415161718
      19202122232425
      2627282930  
  • CategoriĆ«n

    • Bright.app (4)
    • Commentaar (43)
    • iPhone (22)
    • Nieuws (2)
    • Obj-C tips (4)