You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

507 lines
17 KiB

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