Summary: Constants | Protected Ctors | Inherited Methods | [Expand All]
public static class

# FirebaseAnalytics.Event

extends Object

java.lang.Object
↳ | com.google.firebase.analytics.FirebaseAnalytics.Event

## Class Overview

An Event is an important occurrence in your app that you want to measure. You can report up to 500 different types of Events per app and you can associate up to 25 unique parameters with each Event type. Some common events are suggested below, but you may also choose to specify custom Event types that are associated with your specific app. Each event type is identified by a unique name. Event names can be up to 32 characters long, may only contain alphanumeric characters and underscores ("_"), and must start with an alphabetic character. The "firebase_" prefix is reserved and should not be used.

The following event names are reserved and cannot be used:

- app_clear_data
- app_uninstall
- app_update
- error
- first_open
- in_app_purchase
- notification_dismiss
- notification_foreground
- notification_open
- notification_receive
- os_update
- session_start
- user_engagement

## Summary

Constants
String | ADD_PAYMENT_INFO | Add Payment Info event.
String | ADD_TO_CART | E-Commerce Add To Cart event.
String | ADD_TO_WISHLIST | E-Commerce Add To Wishlist event.
String | APP_OPEN | App Open event.
String | BEGIN_CHECKOUT | E-Commerce Begin Checkout event.
String | ECOMMERCE_PURCHASE | E-Commerce Purchase event.
String | GENERATE_LEAD | Generate Lead event.
String | JOIN_GROUP | Join Group event.
String | LEVEL_UP | Level Up event.
String | LOGIN | Login event.
String | POST_SCORE | Post Score event.
String | PRESENT_OFFER | Present Offer event.
String | PURCHASE_REFUND | E-Commerce Purchase Refund event.
String | SEARCH | Search event.
String | SELECT_CONTENT | Select Content event.
String | SHARE | Share event.
String | SIGN_UP | Sign Up event.
String | SPEND_VIRTUAL_CURRENCY | Spend Virtual Currency event.
String | TUTORIAL_BEGIN | Tutorial Begin event.
String | TUTORIAL_COMPLETE | Tutorial End event.
String | UNLOCK_ACHIEVEMENT | Unlock Achievement event.
String | VIEW_ITEM | View Item event.
String | VIEW_ITEM_LIST | View Item List event.
String | VIEW_SEARCH_RESULTS | View Search Results event.

Protected Constructors
| FirebaseAnalytics.Event()

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## Constants

#### public static final String ADD_PAYMENT_INFO

Add Payment Info event. This event signifies that a user has submitted their payment information to your app.

Constant Value: "add_payment_info"

#### public static final String ADD_TO_CART

E-Commerce Add To Cart event. This event signifies that an item was added to a cart for purchase. Add this event to a funnel with `ECOMMERCE_PURCHASE` to gauge the effectiveness of your checkout process. Note: If you supply the `VALUE` parameter, you must also supply the `CURRENCY` parameter so that revenue metrics can be computed accurately. Params:

- `ITEM_ID` (String)
- `ITEM_NAME` (String)
- `ITEM_CATEGORY` (String)
- `QUANTITY` (long)
- `PRICE` (double) (optional)
- `VALUE` (double) (optional)
- `CURRENCY` (String) (optional)
- `ORIGIN` (String) (optional)
- `ITEM_LOCATION_ID` (String) (optional)
- `DESTINATION` (String) (optional)
- `START_DATE` (String) (optional)
- `END_DATE` (String) (optional)

Constant Value: "add_to_cart"

#### public static final String ADD_TO_WISHLIST

E-Commerce Add To Wishlist event. This event signifies that an item was added to a wishlist. Use this event to identify popular gift items in your app. Note: If you supply the `VALUE` parameter, you must also supply the `CURRENCY` parameter so that revenue metrics can be computed accurately. Params:

- `ITEM_ID` (String)
- `ITEM_NAME` (String)
- `ITEM_CATEGORY` (String)
- `QUANTITY` (long)
- `PRICE` (double) (optional)
- `VALUE` (double) (optional)
- `CURRENCY` (String) (optional)
- `ITEM_LOCATION_ID` (String) (optional)

Constant Value: "add_to_wishlist"

#### public static final String APP_OPEN

App Open event. By logging this event when an App is moved to the foreground, developers can understand how often users leave and return during the course of a Session. Although Sessions are automatically reported, this event can provide further clarification around the continuous engagement of app-users.

Constant Value: "app_open"

#### public static final String BEGIN_CHECKOUT

E-Commerce Begin Checkout event. This event signifies that a user has begun the process of checking out. Add this event to a funnel with your `ECOMMERCE_PURCHASE` event to gauge the effectiveness of your checkout process. Note: If you supply the `VALUE` parameter, you must also supply the `CURRENCY` parameter so that revenue metrics can be computed accurately. Params:

