FirebaseAnalytics.Param

public static class FirebaseAnalytics.Param extends Object

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 40 characters long, may only contain alphanumeric characters and underscores ("_"), and must start with an alphabetic character. Param values can be up to 100 characters long. The "firebase_", "google_" and "ga_" prefixes are reserved and should not be used.

Constant Summary

String ACHIEVEMENT_ID Game achievement ID (String).
String ACLID CAMPAIGN_DETAILS click ID.
String AFFILIATION The store or affiliation from which this transaction occurred.
String CAMPAIGN CAMPAIGN_DETAILS name; used for keyword analysis to identify a specific product promotion or strategic campaign.
String CHARACTER Character used in game (String).
String CHECKOUT_OPTION Some option on a step in an ecommerce flow.
String CHECKOUT_STEP The checkout step (1..N).
String CONTENT CAMPAIGN_DETAILS content; used for A/B testing and content-targeted ads to differentiate ads or links that point to the same URL.
String CONTENT_TYPE Type of content selected (String).
String COUPON Coupon code for a purchasable item (String).
String CP1 CAMPAIGN_DETAILS custom parameter.
String CREATIVE_NAME The name of a creative used in a promotional spot.
String CREATIVE_SLOT The name of a creative slot.
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 INDEX The index of an item in a list.
String ITEM_BRAND Item brand.
String ITEM_CATEGORY Item category (String).
String ITEM_ID Item ID (String).
String ITEM_LIST The list in which the item was presented to the user.
String ITEM_LOCATION_ID The Google Place ID that corresponds to the associated item (String).
String ITEM_NAME Item name (String).
String ITEM_VARIANT Item variant.
String LEVEL Level in game (long).
String LEVEL_NAME The name of a level in a game (String).
String LOCATION Location (String).
String MEDIUM CAMPAIGN_DETAILS medium; used to identify a medium such as email or cost-per-click (cpc).
String METHOD A particular approach used in an operation; for example, "facebook" or "email" in the context of a sign_up or login event.
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 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 This constant was deprecated. Use METHOD instead.
String SOURCE CAMPAIGN_DETAILS source; used to identify a search engine, newsletter, or other source.
String START_DATE The departure date, check-in date, or rental start date for the item (String).
String SUCCESS The result of an operation (long).
String TAX Tax amount (double).
String TERM CAMPAIGN_DETAILS term; used with paid search to supply the keywords for ads.
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 Constructor Summary

Inherited Method Summary

Constants

public static final String ACHIEVEMENT_ID

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");
 
Constant Value: "achievement_id"

public static final String ACLID

Constant Value: "aclid"

public static final String AFFILIATION

The store or affiliation from which this transaction occurred.

Constant Value: "affiliation"

public static final String CAMPAIGN

CAMPAIGN_DETAILS name; used for keyword analysis to identify a specific product promotion or strategic campaign.

Constant Value: "campaign"

public static final String CHARACTER

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");
 
Constant Value: "character"

public static final String CHECKOUT_OPTION

Some option on a step in an ecommerce flow.

Constant Value: "checkout_option"

public static final String CHECKOUT_STEP

The checkout step (1..N).

Constant Value: "checkout_step"

public static final String CONTENT

CAMPAIGN_DETAILS content; used for A/B testing and content-targeted ads to differentiate ads or links that point to the same URL.

Constant Value: "content"

public static final String CONTENT_TYPE

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");
 
Constant Value: "content_type"

public static final String COUPON

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");
 
Constant Value: "coupon"

public static final String CP1

CAMPAIGN_DETAILS custom parameter.

Constant Value: "cp1"

public static final String CREATIVE_NAME

The name of a creative used in a promotional spot.

Constant Value: "creative_name"

public static final String CREATIVE_SLOT

The name of a creative slot.

Constant Value: "creative_slot"

public static final String CURRENCY

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");
 
Constant Value: "currency"

public static final String DESTINATION

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");
 
Constant Value: "destination"

public static final String END_DATE

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");
 
Constant Value: "end_date"

public static final String FLIGHT_NUMBER

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");
 
Constant Value: "flight_number"

public static final String GROUP_ID

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");
 
Constant Value: "group_id"

public static final String INDEX

The index of an item in a list.

Constant Value: "index"

public static final String ITEM_BRAND

Item brand.

Constant Value: "item_brand"

public static final String ITEM_CATEGORY

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");
 
Constant Value: "item_category"

public static final String ITEM_ID

