| java.lang.Object | |
| ↳ | com.google.firebase.analytics.FirebaseAnalytics.Param |
Params supply information that contextualize Events. You can associate up to 25 unique Params with each Event type. Some Params are suggested below for certain common Events, but you are not limited to these. You may supply extra Params for suggested Events or custom Params for Custom events. Param names can be up to 24 characters long, may only contain alphanumeric characters and underscores ("_"), and must start with an alphabetic character. Param values can be up to 36 characters long. The "firebase_" prefix is reserved and should not be used.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | ACHIEVEMENT_ID | Game achievement ID (String). | |||||||||
| String | CHARACTER | Character used in game (String). | |||||||||
| String | CONTENT_TYPE | Type of content selected (String). | |||||||||
| String | COUPON | Coupon code for a purchasable item (String). | |||||||||
| String | CURRENCY | Purchase currency in 3 letter ISO_4217 format (String). | |||||||||
| String | DESTINATION | Flight or Travel destination (String). | |||||||||
| String | END_DATE | The arrival date, check-out date, or rental end date for the item (String). | |||||||||
| String | FLIGHT_NUMBER | Flight number for travel events (String). | |||||||||
| String | GROUP_ID | Group/clan/guild id (String). | |||||||||
| String | ITEM_CATEGORY | Item category (String). | |||||||||
| String | ITEM_ID | Item ID (String). | |||||||||
| String | ITEM_LOCATION_ID | The Google Place ID that corresponds to the associated item (String). | |||||||||
| String | ITEM_NAME | Item name (String). | |||||||||
| String | LEVEL | Level in game (long). | |||||||||
| String | LOCATION | Location (String). | |||||||||
| String | NUMBER_OF_NIGHTS | Number of nights staying at hotel (long). | |||||||||
| String | NUMBER_OF_PASSENGERS | Number of passengers traveling (long). | |||||||||
| String | NUMBER_OF_ROOMS | Number of rooms for travel events (long). | |||||||||
| String | ORIGIN | Flight or Travel origin (String). | |||||||||
| String | PRICE | Purchase price (double). | |||||||||
| String | PRODUCT_CATEGORY | Product category (String). | |||||||||
| String | PRODUCT_ID | Purchase product ID (String). | |||||||||
| String | PRODUCT_NAME | Purchase item name (String). | |||||||||
| String | QUANTITY | Purchase quantity (long). | |||||||||
| String | SCORE | Score in game (long). | |||||||||
| String | SEARCH_TERM | The search string/keywords used (String). | |||||||||
| String | SHIPPING | Shipping cost (double). | |||||||||
| String | SIGN_UP_METHOD | Signup method (String). | |||||||||
| String | START_DATE | The departure date, check-in date, or rental start date for the item (String). | |||||||||
| String | TAX | Tax amount (double). | |||||||||
| String | TRANSACTION_ID | A single ID for a ecommerce group transaction (String). | |||||||||
| String | TRAVEL_CLASS | Travel class (String). | |||||||||
| String | VALUE | A context-specific numeric value which is accumulated automatically for each event type. | |||||||||
| String | VIRTUAL_CURRENCY_NAME | Name of virtual currency type (String). | |||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Game achievement ID (String). The parameter expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.ACHIEVEMENT_ID, "10_matches_won");
Character used in game (String). The parameter expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.CHARACTER, "beat_boss");
Type of content selected (String). The parameter expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.CONTENT_TYPE, "news article");
Coupon code for a purchasable item (String). The parameter expects a string value set
with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.COUPON, "zz123");
Purchase currency in 3 letter
ISO_4217 format
(String). The parameter expects a string value set with
putString(String, String):
Bundle params = new Bundle();
params.putString(Param.CURRENCY, "USD");
Flight or Travel destination (String). The parameter expects a string
value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.DESTINATION, "Mountain View, CA");
The arrival date, check-out date, or rental end date for the item (String). The parameter
expects a date formatted as YYYY-MM-DD and set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.END_DATE, "2015-09-14");
Flight number for travel events (String). The parameter expects a string value set with
putString(String, String):
Bundle params = new Bundle();
params.putString(Param.FLIGHT_NUMBER, "ZZ800");
Group/clan/guild id (String). The parameter expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.GROUP_ID, "g1");
Item category (String). The parameter expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.ITEM_CATEGORY, "t-shirts");
Item ID (String). The parameter expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.ITEM_ID, "p7654");
The Google Place ID that
corresponds to the associated item (String). Alternatively, you can supply your own
custom Location ID. The parameter expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.ITEM_LOCATION_ID, "ChIJiyj437sx3YAR9kUWC8QkLzQ");
Item name (String). The parameter expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.ITEM_NAME, "abc");
Level in game (long). The parameter expects a long value set with putLong(String, long):
Bundle params = new Bundle();
params.putLong(Param.LEVEL, 42);
Location (String). The Google
Place ID that corresponds to
the associated event. Alternatively, you can supply your own custom Location ID. The
parameter expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.LOCATION, "Mountain View, CA");
Number of nights staying at hotel (long). The parameter expects a long value set with
putLong(String, long):
Bundle params = new Bundle();
params.putLong(Param.NUMBER_OF_NIGHTS, 3);
Number of passengers traveling (long). The parameter expects a long value set with putLong(String, long):
Bundle params = new Bundle();
params.putLong(Param.NUMBER_OF_PASSENGERS, 11);
Number of rooms for travel events (long). The parameter expects a long value set with
putLong(String, long):
Bundle params = new Bundle();
params.putLong(Param.NUMBER_OF_ROOMS, 2);
Flight or Travel origin (String). The parameter expects a string
value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.ORIGIN, "Mountain View, CA");
Purchase price (double). Expecting a double value set with putDouble(String, double):
Bundle params = new Bundle();
params.putDouble(Param.PRICE, 1.0);
params.putString(Param.CURRENCY, "USD"); // e.g. $1.00 USD
Product category (String). Used in IN_APP_PURCHASE (which is automatically
captured for Google Play non-subscription-based products). The parameter expects a
string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.PRODUCT_CATEGORY, "t-shirts");
Purchase product ID (String). Used in IN_APP_PURCHASE (which is automatically
captured for Google Play non-subscription-based products). The parameter
expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.PRODUCT_ID, "p7654");
Purchase item name (String). Used in IN_APP_PURCHASE (which is automatically
captured for Google Play non-subscription-based products). The parameter expects
a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.PRODUCT_NAME, "abc");
Purchase quantity (long). The parameter expects a long value set with putLong(String, long):
Bundle params = new Bundle();
params.putLong(Param.QUANTITY, 1);
Score in game (long). The parameter expects a long value set with putLong(String, long):
Bundle params = new Bundle();
params.putLong(Param.SCORE, 4200);
The search string/keywords used (String). The parameter expects a string value set with
putString(String, String):
Bundle params = new Bundle();
params.putString(Param.SEARCH_TERM, "periodic table");
Shipping cost (double). Expecting a double value set with putDouble(String, double):
Bundle params = new Bundle();
params.putDouble(Param.SHIPPING, 9.50);
params.putString(Param.CURRENCY, "USD"); // e.g. $9.50 USD
Signup method (String). The parameter expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.SIGN_UP_METHOD, "google");
The departure date, check-in date, or rental start date for the item (String). The
parameter expects a date formatted as YYYY-MM-DD and set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.START_DATE, "2015-09-14");
Tax amount (double). Expecting a double value set with putDouble(String, double):
Bundle params = new Bundle();
params.putDouble(Param.TAX, 1.0);
params.putString(Param.CURRENCY, "USD" ); // e.g. $1.00 USD
A single ID for a ecommerce group transaction (String). The parameter expects a string
value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.TRANSACTION_ID, "ab7236dd9823");
Travel class (String). The parameter expects a string value set with putString(String, String):
Bundle params = new Bundle();
params.putString(Param.TRAVEL_CLASS, "business");
A context-specific numeric value which is accumulated automatically for each event type.
Value should be specified with putLong(String, long) or
putDouble(String, double). This is a general purpose parameter that is
useful for accumulating a key metric that pertains to an event. Examples include
revenue, distance, time, and points. Notes: Currency-related values should be
supplied using type double and should be accompanied by a CURRENCY param.
The valid range of accumulated values is [-9,223,372,036,854.77, 9,223,372,036,854.77].
Bundle params = new Bundle();
params.putDouble(Param.VALUE, 3.99);
params.putString(Param.CURRENCY, "USD" ); // e.g. $3.99 USD
Name of virtual currency type (String). The parameter expects a string value set with
putString(String, String):
Bundle params = new Bundle();
params.putString(Param.VIRTUAL_CURRENCY_NAME, "gems");