- `VALUE` (double) (optional)
- `CURRENCY` (String) (optional)
- `TRANSACTION_ID` (String) (optional)
- `NUMBER_OF_NIGHTS` (long) (optional) for hotel bookings
- `NUMBER_OF_ROOMS` (long) (optional) for hotel bookings
- `NUMBER_OF_PASSENGERS` (long) (optional) for travel bookings
- `ORIGIN` (String) (optional) for travel bookings
- `DESTINATION` (String) (optional) for travel bookings
- `START_DATE` (String) (optional) for travel bookings
- `END_DATE` (String) (optional) for travel bookings
- `TRAVEL_CLASS` (String) (optional) for travel bookings

Constant Value: "begin_checkout"

#### public static final String ECOMMERCE_PURCHASE

E-Commerce Purchase event. This event signifies that an item was purchased by a user. Note: This is different from the in-app purchase event, which is reported automatically for Google Play-based apps. Note: If you supply the `VALUE` parameter, you must also supply the `CURRENCY` parameter so that revenue metrics can be computed accurately. Params:

- `CURRENCY` (String) (optional)
- `VALUE` (double) (optional)
- `TRANSACTION_ID` (String) (optional)
- `TAX` (double) (optional)
- `SHIPPING` (double) (optional)
- `COUPON` (String) (optional)
- `LOCATION` (String) (optional)
- `NUMBER_OF_NIGHTS` (long) (optional) for hotel bookings
- `NUMBER_OF_ROOMS` (long) (optional) for hotel bookings
- `NUMBER_OF_PASSENGERS` (long) (optional) for travel bookings
- `ORIGIN` (String) (optional) for travel bookings
- `DESTINATION` (String) (optional) for travel bookings
- `START_DATE` (String) (optional) for travel bookings
- `END_DATE` (String) (optional) for travel bookings
- `TRAVEL_CLASS` (String) (optional) for travel bookings

Constant Value: "ecommerce_purchase"

#### public static final String GENERATE_LEAD

Generate Lead event. Log this event when a lead has been generated in the app to understand the efficacy of your install and re-engagement campaigns. Note: If you supply the `VALUE` parameter, you must also supply the `CURRENCY` parameter so that revenue metrics can be computed accurately. Params:

- `CURRENCY` (String) (optional)
- `VALUE` (double) (optional)

Constant Value: "generate_lead"

#### public static final String JOIN_GROUP

Join Group event. Log this event when a user joins a group such as a guild, team or family. Use this event to analyze how popular certain groups or social features are in your app. Params:

- `GROUP_ID` (String)

Constant Value: "join_group"

#### public static final String LEVEL_UP

Level Up event. This event signifies that a player has leveled up in your gaming app. It can help you gauge the level distribution of your userbase and help you identify certain levels that are difficult to pass. Params:

- `LEVEL` (long)
- `CHARACTER` (String) (optional)

Constant Value: "level_up"

#### public static final String LOGIN

Login event. Apps with a login feature can report this event to signify that a user has logged in.

Constant Value: "login"

#### public static final String POST_SCORE

Post Score event. Log this event when the user posts a score in your gaming app. This event can help you understand how users are actually performing in your game and it can help you correlate high scores with certain audiences or behaviors. Params:

- `SCORE` (long)
- `LEVEL` (long) (optional)
- `CHARACTER` (String) (optional)

Constant Value: "post_score"

#### public static final String PRESENT_OFFER

Present Offer event. This event signifies that the app has presented a purchase offer to a user. Add this event to a funnel with the `ADD_TO_CART` and `ECOMMERCE_PURCHASE` to gauge your conversion process. Note: If you supply the `VALUE` parameter, you must also supply the `CURRENCY` parameter so that revenue metrics can be computed accurately. Params:

- `ITEM_ID` (String)
- `ITEM_NAME` (String)
- `ITEM_CATEGORY` (String)
- `QUANTITY` (long)
- `PRICE` (double) (optional)
- `VALUE` (double) (optional)
- `CURRENCY` (String) (optional)
- `ITEM_LOCATION_ID` (String) (optional)

Constant Value: "present_offer"

#### public static final String PURCHASE_REFUND

E-Commerce Purchase Refund event. This event signifies that an item purchase was refunded. Note: If you supply the `VALUE` parameter, you must also supply the `CURRENCY` parameter so that revenue metrics can be computed accurately. Params:

- `CURRENCY` (String) (optional)
- `VALUE` (double) (optional)
- `TRANSACTION_ID` (String) (optional)

Constant Value: "purchase_refund"

#### public static final String SEARCH

