GAIFields.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*!
  2. @header GAIFields.h
  3. @abstract Google Analytics iOS SDK Hit Format Header
  4. @copyright Copyright 2013 Google Inc. All rights reserved.
  5. */
  6. #import <Foundation/Foundation.h>
  7. /*!
  8. These fields can be used for the wire format parameter names required by
  9. the |GAITracker| get, set and send methods as well as the set methods in the
  10. |GAIDictionaryBuilder| class.
  11. */
  12. extern NSString *const kGAIUseSecure;
  13. extern NSString *const kGAIHitType;
  14. extern NSString *const kGAITrackingId;
  15. extern NSString *const kGAIClientId;
  16. extern NSString *const kGAIDataSource;
  17. extern NSString *const kGAIAnonymizeIp;
  18. extern NSString *const kGAISessionControl;
  19. extern NSString *const kGAIDeviceModelVersion;
  20. extern NSString *const kGAIScreenResolution;
  21. extern NSString *const kGAIViewportSize;
  22. extern NSString *const kGAIEncoding;
  23. extern NSString *const kGAIScreenColors;
  24. extern NSString *const kGAILanguage;
  25. extern NSString *const kGAIJavaEnabled;
  26. extern NSString *const kGAIFlashVersion;
  27. extern NSString *const kGAINonInteraction;
  28. extern NSString *const kGAIReferrer;
  29. extern NSString *const kGAILocation;
  30. extern NSString *const kGAIHostname;
  31. extern NSString *const kGAIPage;
  32. extern NSString *const kGAIDescription; // synonym for kGAIScreenName
  33. extern NSString *const kGAIScreenName; // synonym for kGAIDescription
  34. extern NSString *const kGAITitle;
  35. extern NSString *const kGAIAdMobHitId;
  36. extern NSString *const kGAIAppName;
  37. extern NSString *const kGAIAppVersion;
  38. extern NSString *const kGAIAppId;
  39. extern NSString *const kGAIAppInstallerId;
  40. extern NSString *const kGAIUserId;
  41. extern NSString *const kGAIEventCategory;
  42. extern NSString *const kGAIEventAction;
  43. extern NSString *const kGAIEventLabel;
  44. extern NSString *const kGAIEventValue;
  45. extern NSString *const kGAISocialNetwork;
  46. extern NSString *const kGAISocialAction;
  47. extern NSString *const kGAISocialTarget;
  48. extern NSString *const kGAITransactionId;
  49. extern NSString *const kGAITransactionAffiliation;
  50. extern NSString *const kGAITransactionRevenue;
  51. extern NSString *const kGAITransactionShipping;
  52. extern NSString *const kGAITransactionTax;
  53. extern NSString *const kGAICurrencyCode;
  54. extern NSString *const kGAIItemPrice;
  55. extern NSString *const kGAIItemQuantity;
  56. extern NSString *const kGAIItemSku;
  57. extern NSString *const kGAIItemName;
  58. extern NSString *const kGAIItemCategory;
  59. extern NSString *const kGAICampaignSource;
  60. extern NSString *const kGAICampaignMedium;
  61. extern NSString *const kGAICampaignName;
  62. extern NSString *const kGAICampaignKeyword;
  63. extern NSString *const kGAICampaignContent;
  64. extern NSString *const kGAICampaignId;
  65. extern NSString *const kGAICampaignAdNetworkClickId;
  66. extern NSString *const kGAICampaignAdNetworkId;
  67. extern NSString *const kGAITimingCategory;
  68. extern NSString *const kGAITimingVar;
  69. extern NSString *const kGAITimingValue;
  70. extern NSString *const kGAITimingLabel;
  71. extern NSString *const kGAIExDescription;
  72. extern NSString *const kGAIExFatal;
  73. extern NSString *const kGAISampleRate;
  74. extern NSString *const kGAIIdfa;
  75. extern NSString *const kGAIAdTargetingEnabled;
  76. // hit types
  77. extern NSString *const kGAIAppView DEPRECATED_MSG_ATTRIBUTE("Use kGAIScreenView instead.");
  78. extern NSString *const kGAIScreenView;
  79. extern NSString *const kGAIEvent;
  80. extern NSString *const kGAISocial;
  81. extern NSString *const kGAITransaction;
  82. extern NSString *const kGAIItem;
  83. extern NSString *const kGAIException;
  84. extern NSString *const kGAITiming;
  85. /*!
  86. This class provides several fields and methods useful as wire format parameter
  87. names. The methods are used for wire format parameter names that are indexed.
  88. */
  89. @interface GAIFields : NSObject
  90. /*!
  91. Generates the correct parameter name for a content group with an index.
  92. @param index the index of the content group.
  93. @return an NSString representing the content group parameter for the index.
  94. */
  95. + (NSString *)contentGroupForIndex:(NSUInteger)index;
  96. /*!
  97. Generates the correct parameter name for a custon dimension with an index.
  98. @param index the index of the custom dimension.
  99. @return an NSString representing the custom dimension parameter for the index.
  100. */
  101. + (NSString *)customDimensionForIndex:(NSUInteger)index;
  102. /*!
  103. Generates the correct parameter name for a custom metric with an index.
  104. @param index the index of the custom metric.
  105. @return an NSString representing the custom metric parameter for the index.
  106. */
  107. + (NSString *)customMetricForIndex:(NSUInteger)index;
  108. @end