FIRParameterNames.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. /// @file FIRParameterNames.h
  2. ///
  3. /// Predefined event parameter names.
  4. ///
  5. /// Params supply information that contextualize Events. You can associate up to 25 unique Params
  6. /// with each Event type. Some Params are suggested below for certain common Events, but you are
  7. /// not limited to these. You may supply extra Params for suggested Events or custom Params for
  8. /// Custom events. Param names can be up to 40 characters long, may only contain alphanumeric
  9. /// characters and underscores ("_"), and must start with an alphabetic character. Param values can
  10. /// be up to 100 characters long. The "firebase_" prefix is reserved and should not be used.
  11. /// Game achievement ID (NSString).
  12. /// <pre>
  13. /// NSDictionary *params = @{
  14. /// kFIRParameterAchievementID : @"10_matches_won",
  15. /// // ...
  16. /// };
  17. /// </pre>
  18. static NSString *const kFIRParameterAchievementID = @"achievement_id";
  19. /// Ad Network Click ID (NSString). Used for network-specific click IDs which vary in format.
  20. /// <pre>
  21. /// NSDictionary *params = @{
  22. /// kFIRParameterAdNetworkClickID : @"1234567",
  23. /// // ...
  24. /// };
  25. /// </pre>
  26. static NSString *const kFIRParameterAdNetworkClickID = @"aclid";
  27. /// The individual campaign name, slogan, promo code, etc. Some networks have pre-defined macro to
  28. /// capture campaign information, otherwise can be populated by developer. Highly Recommended
  29. /// (NSString).
  30. /// <pre>
  31. /// NSDictionary *params = @{
  32. /// kFIRParameterCampaign : @"winter_promotion",
  33. /// // ...
  34. /// };
  35. /// </pre>
  36. static NSString *const kFIRParameterCampaign = @"campaign";
  37. /// Character used in game (NSString).
  38. /// <pre>
  39. /// NSDictionary *params = @{
  40. /// kFIRParameterCharacter : @"beat_boss",
  41. /// // ...
  42. /// };
  43. /// </pre>
  44. static NSString *const kFIRParameterCharacter = @"character";
  45. /// Campaign content (NSString).
  46. static NSString *const kFIRParameterContent = @"content";
  47. /// Type of content selected (NSString).
  48. /// <pre>
  49. /// NSDictionary *params = @{
  50. /// kFIRParameterContentType : @"news article",
  51. /// // ...
  52. /// };
  53. /// </pre>
  54. static NSString *const kFIRParameterContentType = @"content_type";
  55. /// Coupon code for a purchasable item (NSString).
  56. /// <pre>
  57. /// NSDictionary *params = @{
  58. /// kFIRParameterCoupon : @"zz123",
  59. /// // ...
  60. /// };
  61. /// </pre>
  62. static NSString *const kFIRParameterCoupon = @"coupon";
  63. /// Campaign custom parameter (NSString). Used as a method of capturing custom data in a campaign.
  64. /// Use varies by network.
  65. /// <pre>
  66. /// NSDictionary *params = @{
  67. /// kFIRParameterCP1 : @"custom_data",
  68. /// // ...
  69. /// };
  70. /// </pre>
  71. static NSString *const kFIRParameterCP1 = @"cp1";
  72. /// Purchase currency in 3-letter <a href="http://en.wikipedia.org/wiki/ISO_4217#Active_codes">
  73. /// ISO_4217</a> format (NSString).
  74. /// <pre>
  75. /// NSDictionary *params = @{
  76. /// kFIRParameterCurrency : @"USD",
  77. /// // ...
  78. /// };
  79. /// </pre>
  80. static NSString *const kFIRParameterCurrency = @"currency";
  81. /// Flight or Travel destination (NSString).
  82. /// <pre>
  83. /// NSDictionary *params = @{
  84. /// kFIRParameterDestination : @"Mountain View, CA",
  85. /// // ...
  86. /// };
  87. /// </pre>
  88. static NSString *const kFIRParameterDestination = @"destination";
  89. /// The arrival date, check-out date or rental end date for the item. This should be in
  90. /// YYYY-MM-DD format (NSString).
  91. /// <pre>
  92. /// NSDictionary *params = @{
  93. /// kFIRParameterEndDate : @"2015-09-14",
  94. /// // ...
  95. /// };
  96. /// </pre>
  97. static NSString *const kFIRParameterEndDate = @"end_date";
  98. /// Flight number for travel events (NSString).
  99. /// <pre>
  100. /// NSDictionary *params = @{
  101. /// kFIRParameterFlightNumber : @"ZZ800",
  102. /// // ...
  103. /// };
  104. /// </pre>
  105. static NSString *const kFIRParameterFlightNumber = @"flight_number";
  106. /// Group/clan/guild ID (NSString).
  107. /// <pre>
  108. /// NSDictionary *params = @{
  109. /// kFIRParameterGroupID : @"g1",
  110. /// // ...
  111. /// };
  112. /// </pre>
  113. static NSString *const kFIRParameterGroupID = @"group_id";
  114. /// Item category (NSString).
  115. /// <pre>
  116. /// NSDictionary *params = @{
  117. /// kFIRParameterItemCategory : @"t-shirts",
  118. /// // ...
  119. /// };
  120. /// </pre>
  121. static NSString *const kFIRParameterItemCategory = @"item_category";
  122. /// Item ID (NSString).
  123. /// <pre>
  124. /// NSDictionary *params = @{
  125. /// kFIRParameterItemID : @"p7654",
  126. /// // ...
  127. /// };
  128. /// </pre>
  129. static NSString *const kFIRParameterItemID = @"item_id";
  130. /// The Google <a href="https://developers.google.com/places/place-id">Place ID</a> (NSString) that
  131. /// corresponds to the associated item. Alternatively, you can supply your own custom Location ID.
  132. /// <pre>
  133. /// NSDictionary *params = @{
  134. /// kFIRParameterItemLocationID : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
  135. /// // ...
  136. /// };
  137. /// </pre>
  138. static NSString *const kFIRParameterItemLocationID = @"item_location_id";
  139. /// Item name (NSString).
  140. /// <pre>
  141. /// NSDictionary *params = @{
  142. /// kFIRParameterItemName : @"abc",
  143. /// // ...
  144. /// };
  145. /// </pre>
  146. static NSString *const kFIRParameterItemName = @"item_name";
  147. /// Level in game (signed 64-bit integer as NSNumber).
  148. /// <pre>
  149. /// NSDictionary *params = @{
  150. /// kFIRParameterLevel : @(42),
  151. /// // ...
  152. /// };
  153. /// </pre>
  154. static NSString *const kFIRParameterLevel = @"level";
  155. /// Location (NSString). The Google <a href="https://developers.google.com/places/place-id">Place ID
  156. /// </a> that corresponds to the associated event. Alternatively, you can supply your own custom
  157. /// Location ID.
  158. /// <pre>
  159. /// NSDictionary *params = @{
  160. /// kFIRParameterLocation : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
  161. /// // ...
  162. /// };
  163. /// </pre>
  164. static NSString *const kFIRParameterLocation = @"location";
  165. /// The advertising or marketing medium, for example: cpc, banner, email, push. Highly recommended
  166. /// (NSString).
  167. /// <pre>
  168. /// NSDictionary *params = @{
  169. /// kFIRParameterMedium : @"email",
  170. /// // ...
  171. /// };
  172. /// </pre>
  173. static NSString *const kFIRParameterMedium = @"medium";
  174. /// Number of nights staying at hotel (signed 64-bit integer as NSNumber).
  175. /// <pre>
  176. /// NSDictionary *params = @{
  177. /// kFIRParameterNumberOfNights : @(3),
  178. /// // ...
  179. /// };
  180. /// </pre>
  181. static NSString *const kFIRParameterNumberOfNights = @"number_of_nights";
  182. /// Number of passengers traveling (signed 64-bit integer as NSNumber).
  183. /// <pre>
  184. /// NSDictionary *params = @{
  185. /// kFIRParameterNumberOfPassengers : @(11),
  186. /// // ...
  187. /// };
  188. /// </pre>
  189. static NSString *const kFIRParameterNumberOfPassengers = @"number_of_passengers";
  190. /// Number of rooms for travel events (signed 64-bit integer as NSNumber).
  191. /// <pre>
  192. /// NSDictionary *params = @{
  193. /// kFIRParameterNumberOfRooms : @(2),
  194. /// // ...
  195. /// };
  196. /// </pre>
  197. static NSString *const kFIRParameterNumberOfRooms = @"number_of_rooms";
  198. /// Flight or Travel origin (NSString).
  199. /// <pre>
  200. /// NSDictionary *params = @{
  201. /// kFIRParameterOrigin : @"Mountain View, CA",
  202. /// // ...
  203. /// };
  204. /// </pre>
  205. static NSString *const kFIRParameterOrigin = @"origin";
  206. /// Purchase price (double as NSNumber).
  207. /// <pre>
  208. /// NSDictionary *params = @{
  209. /// kFIRParameterPrice : @(1.0),
  210. /// kFIRParameterCurrency : @"USD", // e.g. $1.00 USD
  211. /// // ...
  212. /// };
  213. /// </pre>
  214. static NSString *const kFIRParameterPrice = @"price";
  215. /// Purchase quantity (signed 64-bit integer as NSNumber).
  216. /// <pre>
  217. /// NSDictionary *params = @{
  218. /// kFIRParameterQuantity : @(1),
  219. /// // ...
  220. /// };
  221. /// </pre>
  222. static NSString *const kFIRParameterQuantity = @"quantity";
  223. /// Score in game (signed 64-bit integer as NSNumber).
  224. /// <pre>
  225. /// NSDictionary *params = @{
  226. /// kFIRParameterScore : @(4200),
  227. /// // ...
  228. /// };
  229. /// </pre>
  230. static NSString *const kFIRParameterScore = @"score";
  231. /// The search string/keywords used (NSString).
  232. /// <pre>
  233. /// NSDictionary *params = @{
  234. /// kFIRParameterSearchTerm : @"periodic table",
  235. /// // ...
  236. /// };
  237. /// </pre>
  238. static NSString *const kFIRParameterSearchTerm = @"search_term";
  239. /// Shipping cost (double as NSNumber).
  240. /// <pre>
  241. /// NSDictionary *params = @{
  242. /// kFIRParameterShipping : @(9.50),
  243. /// kFIRParameterCurrency : @"USD", // e.g. $9.50 USD
  244. /// // ...
  245. /// };
  246. /// </pre>
  247. static NSString *const kFIRParameterShipping = @"shipping";
  248. /// Sign up method (NSString).
  249. /// <pre>
  250. /// NSDictionary *params = @{
  251. /// kFIRParameterSignUpMethod : @"google",
  252. /// // ...
  253. /// };
  254. /// </pre>
  255. static NSString *const kFIRParameterSignUpMethod = @"sign_up_method";
  256. /// The origin of your traffic, such as an Ad network (for example, google) or partner (urban
  257. /// airship). Identify the advertiser, site, publication, etc. that is sending traffic to your
  258. /// property. Highly recommended (NSString).
  259. /// <pre>
  260. /// NSDictionary *params = @{
  261. /// kFIRParameterSource : @"InMobi",
  262. /// // ...
  263. /// };
  264. /// </pre>
  265. static NSString *const kFIRParameterSource = @"source";
  266. /// The departure date, check-in date or rental start date for the item. This should be in
  267. /// YYYY-MM-DD format (NSString).
  268. /// <pre>
  269. /// NSDictionary *params = @{
  270. /// kFIRParameterStartDate : @"2015-09-14",
  271. /// // ...
  272. /// };
  273. /// </pre>
  274. static NSString *const kFIRParameterStartDate = @"start_date";
  275. /// Tax amount (double as NSNumber).
  276. /// <pre>
  277. /// NSDictionary *params = @{
  278. /// kFIRParameterTax : @(1.0),
  279. /// kFIRParameterCurrency : @"USD", // e.g. $1.00 USD
  280. /// // ...
  281. /// };
  282. /// </pre>
  283. static NSString *const kFIRParameterTax = @"tax";
  284. /// If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword
  285. /// (NSString).
  286. /// <pre>
  287. /// NSDictionary *params = @{
  288. /// kFIRParameterTerm : @"game",
  289. /// // ...
  290. /// };
  291. /// </pre>
  292. static NSString *const kFIRParameterTerm = @"term";
  293. /// A single ID for a ecommerce group transaction (NSString).
  294. /// <pre>
  295. /// NSDictionary *params = @{
  296. /// kFIRParameterTransactionID : @"ab7236dd9823",
  297. /// // ...
  298. /// };
  299. /// </pre>
  300. static NSString *const kFIRParameterTransactionID = @"transaction_id";
  301. /// Travel class (NSString).
  302. /// <pre>
  303. /// NSDictionary *params = @{
  304. /// kFIRParameterTravelClass : @"business",
  305. /// // ...
  306. /// };
  307. /// </pre>
  308. static NSString *const kFIRParameterTravelClass = @"travel_class";
  309. /// A context-specific numeric value which is accumulated automatically for each event type. This is
  310. /// a general purpose parameter that is useful for accumulating a key metric that pertains to an
  311. /// event. Examples include revenue, distance, time and points. Value should be specified as signed
  312. /// 64-bit integer or double as NSNumber. Notes: Values for pre-defined currency-related events
  313. /// (such as @c kFIREventAddToCart) should be supplied using double as NSNumber and must be
  314. /// accompanied by a @c kFIRParameterCurrency parameter. The valid range of accumulated values is
  315. /// [-9,223,372,036,854.77, 9,223,372,036,854.77].
  316. /// <pre>
  317. /// NSDictionary *params = @{
  318. /// kFIRParameterValue : @(3.99),
  319. /// kFIRParameterCurrency : @"USD", // e.g. $3.99 USD
  320. /// // ...
  321. /// };
  322. /// </pre>
  323. static NSString *const kFIRParameterValue = @"value";
  324. /// Name of virtual currency type (NSString).
  325. /// <pre>
  326. /// NSDictionary *params = @{
  327. /// kFIRParameterVirtualCurrencyName : @"virtual_currency_name",
  328. /// // ...
  329. /// };
  330. /// </pre>
  331. static NSString *const kFIRParameterVirtualCurrencyName = @"virtual_currency_name";