Search event. Apps that support search features can use this event to contextualize search operations by supplying the appropriate, corresponding parameters. This event can help you identify the most popular content in your app. Params:

- `SEARCH_TERM` (String)
- `NUMBER_OF_NIGHTS` (long) (optional) for hotel bookings
- `NUMBER_OF_ROOMS` (long) (optional) for hotel bookings
- `NUMBER_OF_PASSENGERS` (long) (optional) for travel bookings
- `ORIGIN` (String) (optional) for travel bookings
- `DESTINATION` (String) (optional) for travel bookings
- `START_DATE` (String) (optional) for travel bookings
- `END_DATE` (String) (optional) for travel bookings
- `TRAVEL_CLASS` (String) (optional) for travel bookings

Constant Value: "search"

#### public static final String SELECT_CONTENT

Select Content event. This general purpose event signifies that a user has selected some content of a certain type in an app. The content can be any object in your app. This event can help you identify popular content and categories of content in your app. Params:

- `CONTENT_TYPE` (String)
- `ITEM_ID` (String)

Constant Value: "select_content"

#### public static final String SHARE

Share event. Apps with social features can log the Share event to identify the most viral content. Params:

- `CONTENT_TYPE` (String)
- `ITEM_ID` (String)

Constant Value: "share"

#### public static final String SIGN_UP

Sign Up event. This event indicates that a user has signed up for an account in your app. The parameter signifies the method by which the user signed up. Use this event to understand the different behaviors between logged in and logged out users. Params:

- `SIGN_UP_METHOD` (String)

Constant Value: "sign_up"

#### public static final String SPEND_VIRTUAL_CURRENCY

Spend Virtual Currency event. This event tracks the sale of virtual goods in your app and can help you identify which virtual goods are the most popular objects of purchase. Params:

- `ITEM_NAME` (String)
- `VIRTUAL_CURRENCY_NAME` (String)
- `VALUE` (long or double)

Constant Value: "spend_virtual_currency"

#### public static final String TUTORIAL_BEGIN

Tutorial Begin event. This event signifies the start of the on-boarding process in your app. Use this in a funnel with `TUTORIAL_COMPLETE` to understand how many users complete this process and move on to the full app experience.

Constant Value: "tutorial_begin"

#### public static final String TUTORIAL_COMPLETE

Tutorial End event. Use this event to signify the user’s completion of your app’s on-boarding process. Add this to a funnel with `TUTORIAL_BEGIN` to gauge the completion rate of your on-boarding process.

Constant Value: "tutorial_complete"

#### public static final String UNLOCK_ACHIEVEMENT

Unlock Achievement event. Log this event when the user has unlocked an achievement in your game. Since achievements generally represent the breadth of a gaming experience, this event can help you understand how many users are experiencing all that your game has to offer. Params:

- `ACHIEVEMENT_ID` (String)

Constant Value: "unlock_achievement"

#### public static final String VIEW_ITEM

View Item event. This event signifies that some content was shown to the user. This content may be a product, a webpage or just a simple image or text. Use the appropriate parameters to contextualize the event. Use this event to discover the most popular items viewed in your app. Note: If you supply the `VALUE` parameter, you must also supply the `CURRENCY` parameter so that revenue metrics can be computed accurately. Params:

- `ITEM_ID` (String)
- `ITEM_NAME` (String)
- `ITEM_CATEGORY` (String)
- `ITEM_LOCATION_ID` (String) (optional)
- `PRICE` (double) (optional)
- `QUANTITY` (long) (optional)
- `CURRENCY` (String) (optional)
- `VALUE` (double) (optional)
- `FLIGHT_NUMBER` (String) (optional) for travel bookings
- `NUMBER_OF_PASSENGERS` (long) (optional) for travel bookings
- `NUMBER_OF_NIGHTS` (long) (optional) for travel bookings
- `NUMBER_OF_ROOMS` (long) (optional) for travel bookings
- `ORIGIN` (String) (optional) for travel bookings
- `DESTINATION` (String) (optional) for travel bookings
- `START_DATE` (String) (optional) for travel bookings
- `END_DATE` (String) (optional) for travel bookings
- `SEARCH_TERM` (String) (optional) for travel bookings
- `TRAVEL_CLASS` (String) (optional) for travel bookings

Constant Value: "view_item"

#### public static final String VIEW_ITEM_LIST

View Item List event. Log this event when the user has been presented with a list of items of a certain category. Params:

- `ITEM_CATEGORY` (String)

Constant Value: "view_item_list"

#### public static final String VIEW_SEARCH_RESULTS

View Search Results event. Log this event when the user has been presented with the results of a search. Params:

- `SEARCH_TERM` (String)

Constant Value: "view_search_results"

## Protected Constructors

#### protected FirebaseAnalytics.Event ()