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 |
FirebaseAnalytics.Event.CAMPAIGN_DETAILS click ID. |
String | AD_FORMAT | The ad format (String). |
String | AD_PLATFORM | The ad platform (String). |
String | AD_SOURCE | The ad source (String). |
String | AD_UNIT_NAME | The ad unit name (String). |
String | AFFILIATION | A product affiliation to designate a supplying company or brick and mortar store location (String). |
String | CAMPAIGN |
FirebaseAnalytics.Event.CAMPAIGN_DETAILS name; used for keyword analysis
to identify a specific product promotion or strategic campaign. |
String | CAMPAIGN_ID |
FirebaseAnalytics.Event.CAMPAIGN_DETAILS Campaign ID. |
String | CHARACTER | Character used in game (String). |
String | CONTENT |
FirebaseAnalytics.Event.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 used for a purchase (String). |
String | CP1 |
FirebaseAnalytics.Event.CAMPAIGN_DETAILS custom parameter. |
String | CREATIVE_FORMAT |
FirebaseAnalytics.Event.CAMPAIGN_DETAILS Creative format. |
String | CREATIVE_NAME | The name of a creative used in a promotional spot (String). |
String | CREATIVE_SLOT | The name of a creative slot (String). |
String | CURRENCY | Currency of the purchase or items associated with the event, in 3-letter ISO_4217 format (String). |
String | DESTINATION | Flight or Travel destination (String). |
String | DISCOUNT | Monetary value of discount associated with a purchase(double). |
String | END_DATE | The arrival date, check-out date, or rental end date for the item (String). |
String | EXTEND_SESSION | Indicates that the associated event should either extend the current session or start a new session if no session was active when the event was logged. |
String | FLIGHT_NUMBER | Flight number for travel events (String). |
String | GROUP_ID | Group/clan/guild id (String). |
String | INDEX | The index of the item in a list. |
String | ITEMS | The list of items involved in the transaction. |
String | ITEM_BRAND | Item brand. |
String | ITEM_CATEGORY | Item category (context-specific) (String). |
String | ITEM_CATEGORY2 | Item category (context-specific) (String). |
String | ITEM_CATEGORY3 | Item category (context-specific) (String). |
String | ITEM_CATEGORY4 | Item category (context-specific) (String). |
String | ITEM_CATEGORY5 | Item category (context-specific) (String). |
String | ITEM_ID | Item ID (context-specific) (String). |
String | ITEM_LIST_ID | The ID of the list in which the item was presented to the user (String). |
String | ITEM_LIST_NAME | The name of the list in which the item was presented to the user (String). |
String | ITEM_NAME | Item Name (context-specific) (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 | LOCATION_ID | The location associated with the event. |
String | MARKETING_TACTIC |
FirebaseAnalytics.Event.CAMPAIGN_DETAILS Marketing tactic. |
String | MEDIUM |
FirebaseAnalytics.Event.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 | PAYMENT_TYPE | The chosen method of payment (String). |
String | PRICE | Purchase price (double). |
String | PROMOTION_ID | The ID of a product promotion (String). |
String | PROMOTION_NAME | The name of a product promotion (String). |
String | QUANTITY | Purchase quantity (long). |
String | SCORE | Score in game (long). |
String | SCREEN_CLASS | Current screen class, such as the class name of the Activity, logged with screen_view event and added to every event. |
String | SCREEN_NAME | Current screen name, such as the name of the Activity, logged with screen_view event and added to every event. |
String | SEARCH_TERM | The search string/keywords used (String). |
String | SHIPPING | Shipping cost associated with a transaction (double). |
String | SHIPPING_TIER | The shipping tier (e.g. |
String | SOURCE |
FirebaseAnalytics.Event.CAMPAIGN_DETAILS source; used to identify a search
engine, newsletter, or other source. |
String | SOURCE_PLATFORM |
FirebaseAnalytics.Event.CAMPAIGN_DETAILS Source platform. |
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 cost associated with a transaction (double). |
String | TERM |
FirebaseAnalytics.Event.CAMPAIGN_DETAILS term; used with paid search to
supply the keywords for ads. |
String | TRANSACTION_ID | The unique identifier of a 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
Param()
|
Inherited Method Summary
Constants
public static final String ACHIEVEMENT_ID
Game achievement ID (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ACHIEVEMENT_ID, "10_matches_won");
public static final String ACLID
FirebaseAnalytics.Event.CAMPAIGN_DETAILS
click ID.
public static final String AD_FORMAT
The ad format (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.AD_FORMAT, "Banner");
public static final String AD_PLATFORM
The ad platform (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.AD_PLATFORM, "MoPub");
public static final String AD_SOURCE
The ad source (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.AD_SOURCE, "AdColony");
public static final String AD_UNIT_NAME
The ad unit name (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.AD_UNIT_NAME, "Banner_03");
public static final String AFFILIATION
A product affiliation to designate a supplying company or brick and mortar store
location (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.AFFILIATION, "Google Store");
public static final String CAMPAIGN
FirebaseAnalytics.Event.CAMPAIGN_DETAILS
name; used for keyword analysis to
identify a specific product promotion or strategic campaign.
public static final String CAMPAIGN_ID
FirebaseAnalytics.Event.CAMPAIGN_DETAILS
Campaign ID.
public static final String CHARACTER
Character used in game (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.CHARACTER, "beat_boss");
public static final String CONTENT
FirebaseAnalytics.Event.CAMPAIGN_DETAILS
content; used for A/B testing and
content-targeted ads to differentiate ads or links that point to the same URL.
public static final String CONTENT_TYPE
Type of content selected (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.CONTENT_TYPE, "news article");
public static final String COUPON
Coupon code used for a purchase (String). The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.COUPON, "SUMMER_FUN");
public static final String CP1
FirebaseAnalytics.Event.CAMPAIGN_DETAILS
custom parameter.
public static final String CREATIVE_FORMAT
FirebaseAnalytics.Event.CAMPAIGN_DETAILS
Creative format.
public static final String CREATIVE_NAME
The name of a creative used in a promotional spot (String). The parameter expects a
string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.CREATIVE_NAME, "Summer Sale");
public static final String CREATIVE_SLOT
The name of a creative slot (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.CREATIVE_SLOT, "summer_banner2");
public static final String CURRENCY
Currency of the purchase or items associated with the event, in 3-letter ISO_4217 format (String). The
parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.CURRENCY, "USD");
public static final String DESTINATION
Flight or Travel destination (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.DESTINATION, "Mountain View, CA");
public static final String DISCOUNT
Monetary value of discount associated with a purchase(double). Expecting a double
value set with
BaseBundle.putDouble(String, double)
:
Bundle params = new Bundle(); params.putDouble(Param.DISCOUNT, 2.0); params.putString(Param.CURRENCY, "USD" ); // e.g. $2.00 USD
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
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.END_DATE, "2015-09-14");
public static final String EXTEND_SESSION
Indicates that the associated event should either extend the current session or start a new session if no session was active when the event was logged. Specify 1 to extend the current session or to start a new session; any other long value will not extend or start a session.
Bundle params = new Bundle(); params.putLong(Param.EXTEND_SESSION, 1);
public static final String FLIGHT_NUMBER
Flight number for travel events (String). The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.FLIGHT_NUMBER, "ZZ800");
public static final String GROUP_ID
Group/clan/guild id (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.GROUP_ID, "g1");
public static final String INDEX
The index of the item in a list. The parameter expects a long value set with
BaseBundle.putLong(String, long)
:
Bundle params = new Bundle(); params.putLong(Param.INDEX, 5);
public static final String ITEMS
The list of items involved in the transaction. (Parcelable[]). The parameter expects
a Parcelable Array set with
Bundle.putParcelableArray(String, Parcelable[])
:
Bundle item1 = new Bundle(); item1.putString(Param.ITEM_NAME, "jeggings"); item1.putString(Param.ITEM_CATEGORY, "pants"); Bundle item2 = new Bundle(); item2.putString(Param.ITEM_NAME, "boots"); item2.putString(Param.ITEM_CATEGORY, "shoes"); Bundle params = new Bundle(); params.putParcelableArray(Param.ITEMS, new Bundle[] {item1, item2});
public static final String ITEM_BRAND
Item brand. The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ITEM_BRAND, "Google");
public static final String ITEM_CATEGORY
Item category (context-specific) (String). The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ITEM_CATEGORY, "pants");
public static final String ITEM_CATEGORY2
Item category (context-specific) (String). The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ITEM_CATEGORY2, "pants");
public static final String ITEM_CATEGORY3
Item category (context-specific) (String). The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ITEM_CATEGORY3, "pants");
public static final String ITEM_CATEGORY4
Item category (context-specific) (String). The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ITEM_CATEGORY4, "pants");
public static final String ITEM_CATEGORY5
Item category (context-specific) (String). The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ITEM_CATEGORY5, "pants");
public static final String ITEM_ID
Item ID (context-specific) (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ITEM_ID, "SKU_12345");
public static final String ITEM_LIST_ID
The ID of the list in which the item was presented to the user (String). The
parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ITEM_LIST_ID, "ABC123");
public static final String ITEM_LIST_NAME
The name of the list in which the item was presented to the user (String). The
parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ITEM_LIST_NAME, "Related products");
public static final String ITEM_NAME
Item Name (context-specific) (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ITEM_NAME, "jeggings");
public static final String ITEM_VARIANT
Item variant. The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ITEM_VARIANT, "Black");
public static final String LEVEL
Level in game (long). The parameter expects a long value set with
BaseBundle.putLong(String, long)
:
Bundle params = new Bundle(); params.putLong(Param.LEVEL, 42);
public static final String LEVEL_NAME
The name of a level in a game (String). The parameter expects a String value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.LEVEL_NAME, "room_1");
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
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.LOCATION, "Mountain View, CA");
public static final String LOCATION_ID
The location associated with the event. Preferred to be the Google Place ID that corresponds to the
associated item but could be overridden to a custom location ID string. The parameter
expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.LOCATION_ID, "ChIJiyj437sx3YAR9kUWC8QkLzQ");
public static final String MARKETING_TACTIC
FirebaseAnalytics.Event.CAMPAIGN_DETAILS
Marketing tactic.
public static final String MEDIUM
FirebaseAnalytics.Event.CAMPAIGN_DETAILS
medium; used to identify a medium
such as email or cost-per-click (cpc).
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
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.METHOD, "google");
public static final String NUMBER_OF_NIGHTS
Number of nights staying at hotel (long). The parameter expects a long value set
with
BaseBundle.putLong(String, long)
:
Bundle params = new Bundle(); params.putLong(Param.NUMBER_OF_NIGHTS, 3);
public static final String NUMBER_OF_PASSENGERS
Number of passengers traveling (long). The parameter expects a long value set with
BaseBundle.putLong(String, long)
:
Bundle params = new Bundle(); params.putLong(Param.NUMBER_OF_PASSENGERS, 11);
public static final String NUMBER_OF_ROOMS
Number of rooms for travel events (long). The parameter expects a long value set
with
BaseBundle.putLong(String, long)
:
Bundle params = new Bundle(); params.putLong(Param.NUMBER_OF_ROOMS, 2);
public static final String ORIGIN
Flight or Travel origin (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.ORIGIN, "Mountain View, CA");
public static final String PAYMENT_TYPE
The chosen method of payment (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.PAYMENT_TYPE, "Visa");
public static final String PRICE
Purchase price (double). Expecting a double value set with
BaseBundle.putDouble(String, double)
:
Bundle params = new Bundle(); params.putDouble(Param.PRICE, 1.0); params.putString(Param.CURRENCY, "USD"); // e.g. $1.00 USD
public static final String PROMOTION_ID
The ID of a product promotion (String). The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.PROMOTION_ID, "ABC123");
public static final String PROMOTION_NAME
The name of a product promotion (String). The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.PROMOTION_NAME, "Summer Sale");
public static final String QUANTITY
Purchase quantity (long). The parameter expects a long value set with
BaseBundle.putLong(String, long)
:
Bundle params = new Bundle(); params.putLong(Param.QUANTITY, 1);
public static final String SCORE
Score in game (long). The parameter expects a long value set with
BaseBundle.putLong(String, long)
:
Bundle params = new Bundle(); params.putLong(Param.SCORE, 4200);
public static final String SCREEN_CLASS
Current screen class, such as the class name of the Activity, logged with
screen_view event and added to every event. The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.SCREEN_CLASS, "MainActivity");
public static final String SCREEN_NAME
Current screen name, such as the name of the Activity, logged with screen_view event
and added to every event. The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.SCREEN_NAME, "Splash Screen");
public static final String SEARCH_TERM
The search string/keywords used (String). The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.SEARCH_TERM, "periodic table");
public static final String SHIPPING
Shipping cost associated with a transaction (double). Expecting a double value set
with
BaseBundle.putDouble(String, double)
:
Bundle params = new Bundle(); params.putDouble(Param.SHIPPING, 5.99); params.putString(Param.CURRENCY, "USD"); // e.g. $5.99 USD
public static final String SHIPPING_TIER
The shipping tier (e.g. Ground, Air, Next-day) selected for delivery of the
purchased item (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.SHIPPING_TIER, "Ground");
public static final String SOURCE
FirebaseAnalytics.Event.CAMPAIGN_DETAILS
source; used to identify a search
engine, newsletter, or other source.
public static final String SOURCE_PLATFORM
FirebaseAnalytics.Event.CAMPAIGN_DETAILS
Source platform.
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
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.START_DATE, "2015-09-14");
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
BaseBundle.putLong(String, long)
:
Bundle params = new Bundle(); params.putLong(Param.SUCCESS, 1);
public static final String TAX
Tax cost associated with a transaction (double). Expecting a double value set with
BaseBundle.putDouble(String, double)
:
Bundle params = new Bundle(); params.putDouble(Param.TAX, 2.43); params.putString(Param.CURRENCY, "USD" ); // e.g. $2.43 USD
public static final String TERM
FirebaseAnalytics.Event.CAMPAIGN_DETAILS
term; used with paid search to
supply the keywords for ads.
public static final String TRANSACTION_ID
The unique identifier of a transaction (String). The parameter expects a string
value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.TRANSACTION_ID, "T12345");
public static final String TRAVEL_CLASS
Travel class (String). The parameter expects a string value set with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.TRAVEL_CLASS, "business");
public static final String VALUE
A context-specific numeric value which is accumulated automatically for each event
type. Value should be specified with
BaseBundle.putLong(String, long)
or
BaseBundle.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
FirebaseAnalytics.Event.ADD_TO_CART
) 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
public static final String VIRTUAL_CURRENCY_NAME
Name of virtual currency type (String). The parameter expects a string value set
with
BaseBundle.putString(String, String)
:
Bundle params = new Bundle(); params.putString(Param.VIRTUAL_CURRENCY_NAME, "gems");