GAITracker.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*!
  2. @header GAITracker.h
  3. @abstract Google Analytics iOS SDK Tracker Header
  4. @copyright Copyright 2013 Google Inc. All rights reserved.
  5. */
  6. #import <Foundation/Foundation.h>
  7. /*!
  8. Google Analytics tracking interface. Obtain instances of this interface from
  9. [GAI trackerWithTrackingId:] to track screens, events, transactions, timing,
  10. and exceptions. The implementation of this interface is thread-safe, and no
  11. calls are expected to block or take a long time. All network and disk activity
  12. will take place in the background.
  13. */
  14. @protocol GAITracker<NSObject>
  15. /*!
  16. Name of this tracker.
  17. */
  18. @property(nonatomic, readonly) NSString *name;
  19. /*!
  20. Allow collection of IDFA and related fields if set to true. Default is false.
  21. */
  22. @property(nonatomic) BOOL allowIDFACollection;
  23. /*!
  24. Set a tracking parameter.
  25. @param parameterName The parameter name.
  26. @param value The value to set for the parameter. If this is nil, the
  27. value for the parameter will be cleared.
  28. */
  29. - (void)set:(NSString *)parameterName
  30. value:(NSString *)value;
  31. /*!
  32. Get a tracking parameter.
  33. @param parameterName The parameter name.
  34. @returns The parameter value, or nil if no value for the given parameter is
  35. set.
  36. */
  37. - (NSString *)get:(NSString *)parameterName;
  38. /*!
  39. Queue tracking information with the given parameter values.
  40. @param parameters A map from parameter names to parameter values which will be
  41. set just for this piece of tracking information, or nil for none.
  42. */
  43. - (void)send:(NSDictionary *)parameters;
  44. @end