Item ID (String). The parameter expects a string value set with putString(String, String):


     Bundle params = new Bundle();
     params.putString(Param.ITEM_ID, "p7654");
 
Constant Value: "item_id"

public static final String ITEM_LIST

The list in which the item was presented to the user.

Constant Value: "item_list"

public static final String ITEM_LOCATION_ID

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");
 
Constant Value: "item_location_id"

public static final String ITEM_NAME

Item name (String). The parameter expects a string value set with putString(String, String):


     Bundle params = new Bundle();
     params.putString(Param.ITEM_NAME, "abc");
 
Constant Value: "item_name"

public static final String ITEM_VARIANT

Item variant.

Constant Value: "item_variant"

public static final String LEVEL

Level in game (long). The parameter expects a long value set with putLong(String, long):


     Bundle params = new Bundle();
     params.putLong(Param.LEVEL, 42);
 
Constant Value: "level"

public static final String LEVEL_NAME

The name of a level in a game (String). The parameter expects a String value set with putString(String, String):


     Bundle params = new Bundle();
     params.putString(Param.LEVEL_NAME, "room_1");
 
Constant Value: "level_name"

public static final String LOCATION

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");
 
Constant Value: "location"

public static final String MEDIUM

CAMPAIGN_DETAILS medium; used to identify a medium such as email or cost-per-click (cpc).

Constant Value: "medium"

public static final String METHOD

A particular approach used in an operation; for example, "facebook" or "email" in the context of a sign_up or login event. The parameter expects a string value set with putString(String, String):


     Bundle params = new Bundle();
     params.putString(Param.METHOD, "google");
 
Constant Value: "method"

public static final String NUMBER_OF_NIGHTS

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);
 
Constant Value: "number_of_nights"

public static final String NUMBER_OF_PASSENGERS

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);
 
Constant Value: "number_of_passengers"

public static final String NUMBER_OF_ROOMS

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);
 
Constant Value: "number_of_rooms"

public static final String ORIGIN

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");
 
Constant Value: "origin"

public static final String PRICE

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
 
Constant Value: "price"

public static final String QUANTITY

Purchase quantity (long). The parameter expects a long value set with putLong(String, long):


     Bundle params = new Bundle();
     params.putLong(Param.QUANTITY, 1);
 
Constant Value: "quantity"

public static final String SCORE

Score in game (long). The parameter expects a long value set with putLong(String, long):


     Bundle params = new Bundle();
     params.putLong(Param.SCORE, 4200);
 
Constant Value: "score"

public static final String SEARCH_TERM

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");
 
Constant Value: "search_term"

public static final String SHIPPING

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
 
Constant Value: "shipping"

public static final String SIGN_UP_METHOD

This constant was deprecated.
Use METHOD instead.

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");
 
Constant Value: "sign_up_method"

public static final String SOURCE

CAMPAIGN_DETAILS source; used to identify a search engine, newsletter, or other source.

Constant Value: "source"

public static final String START_DATE

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");
 
Constant Value: "start_date"

public static final String SUCCESS

The result of an operation (long). Specify 1 to indicate success and 0 to indicate failure. The parameter expects a long value set with putLong(String, long):


     Bundle params = new Bundle();
     params.putLong(Param.SEARCH_TERM, 1);
 
Constant Value: "success"

public static final String TAX

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
 
Constant Value: "tax"

public static final String TERM

CAMPAIGN_DETAILS term; used with paid search to supply the keywords for ads.

Constant Value: "term"

public static final String TRANSACTION_ID

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");
 
Constant Value: "transaction_id"

public static final String TRAVEL_CLASS

Travel class (String). The parameter expects a string value set with putString(String, String):


     Bundle params = new Bundle();
     params.putString(Param.TRAVEL_CLASS, "business");
 
Constant Value: "travel_class"

public static final String VALUE

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: Values for pre-defined currency-related events (such as ADD_TO_CART) 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]. Supplying a non-numeric value, omitting the corresponding CURRENCY parameter, or supplying an invalid currency code for conversion events will cause that conversion to be omitted from reporting.


     Bundle params = new Bundle();
     params.putDouble(Param.VALUE, 3.99);
     params.putString(Param.CURRENCY, "USD" );  // e.g. $3.99 USD
 
Constant Value: "value"

public static final String VIRTUAL_CURRENCY_NAME

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");
 
Constant Value: "virtual_currency_name"

Protected Constructors

protected FirebaseAnalytics.Param ()

Send feedback about...

Need help? Visit our support page.