GAITrackedViewController.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /*!
  2. @header GAITrackedViewController.h
  3. @abstract Google Analytics for iOS Tracked View Controller Header
  4. @copyright Copyright 2012 Google Inc. All rights reserved.
  5. */
  6. #import <Foundation/Foundation.h>
  7. #import <UIKit/UIKit.h>
  8. @protocol GAITracker;
  9. /*!
  10. Extends UIViewController to generate Google Analytics screenview calls
  11. whenever the view appears; this is done by overriding the `viewDidAppear:`
  12. method. The screen name must be set for any tracking calls to be made.
  13. By default, this will use [GAI defaultTracker] for tracking calls, but one can
  14. override this by setting the tracker property.
  15. */
  16. @interface GAITrackedViewController : UIViewController
  17. /*!
  18. The tracker on which view tracking calls are be made, or `nil`, in which case
  19. [GAI defaultTracker] will be used.
  20. */
  21. @property(nonatomic, assign) id<GAITracker> tracker;
  22. /*!
  23. The screen name, for purposes of Google Analytics tracking. If this is `nil`,
  24. no tracking calls will be made.
  25. */
  26. @property(nonatomic, copy) NSString *screenName;
  27. @end