FIRParameterNames.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  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 store or affiliation from which this transaction occurred (NSString).
  28. /// <pre>
  29. /// NSDictionary *params = @{
  30. /// kFIRParameterAffiliation : @"Google Store",
  31. /// // ...
  32. /// };
  33. /// </pre>
  34. static NSString *const kFIRParameterAffiliation = @"affiliation";
  35. /// The individual campaign name, slogan, promo code, etc. Some networks have pre-defined macro to
  36. /// capture campaign information, otherwise can be populated by developer. Highly Recommended
  37. /// (NSString).
  38. /// <pre>
  39. /// NSDictionary *params = @{
  40. /// kFIRParameterCampaign : @"winter_promotion",
  41. /// // ...
  42. /// };
  43. /// </pre>
  44. static NSString *const kFIRParameterCampaign = @"campaign";
  45. /// Character used in game (NSString).
  46. /// <pre>
  47. /// NSDictionary *params = @{
  48. /// kFIRParameterCharacter : @"beat_boss",
  49. /// // ...
  50. /// };
  51. /// </pre>
  52. static NSString *const kFIRParameterCharacter = @"character";
  53. /// The checkout step (1..N) (unsigned 64-bit integer as NSNumber).
  54. /// <pre>
  55. /// NSDictionary *params = @{
  56. /// kFIRParameterCheckoutStep : @"1",
  57. /// // ...
  58. /// };
  59. /// </pre>
  60. static NSString *const kFIRParameterCheckoutStep = @"checkout_step";
  61. /// Some option on a step in an ecommerce flow (NSString).
  62. /// <pre>
  63. /// NSDictionary *params = @{
  64. /// kFIRParameterCheckoutOption : @"Visa",
  65. /// // ...
  66. /// };
  67. /// </pre>
  68. static NSString *const kFIRParameterCheckoutOption = @"checkout_option";
  69. /// Campaign content (NSString).
  70. static NSString *const kFIRParameterContent = @"content";
  71. /// Type of content selected (NSString).
  72. /// <pre>
  73. /// NSDictionary *params = @{
  74. /// kFIRParameterContentType : @"news article",
  75. /// // ...
  76. /// };
  77. /// </pre>
  78. static NSString *const kFIRParameterContentType = @"content_type";
  79. /// Coupon code for a purchasable item (NSString).
  80. /// <pre>
  81. /// NSDictionary *params = @{
  82. /// kFIRParameterCoupon : @"zz123",
  83. /// // ...
  84. /// };
  85. /// </pre>
  86. static NSString *const kFIRParameterCoupon = @"coupon";
  87. /// Campaign custom parameter (NSString). Used as a method of capturing custom data in a campaign.
  88. /// Use varies by network.
  89. /// <pre>
  90. /// NSDictionary *params = @{
  91. /// kFIRParameterCP1 : @"custom_data",
  92. /// // ...
  93. /// };
  94. /// </pre>
  95. static NSString *const kFIRParameterCP1 = @"cp1";
  96. /// The name of a creative used in a promotional spot (NSString).
  97. /// <pre>
  98. /// NSDictionary *params = @{
  99. /// kFIRParameterCreativeName : @"Summer Sale",
  100. /// // ...
  101. /// };
  102. /// </pre>
  103. static NSString *const kFIRParameterCreativeName = @"creative_name";
  104. /// The name of a creative slot (NSString).
  105. /// <pre>
  106. /// NSDictionary *params = @{
  107. /// kFIRParameterCreativeSlot : @"summer_banner2",
  108. /// // ...
  109. /// };
  110. /// </pre>
  111. static NSString *const kFIRParameterCreativeSlot = @"creative_slot";
  112. /// Purchase currency in 3-letter <a href="http://en.wikipedia.org/wiki/ISO_4217#Active_codes">
  113. /// ISO_4217</a> format (NSString).
  114. /// <pre>
  115. /// NSDictionary *params = @{
  116. /// kFIRParameterCurrency : @"USD",
  117. /// // ...
  118. /// };
  119. /// </pre>
  120. static NSString *const kFIRParameterCurrency = @"currency";
  121. /// Flight or Travel destination (NSString).
  122. /// <pre>
  123. /// NSDictionary *params = @{
  124. /// kFIRParameterDestination : @"Mountain View, CA",
  125. /// // ...
  126. /// };
  127. /// </pre>
  128. static NSString *const kFIRParameterDestination = @"destination";
  129. /// The arrival date, check-out date or rental end date for the item. This should be in
  130. /// YYYY-MM-DD format (NSString).
  131. /// <pre>
  132. /// NSDictionary *params = @{
  133. /// kFIRParameterEndDate : @"2015-09-14",
  134. /// // ...
  135. /// };
  136. /// </pre>
  137. static NSString *const kFIRParameterEndDate = @"end_date";
  138. /// Flight number for travel events (NSString).
  139. /// <pre>
  140. /// NSDictionary *params = @{
  141. /// kFIRParameterFlightNumber : @"ZZ800",
  142. /// // ...
  143. /// };
  144. /// </pre>
  145. static NSString *const kFIRParameterFlightNumber = @"flight_number";
  146. /// Group/clan/guild ID (NSString).
  147. /// <pre>
  148. /// NSDictionary *params = @{
  149. /// kFIRParameterGroupID : @"g1",
  150. /// // ...
  151. /// };
  152. /// </pre>
  153. static NSString *const kFIRParameterGroupID = @"group_id";
  154. /// Item brand (NSString).
  155. /// <pre>
  156. /// NSDictionary *params = @{
  157. /// kFIRParameterItemBrand : @"Google",
  158. /// // ...
  159. /// };
  160. /// </pre>
  161. static NSString *const kFIRParameterItemBrand = @"item_brand";
  162. /// Item category (NSString).
  163. /// <pre>
  164. /// NSDictionary *params = @{
  165. /// kFIRParameterItemCategory : @"t-shirts",
  166. /// // ...
  167. /// };
  168. /// </pre>
  169. static NSString *const kFIRParameterItemCategory = @"item_category";
  170. /// Item ID (NSString).
  171. /// <pre>
  172. /// NSDictionary *params = @{
  173. /// kFIRParameterItemID : @"p7654",
  174. /// // ...
  175. /// };
  176. /// </pre>
  177. static NSString *const kFIRParameterItemID = @"item_id";
  178. /// The Google <a href="https://developers.google.com/places/place-id">Place ID</a> (NSString) that
  179. /// corresponds to the associated item. Alternatively, you can supply your own custom Location ID.
  180. /// <pre>
  181. /// NSDictionary *params = @{
  182. /// kFIRParameterItemLocationID : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
  183. /// // ...
  184. /// };
  185. /// </pre>
  186. static NSString *const kFIRParameterItemLocationID = @"item_location_id";
  187. /// Item name (NSString).
  188. /// <pre>
  189. /// NSDictionary *params = @{
  190. /// kFIRParameterItemName : @"abc",
  191. /// // ...
  192. /// };
  193. /// </pre>
  194. static NSString *const kFIRParameterItemName = @"item_name";
  195. /// The list in which the item was presented to the user (NSString).
  196. /// <pre>
  197. /// NSDictionary *params = @{
  198. /// kFIRParameterItemList : @"Search Results",
  199. /// // ...
  200. /// };
  201. /// </pre>
  202. static NSString *const kFIRParameterItemList = @"item_list";
  203. /// Item variant (NSString).
  204. /// <pre>
  205. /// NSDictionary *params = @{
  206. /// kFIRParameterItemVariant : @"Red",
  207. /// // ...
  208. /// };
  209. /// </pre>
  210. static NSString *const kFIRParameterItemVariant = @"item_variant";
  211. /// Level in game (signed 64-bit integer as NSNumber).
  212. /// <pre>
  213. /// NSDictionary *params = @{
  214. /// kFIRParameterLevel : @(42),
  215. /// // ...
  216. /// };
  217. /// </pre>
  218. static NSString *const kFIRParameterLevel = @"level";
  219. /// Location (NSString). The Google <a href="https://developers.google.com/places/place-id">Place ID
  220. /// </a> that corresponds to the associated event. Alternatively, you can supply your own custom
  221. /// Location ID.
  222. /// <pre>
  223. /// NSDictionary *params = @{
  224. /// kFIRParameterLocation : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
  225. /// // ...
  226. /// };
  227. /// </pre>
  228. static NSString *const kFIRParameterLocation = @"location";
  229. /// The advertising or marketing medium, for example: cpc, banner, email, push. Highly recommended
  230. /// (NSString).
  231. /// <pre>
  232. /// NSDictionary *params = @{
  233. /// kFIRParameterMedium : @"email",
  234. /// // ...
  235. /// };
  236. /// </pre>
  237. static NSString *const kFIRParameterMedium = @"medium";
  238. /// Number of nights staying at hotel (signed 64-bit integer as NSNumber).
  239. /// <pre>
  240. /// NSDictionary *params = @{
  241. /// kFIRParameterNumberOfNights : @(3),
  242. /// // ...
  243. /// };
  244. /// </pre>
  245. static NSString *const kFIRParameterNumberOfNights = @"number_of_nights";
  246. /// Number of passengers traveling (signed 64-bit integer as NSNumber).
  247. /// <pre>
  248. /// NSDictionary *params = @{
  249. /// kFIRParameterNumberOfPassengers : @(11),
  250. /// // ...
  251. /// };
  252. /// </pre>
  253. static NSString *const kFIRParameterNumberOfPassengers = @"number_of_passengers";
  254. /// Number of rooms for travel events (signed 64-bit integer as NSNumber).
  255. /// <pre>
  256. /// NSDictionary *params = @{
  257. /// kFIRParameterNumberOfRooms : @(2),
  258. /// // ...
  259. /// };
  260. /// </pre>
  261. static NSString *const kFIRParameterNumberOfRooms = @"number_of_rooms";
  262. /// Flight or Travel origin (NSString).
  263. /// <pre>
  264. /// NSDictionary *params = @{
  265. /// kFIRParameterOrigin : @"Mountain View, CA",
  266. /// // ...
  267. /// };
  268. /// </pre>
  269. static NSString *const kFIRParameterOrigin = @"origin";
  270. /// Purchase price (double as NSNumber).
  271. /// <pre>
  272. /// NSDictionary *params = @{
  273. /// kFIRParameterPrice : @(1.0),
  274. /// kFIRParameterCurrency : @"USD", // e.g. $1.00 USD
  275. /// // ...
  276. /// };
  277. /// </pre>
  278. static NSString *const kFIRParameterPrice = @"price";
  279. /// Purchase quantity (signed 64-bit integer as NSNumber).
  280. /// <pre>
  281. /// NSDictionary *params = @{
  282. /// kFIRParameterQuantity : @(1),
  283. /// // ...
  284. /// };
  285. /// </pre>
  286. static NSString *const kFIRParameterQuantity = @"quantity";
  287. /// Score in game (signed 64-bit integer as NSNumber).
  288. /// <pre>
  289. /// NSDictionary *params = @{
  290. /// kFIRParameterScore : @(4200),
  291. /// // ...
  292. /// };
  293. /// </pre>
  294. static NSString *const kFIRParameterScore = @"score";
  295. /// The search string/keywords used (NSString).
  296. /// <pre>
  297. /// NSDictionary *params = @{
  298. /// kFIRParameterSearchTerm : @"periodic table",
  299. /// // ...
  300. /// };
  301. /// </pre>
  302. static NSString *const kFIRParameterSearchTerm = @"search_term";
  303. /// Shipping cost (double as NSNumber).
  304. /// <pre>
  305. /// NSDictionary *params = @{
  306. /// kFIRParameterShipping : @(9.50),
  307. /// kFIRParameterCurrency : @"USD", // e.g. $9.50 USD
  308. /// // ...
  309. /// };
  310. /// </pre>
  311. static NSString *const kFIRParameterShipping = @"shipping";
  312. /// Sign up method (NSString).
  313. /// <pre>
  314. /// NSDictionary *params = @{
  315. /// kFIRParameterSignUpMethod : @"google",
  316. /// // ...
  317. /// };
  318. /// </pre>
  319. static NSString *const kFIRParameterSignUpMethod = @"sign_up_method";
  320. /// The origin of your traffic, such as an Ad network (for example, google) or partner (urban
  321. /// airship). Identify the advertiser, site, publication, etc. that is sending traffic to your
  322. /// property. Highly recommended (NSString).
  323. /// <pre>
  324. /// NSDictionary *params = @{
  325. /// kFIRParameterSource : @"InMobi",
  326. /// // ...
  327. /// };
  328. /// </pre>
  329. static NSString *const kFIRParameterSource = @"source";
  330. /// The departure date, check-in date or rental start date for the item. This should be in
  331. /// YYYY-MM-DD format (NSString).
  332. /// <pre>
  333. /// NSDictionary *params = @{
  334. /// kFIRParameterStartDate : @"2015-09-14",
  335. /// // ...
  336. /// };
  337. /// </pre>
  338. static NSString *const kFIRParameterStartDate = @"start_date";
  339. /// Tax amount (double as NSNumber).
  340. /// <pre>
  341. /// NSDictionary *params = @{
  342. /// kFIRParameterTax : @(1.0),
  343. /// kFIRParameterCurrency : @"USD", // e.g. $1.00 USD
  344. /// // ...
  345. /// };
  346. /// </pre>
  347. static NSString *const kFIRParameterTax = @"tax";
  348. /// If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword
  349. /// (NSString).
  350. /// <pre>
  351. /// NSDictionary *params = @{
  352. /// kFIRParameterTerm : @"game",
  353. /// // ...
  354. /// };
  355. /// </pre>
  356. static NSString *const kFIRParameterTerm = @"term";
  357. /// A single ID for a ecommerce group transaction (NSString).
  358. /// <pre>
  359. /// NSDictionary *params = @{
  360. /// kFIRParameterTransactionID : @"ab7236dd9823",
  361. /// // ...
  362. /// };
  363. /// </pre>
  364. static NSString *const kFIRParameterTransactionID = @"transaction_id";
  365. /// Travel class (NSString).
  366. /// <pre>
  367. /// NSDictionary *params = @{
  368. /// kFIRParameterTravelClass : @"business",
  369. /// // ...
  370. /// };
  371. /// </pre>
  372. static NSString *const kFIRParameterTravelClass = @"travel_class";
  373. /// A context-specific numeric value which is accumulated automatically for each event type. This is
  374. /// a general purpose parameter that is useful for accumulating a key metric that pertains to an
  375. /// event. Examples include revenue, distance, time and points. Value should be specified as signed
  376. /// 64-bit integer or double as NSNumber. Notes: Values for pre-defined currency-related events
  377. /// (such as @c kFIREventAddToCart) should be supplied using double as NSNumber and must be
  378. /// accompanied by a @c kFIRParameterCurrency parameter. The valid range of accumulated values is
  379. /// [-9,223,372,036,854.77, 9,223,372,036,854.77].
  380. /// <pre>
  381. /// NSDictionary *params = @{
  382. /// kFIRParameterValue : @(3.99),
  383. /// kFIRParameterCurrency : @"USD", // e.g. $3.99 USD
  384. /// // ...
  385. /// };
  386. /// </pre>
  387. static NSString *const kFIRParameterValue = @"value";
  388. /// Name of virtual currency type (NSString).
  389. /// <pre>
  390. /// NSDictionary *params = @{
  391. /// kFIRParameterVirtualCurrencyName : @"virtual_currency_name",
  392. /// // ...
  393. /// };
  394. /// </pre>
  395. static NSString *const kFIRParameterVirtualCurrencyName = @"virtual_currency_name";