Firebase.Analytics.FirebaseAnalytics

Summary

Public static attributes

EventAdImpression = "ad_impression"
string
Ad Impression event.
EventAddPaymentInfo = "add_payment_info"
string
Add Payment Info event.
EventAddShippingInfo = "add_shipping_info"
string
Add Shipping Info event.
EventAddToCart = "add_to_cart"
string
E-Commerce Add To Cart event.
EventAddToWishlist = "add_to_wishlist"
string
E-Commerce Add To Wishlist event.
EventAppOpen = "app_open"
string
App Open event.
EventBeginCheckout = "begin_checkout"
string
E-Commerce Begin Checkout event.
EventCampaignDetails = "campaign_details"
string
Campaign Detail event.
EventEarnVirtualCurrency = "earn_virtual_currency"
string
Earn Virtual Currency event.
EventGenerateLead = "generate_lead"
string
Generate Lead event.
EventInAppPurchase = "in_app_purchase"
string
In-App Purchase event.
EventJoinGroup = "join_group"
string
Join Group event.
EventLevelEnd = "level_end"
string
Level End event.
EventLevelStart = "level_start"
string
Level Start event.
EventLevelUp = "level_up"
string
Level Up event.
EventLogin = "login"
string
Login event.
EventPostScore = "post_score"
string
Post Score event.
EventPurchase = "purchase"
string
E-Commerce Purchase event.
EventRefund = "refund"
string
E-Commerce Refund event.
EventRemoveFromCart = "remove_from_cart"
string
E-Commerce Remove from Cart event.
EventScreenView = "screen_view"
string
Screen View event.
EventSearch = "search"
string
Search event.
EventSelectContent = "select_content"
string
Select Content event.
EventSelectItem = "select_item"
string
Select Item event.
EventSelectPromotion = "select_promotion"
string
Select promotion event.
EventShare = "share"
string
Share event.
EventSignUp = "sign_up"
string
Sign Up event.
EventSpendVirtualCurrency = "spend_virtual_currency"
string
Spend Virtual Currency event.
EventTutorialBegin = "tutorial_begin"
string
Tutorial Begin event.
EventTutorialComplete = "tutorial_complete"
string
Tutorial End event.
EventUnlockAchievement = "unlock_achievement"
string
Unlock Achievement event.
EventViewCart = "view_cart"
string
E-commerce View Cart event.
EventViewItem = "view_item"
string
View Item event.
EventViewItemList = "view_item_list"
string
View Item List event.
EventViewPromotion = "view_promotion"
string
View Promotion event.
EventViewSearchResults = "view_search_results"
string
View Search Results event.
ParameterAchievementID = "achievement_id"
string
Game achievement ID (String).
ParameterAdFormat = "ad_format"
string
The ad format (e.g.
ParameterAdNetworkClickID = "aclid"
string
Ad Network Click ID (String).
ParameterAdPlatform = "ad_platform"
string
The ad platform (e.g.
ParameterAdSource = "ad_source"
string
The ad source (e.g.
ParameterAdUnitName = "ad_unit_name"
string
The ad unit name (e.g.
ParameterAffiliation = "affiliation"
string
A product affiliation to designate a supplying company or brick and mortar store location (String).
ParameterCP1 = "cp1"
string
Campaign custom parameter (String).
ParameterCampaign = "campaign"
string
The individual campaign name, slogan, promo code, etc.
ParameterCampaignID = "campaign_id"
string
Campaign ID (String).
ParameterCharacter = "character"
string
Character used in game (String).
ParameterContent = "content"
string
Campaign content (String).
ParameterContentType = "content_type"
string
Type of content selected (String).
ParameterCoupon = "coupon"
string
Coupon code used for a purchase (String).
ParameterCreativeFormat = "creative_format"
string
Creative Format (String).
ParameterCreativeName = "creative_name"
string
The name of a creative used in a promotional spot (String).
ParameterCreativeSlot = "creative_slot"
string
The name of a creative slot (String).
ParameterCurrency = "currency"
string
Currency of the purchase or items associated with the event, in 3-letterISO_4217 format (String).
ParameterDestination = "destination"
string
Flight or Travel destination (String).
ParameterDiscount = "discount"
string
Monetary value of discount associated with a purchase (Double).
ParameterEndDate = "end_date"
string
The arrival date, check-out date or rental end date for the item.
ParameterExtendSession = "extend_session"
string
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.
ParameterFlightNumber = "flight_number"
string
Flight number for travel events (String).
ParameterFreeTrial = "free_trial"
string
Indicates if the user is on a free trial of a subscription.
ParameterGroupID = "group_id"
string
Group/clan/guild ID (String).
ParameterIndex = "index"
string
The index of the item in a list (Int).
ParameterItemBrand = "item_brand"
string
Item brand (String).
ParameterItemCategory = "item_category"
string
Item category (context-specific) (String).
ParameterItemCategory2 = "item_category2"
string
Item Category (context-specific) (String).
ParameterItemCategory3 = "item_category3"
string
Item Category (context-specific) (String).
ParameterItemCategory4 = "item_category4"
string
Item Category (context-specific) (String).
ParameterItemCategory5 = "item_category5"
string
Item Category (context-specific) (String).
ParameterItemID = "item_id"
string
Item ID (context-specific) (String).
ParameterItemListID = "item_list_id"
string
The ID of the list in which the item was presented to the user (String).
ParameterItemListName = "item_list_name"
string
The name of the list in which the item was presented to the user (String).
ParameterItemName = "item_name"
string
Item Name (context-specific) (String).
ParameterItemVariant = "item_variant"
string
Item variant (String).
ParameterItems = "items"
string
The list of items involved in the transaction expressed as[[String: Any]].
ParameterLevel = "level"
string
Level in game (Int).
ParameterLevelName = "level_name"
string
The name of a level in a game (String).
ParameterLocation = "location"
string
Location (String).
ParameterLocationID = "location_id"
string
The location associated with the event.
ParameterMarketingTactic = "marketing_tactic"
string
Marketing Tactic (String).
ParameterMedium = "medium"
string
The advertising or marParameter(keting, cpc, banner, email), push.
ParameterMethod = "method"
string
A particular approach used in an operation; for example, "facebook" or "email" in the context of a sign_up or login event.
ParameterNumberOfNights = "number_of_nights"
string
Number of nights staying at hotel (Int).
ParameterNumberOfPassengers = "number_of_passengers"
string
Number of passengers traveling (Int).
ParameterNumberOfRooms = "number_of_rooms"
string
Number of rooms for travel events (Int).
ParameterOrigin = "origin"
string
Flight or Travel origin (String).
ParameterPaymentType = "payment_type"
string
The chosen method of payment (String).
ParameterPrice = "price"
string
Purchase price (Double).
ParameterPriceIsDiscounted = "price_is_discounted"
string
Indicates if an item's price is discounted.
ParameterProductID = "product_id"
string
The ID of a product (String).
ParameterProductName = "product_name"
string
The name of a product (String).
ParameterPromotionID = "promotion_id"
string
The ID of a product promotion (String).
ParameterPromotionName = "promotion_name"
string
The name of a product promotion (String).
ParameterQuantity = "quantity"
string
Purchase quantity (Int).
ParameterScore = "score"
string
Score in game (Int).
ParameterScreenClass = "screen_class"
string
Current screen class, such as the class name of the UIViewController, logged with screen_view event and added to every event (String).
ParameterScreenName = "screen_name"
string
Current screen name, such as the name of the UIViewController, logged with screen_view event and added to every event (String).
ParameterSearchTerm = "search_term"
string
The search string/keywords used (String).
ParameterShipping = "shipping"
string
Shipping cost associated with a transaction (Double).
ParameterShippingTier = "shipping_tier"
string
The shipping tier (e.g.
ParameterSource = "source"
string
The origin of your traffic, such as an Ad network (for example, google) or partner (urban airship).
ParameterSourcePlatform = "source_platform"
string
Source Platform (String).
ParameterStartDate = "start_date"
string
The departure date, check-in date or rental start date for the item.
ParameterSubscription = "subscription"
string
Indicates if the purchase is a subscription.
ParameterSuccess = "success"
string
The result of an operation.
ParameterTax = "tax"
string
Tax cost associated with a transaction (Double).
ParameterTerm = "term"
string
If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword (String).
ParameterTransactionID = "transaction_id"
string
The unique identifier of a transaction (String).
ParameterTravelClass = "travel_class"
string
Travel class (String).
ParameterValue = "value"
string
A context-specific numeric value which is accumulated automatically for each event type.
ParameterVirtualCurrencyName = "virtual_currency_name"
string
Name of virtual currency type (String).
UserPropertyAllowAdPersonalizationSignals = "allow_personalized_ads"
string
Indicates whether events logged by GoogleAnalytics can be used to personalize ads for the user.
UserPropertySignUpMethod = "sign_up_method"
string
The method used to sign in.

Public static functions

GetAnalyticsInstanceIdAsync()
System.Threading.Tasks.Task< string >
Get the instance ID from the analytics service.
GetSessionIdAsync()
System.Threading.Tasks.Task< long >
Asynchronously retrieves the identifier of the current app session.
InitiateOnDeviceConversionMeasurementWithEmailAddress(string emailAddress)
void
Initiates on-device conversion measurement given a user email address on iOS and tvOS (no-op on Android).
InitiateOnDeviceConversionMeasurementWithHashedEmailAddress(byte[] hashedEmailAddress)
void
Initiates on-device conversion measurement given a sha256-hashed user email address.
InitiateOnDeviceConversionMeasurementWithHashedPhoneNumber(byte[] hashedPhoneNumber)
void
Initiates on-device conversion measurement given a sha256-hashed phone number in E.164 format.
InitiateOnDeviceConversionMeasurementWithPhoneNumber(string phoneNumber)
void
Initiates on-device conversion measurement given a phone number in E.164 format on iOS (no-op on Android).
LogEvent(string name, string parameterName, string parameterValue)
void
Log an event with one string parameter.
LogEvent(string name, string parameterName, double parameterValue)
void
Log an event with one float parameter.
LogEvent(string name, string parameterName, long parameterValue)
void
Log an event with one 64-bit integer parameter.
LogEvent(string name, string parameterName, int parameterValue)
void
Log an event with one integer parameter (stored as a 64-bit integer).
LogEvent(string name)
void
Log an event with no parameters.
LogEvent(string name, paramsParameter[] parameters)
void
Log an event with associated parameters.
LogEvent(string name, IEnumerable<Parameter > parameters)
void
Log an event with associated parameters.
ResetAnalyticsData()
void
Clears all analytics data for this app from the device and resets the app instance id.
SetAnalyticsCollectionEnabled(bool enabled)
void
Sets whether analytics collection is enabled for this app on this device.
SetConsent(System.Collections.Generic.IDictionary<ConsentType,ConsentStatus > consentSettings)
void
Sets the applicable end user consent state (e.g., for device identifiers) for this app on this device.
SetDefaultEventParameters(paramsParameter[] parameters)
void
Adds parameters that will be set on every event logged from the SDK.
SetDefaultEventParameters(IEnumerable<Parameter > parameters)
void
Adds parameters that will be set on every event logged from the SDK.
SetSessionTimeoutDuration(System.TimeSpan timeSpan)
void
Sets the duration of inactivity that terminates the current session.
SetUserId(string userId)
void
Sets the user ID property.
SetUserProperty(string name, string property)
void
Set a user property to the given value.

Public static attributes

EventAdImpression

stringEventAdImpression="ad_impression"

Ad Impression event.

This event signifies when a user sees an ad impression. Note: If you supply theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterAdPlatform (String) (optional)
  • AnalyticsParameterAdFormat (String) (optional)
  • AnalyticsParameterAdSource (String) (optional)
  • AnalyticsParameterAdUnitName (String) (optional)
  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventAddPaymentInfo

stringEventAddPaymentInfo="add_payment_info"

Add Payment Info event.

This event signifies that a user has submitted their payment information. Note: If you supply theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterCoupon (String) (optional)
  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterPaymentType (String) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventAddShippingInfo

stringEventAddShippingInfo="add_shipping_info"

Add Shipping Info event.

This event signifies that a user has submitted their shipping information. Note: If you supply theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterCoupon (String) (optional)
  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterShippingTier (String) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventAddToCart

stringEventAddToCart="add_to_cart"

E-Commerce Add To Cart event.

This event signifies that an item(s) was added to a cart for purchase. Add this event to a funnel withAnalyticsEventPurchase to gauge the effectiveness of your checParameter(kout, If you supply theAnalyticsParameterValue parameter), you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventAddToWishlist

stringEventAddToWishlist="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. Note: If you supply theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventAppOpen

stringEventAppOpen="app_open"

App Open event.

By logging this event when an App becomes active, 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.

EventBeginCheckout

stringEventBeginCheckout="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 yourAnalyticsEventPurchase event to gauge the effectiveness of your checkout process. Note: If you supply theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterCoupon (String) (optional)
  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventCampaignDetails

stringEventCampaignDetails="campaign_details"

Campaign Detail event.

Log this event to supply the referral details of a re-engagement campaign. Note: you must supply at least one of the required parameters AnalyticsParameterSource, AnalyticsParameterMedium or AnalyticsParameterCampaign. Params:

  • AnalyticsParameterSource (String)
  • AnalyticsParameterMedium (String)
  • AnalyticsParameterCampaign (String)
  • AnalyticsParameterTerm (String) (optional)
  • AnalyticsParameterContent (String) (optional)
  • AnalyticsParameterAdNetworkClickID (String) (optional)
  • AnalyticsParameterCP1 (String) (optional)
  • AnalyticsParameterCampaignID (String) (optional)
  • AnalyticsParameterCreativeFormat (String) (optional)
  • AnalyticsParameterMarketingTactic (String) (optional)
  • AnalyticsParameterSourcePlatform (String) (optional)

EventEarnVirtualCurrency

stringEventEarnVirtualCurrency="earn_virtual_currency"

Earn Virtual Currency event.

This event tracks the awarding of virtual currency in your app. Log this along withAnalyticsEventSpendVirtualCurrency to better understand your virtual economy. Params:

  • AnalyticsParameterVirtualCurrencyName (String)
  • AnalyticsParameterValue (Int or Double)

EventGenerateLead

stringEventGenerateLead="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 theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventInAppPurchase

stringEventInAppPurchase="in_app_purchase"

In-App Purchase event.

This event signifies that extra content or a subscription was purchased by a user inside an app. Note: This is different from the ecommerce purchase event. Note: If you supply theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterCurrency (String)
  • AnalyticsParameterFreeTrial (Int) (optional)
  • AnalyticsParameterPrice (Double) (optional)
  • AnalyticsParameterPriceIsDiscounted (Int) (optional)
  • AnalyticsParameterProductID (String) (optional)
  • AnalyticsParameterProductName (String) (optional)
  • AnalyticsParameterQuantity (Int) (optional)
  • AnalyticsParameterSubscription (Int) (optional)
  • AnalyticsParameterValue (Double)

EventJoinGroup

stringEventJoinGroup="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:

  • AnalyticsParameterGroupID (String)

EventLevelEnd

stringEventLevelEnd="level_end"

Level End event.

Log this event when the user finishes a level. Params:

  • AnalyticsParameterLevelName (String)
  • AnalyticsParameterSuccess (String)

EventLevelStart

stringEventLevelStart="level_start"

Level Start event.

Log this event when the user starts a new level. Params:

  • AnalyticsParameterLevelName (String)

EventLevelUp

stringEventLevelUp="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:

  • AnalyticsParameterLevel (Int)
  • AnalyticsParameterCharacter (String) (optional)

EventLogin

stringEventLogin="login"

Login event.

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

EventPostScore

stringEventPostScore="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:

  • AnalyticsParameterScore (Int)
  • AnalyticsParameterLevel (Int) (optional)
  • AnalyticsParameterCharacter (String) (optional)

EventPurchase

stringEventPurchase="purchase"

E-Commerce Purchase event.

This event signifies that an item(s) was purchased by a user. Note: This is different from the in-app purchase event, which is reported automatically for App Store-based apps. Note: If you supply theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterAffiliation (String) (optional)
  • AnalyticsParameterCoupon (String) (optional)
  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterEndDate (String) (optional)
  • AnalyticsParameterItemID (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterShipping (Double) (optional)
  • AnalyticsParameterStartDate (String) (optional)
  • AnalyticsParameterTax (Double) (optional)
  • AnalyticsParameterTransactionID (String) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventRefund

stringEventRefund="refund"

E-Commerce Refund event.

This event signifies that a refund was issued. Note: If you supply theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterAffiliation (String) (optional)
  • AnalyticsParameterCoupon (String) (optional)
  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterShipping (Double) (optional)
  • AnalyticsParameterTax (Double) (optional)
  • AnalyticsParameterTransactionID (String) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventRemoveFromCart

stringEventRemoveFromCart="remove_from_cart"

E-Commerce Remove from Cart event.

This event signifies that an item(s) was removed from a cart. Note: If you supply theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventScreenView

stringEventScreenView="screen_view"

Screen View event.

This event signifies a screen view. Use this when a screen transition occurs. This event can be logged irrespective of whether automatic screen tracking is enabled. Params:

  • AnalyticsParameterScreenClass (String) (optional)
  • AnalyticsParameterScreenName (String) (optional)

EventSearch

stringEventSearch="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:

  • AnalyticsParameterSearchTerm (String)
  • AnalyticsParameterStartDate (String) (optional)
  • AnalyticsParameterEndDate (String) (optional)
  • AnalyticsParameterNumberOfNights (Int) (optional) for hotel bookings
  • AnalyticsParameterNumberOfRooms (Int) (optional) for hotel bookings
  • AnalyticsParameterNumberOfPassengers (Int) (optional) for travel bookings
  • AnalyticsParameterOrigin (String) (optional)
  • AnalyticsParameterDestination (String) (optional)
  • AnalyticsParameterTravelClass (String) (optional) for travel bookings

EventSelectContent

stringEventSelectContent="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:

  • AnalyticsParameterContentType (String)
  • AnalyticsParameterItemID (String)

EventSelectItem

stringEventSelectItem="select_item"

Select Item event.

This event signifies that an item was selected by a user from a list. Use the appropriate parameters to contextualize the event. Use this event to discover the most popular items selected. Params:

  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterItemListID (String) (optional)
  • AnalyticsParameterItemListName (String) (optional)

EventSelectPromotion

stringEventSelectPromotion="select_promotion"

Select promotion event.

This event signifies that a user has selected a promotion offer. Use the appropriate parameters to contextualize the event, such as the item(s) for which the promotion applies. Params:

  • AnalyticsParameterCreativeName (String) (optional)
  • AnalyticsParameterCreativeSlot (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterLocationID (String) (optional)
  • AnalyticsParameterPromotionID (String) (optional)
  • AnalyticsParameterPromotionName (String) (optional)

EventShare

stringEventShare="share"

Share event.

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

  • AnalyticsParameterContentType (String)
  • AnalyticsParameterItemID (String)

EventSignUp

stringEventSignUp="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:

  • AnalyticsParameterMethod (String)

EventSpendVirtualCurrency

stringEventSpendVirtualCurrency="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:

  • AnalyticsParameterItemName (String)
  • AnalyticsParameterVirtualCurrencyName (String)
  • AnalyticsParameterValue (Int or Double)

EventTutorialBegin

stringEventTutorialBegin="tutorial_begin"

Tutorial Begin event.

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

EventTutorialComplete

stringEventTutorialComplete="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 withAnalyticsEventTutorialBegin to gauge the completion rate of your on-boarding process.

EventUnlockAchievement

stringEventUnlockAchievement="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:

  • AnalyticsParameterAchievementID (String)

EventViewCart

stringEventViewCart="view_cart"

E-commerce View Cart event.

This event signifies that a user has viewed their cart. Use this to analyze your purchase funnel. Note: If you supply theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventViewItem

stringEventViewItem="view_item"

View Item event.

This event signifies that a user has viewed an item. 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 theAnalyticsParameterValue parameter, you must also supply theAnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

  • AnalyticsParameterCurrency (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterValue (Double) (optional)

EventViewItemList

stringEventViewItemList="view_item_list"

View Item List event.

Log this event when a user sees a list of items or offerings. Params:

  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterItemListID (String) (optional)
  • AnalyticsParameterItemListName (String) (optional)

EventViewPromotion

stringEventViewPromotion="view_promotion"

View Promotion event.

This event signifies that a promotion was shown to a user. Add this event to a funnel with theAnalyticsEventAddToCart andAnalyticsEventPurchase to gauge your conversion process. Params:

  • AnalyticsParameterCreativeName (String) (optional)
  • AnalyticsParameterCreativeSlot (String) (optional)
  • AnalyticsParameterItems ([[String: Any]]) (optional)
  • AnalyticsParameterLocationID (String) (optional)
  • AnalyticsParameterPromotionID (String) (optional)
  • AnalyticsParameterPromotionName (String) (optional)

EventViewSearchResults

stringEventViewSearchResults="view_search_results"

View Search Results event.

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

  • AnalyticsParameterSearchTerm (String)

ParameterAchievementID

stringParameterAchievementID="achievement_id"

Game achievement ID (String).

letparams=[AnalyticsParameterAchievementID:"10_matches_won",// ...]

ParameterAdFormat

stringParameterAdFormat="ad_format"

The ad format (e.g.

Banner, Interstitial, Rewarded, Native, Rewarded Interstitial, Instream). (String).

letparams=[AnalyticsParameterAdFormat:"Banner",// ...]

ParameterAdNetworkClickID

stringParameterAdNetworkClickID="aclid"

Ad Network Click ID (String).

Used for network-specific click IDs which vary in format.

letparams=[AnalyticsParameterAdNetworParameter(kClickID,"1234567"),// ...]

ParameterAdPlatform

stringParameterAdPlatform="ad_platform"

The ad platform (e.g.

MoPub, IronSource) (String).

letparams=[AnalyticsParameterAdPlatform:"MoPub",// ...]

ParameterAdSource

stringParameterAdSource="ad_source"

The ad source (e.g.

AdColony) (String).

letparams=[AnalyticsParameterAdSource:"AdColony",// ...]

ParameterAdUnitName

stringParameterAdUnitName="ad_unit_name"

The ad unit name (e.g.

Banner_03) (String).

letparams=[AnalyticsParameterAdUnitName:"Banner_03",// ...]

ParameterAffiliation

stringParameterAffiliation="affiliation"

A product affiliation to designate a supplying company or brick and mortar store location (String).

letparams=[AnalyticsParameterAffiliation:"Google Store",// ...]

ParameterCP1

stringParameterCP1="cp1"

Campaign custom parameter (String).

Used as a method of capturing custom data in a campaign. Use varies by network.

letparams=[AnalyticsParameterCP1:"custom_data",// ...]

ParameterCampaign

stringParameterCampaign="campaign"

The individual campaign name, slogan, promo code, etc.

Some networks have pre-defined macro to capture campaign information, otherwise can be populated by developer. Highly Recommended (String).

letparams=[AnalyticsParameterCampaign:"winter_promotion",// ...]

ParameterCampaignID

stringParameterCampaignID="campaign_id"

Campaign ID (String).

Used for keyword analysis to identify a specific product promotion or strategic campaign. This is a required key for GA4 data import.

letparams=[AnalyticsParameterCampaignID:"7877652710",// ...]

ParameterCharacter

stringParameterCharacter="character"

Character used in game (String).

letparams=[AnalyticsParameterCharacter:"beat_boss",// ...]

ParameterContent

stringParameterContent="content"

Campaign content (String).

ParameterContentType

stringParameterContentType="content_type"

Type of content selected (String).

letparams=[AnalyticsParameterContentType:"news article",// ...]

ParameterCoupon

stringParameterCoupon="coupon"

Coupon code used for a purchase (String).

letparams=[AnalyticsParameterCoupon:"SUMMER_FUN",// ...]

ParameterCreativeFormat

stringParameterCreativeFormat="creative_format"

Creative Format (String).

Used to identify the high-level classification of the type of ad served by a specific campaign.

letparams=[AnalyticsParameterCreativeFormat:"display",// ...]

ParameterCreativeName

stringParameterCreativeName="creative_name"

The name of a creative used in a promotional spot (String).

letparams=[AnalyticsParameterCreativeName:"Summer Sale",// ...]

ParameterCreativeSlot

stringParameterCreativeSlot="creative_slot"

The name of a creative slot (String).

letparams=[AnalyticsParameterCreativeSlot:"summer_banner2",// ...]

ParameterCurrency

stringParameterCurrency="currency"

Currency of the purchase or items associated with the event, in 3-letterISO_4217 format (String).

letparams=[AnalyticsParameterCurrency:"USD",// ...]

ParameterDestination

stringParameterDestination="destination"

Flight or Travel destination (String).

letparams=[AnalyticsParameterDestination:"Mountain View, CA",// ...]

ParameterDiscount

stringParameterDiscount="discount"

Monetary value of discount associated with a purchase (Double).

letparams=[AnalyticsParameterDiscount:2.0,AnalyticsParameterCurrency:"USD",// e.g. $2.00 USD// ...]

ParameterEndDate

stringParameterEndDate="end_date"

The arrival date, check-out date or rental end date for the item.

This should be in YYYY-MM-DD format (String).

letparams=[AnalyticsParameterEndDate:"2015-09-14",// ...]

ParameterExtendSession

stringParameterExtendSession="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 value will not extend or start a session.

letparams=[AnalyticsParameterExtendSession:1,// ...]

ParameterFlightNumber

stringParameterFlightNumber="flight_number"

Flight number for travel events (String).

letparams=[AnalyticsParameterFlightNumber:"ZZ800",// ...]

ParameterFreeTrial

stringParameterFreeTrial="free_trial"

Indicates if the user is on a free trial of a subscription.

Specify 1 to indicate true and 0 to indicate false (Int).

letparams=[AnalyticsParameterFreeTrial:1,// ...]

ParameterGroupID

stringParameterGroupID="group_id"

Group/clan/guild ID (String).

letparams=[AnalyticsParameterGroupID:"g1",// ...]

ParameterIndex

stringParameterIndex="index"

The index of the item in a list (Int).

letparams=[AnalyticsParameterIndex:5,// ...]

ParameterItemBrand

stringParameterItemBrand="item_brand"

Item brand (String).

letparams=[AnalyticsParameterItemBrand:"Google",// ...]

ParameterItemCategory

stringParameterItemCategory="item_category"

Item category (context-specific) (String).

letparams=[AnalyticsParameterItemCategory:"pants",// ...]

ParameterItemCategory2

stringParameterItemCategory2="item_category2"

Item Category (context-specific) (String).

letparams=[AnalyticsParameterItemCategory2:"pants",// ...]

ParameterItemCategory3

stringParameterItemCategory3="item_category3"

Item Category (context-specific) (String).

letparams=[AnalyticsParameterItemCategory3:"pants",// ...]

ParameterItemCategory4

stringParameterItemCategory4="item_category4"

Item Category (context-specific) (String).

letparams=[AnalyticsParameterItemCategory4:"pants",// ...]

ParameterItemCategory5

stringParameterItemCategory5="item_category5"

Item Category (context-specific) (String).

letparams=[AnalyticsParameterItemCategory5:"pants",// ...]

ParameterItemID

stringParameterItemID="item_id"

Item ID (context-specific) (String).

letparams=[AnalyticsParameterItemID:"SKU_12345",// ...]

ParameterItemListID

stringParameterItemListID="item_list_id"

The ID of the list in which the item was presented to the user (String).

letparams=[AnalyticsParameterItemListID:"ABC123",// ...]

ParameterItemListName

stringParameterItemListName="item_list_name"

The name of the list in which the item was presented to the user (String).

letparams=[AnalyticsParameterItemListName:"Related products",// ...]

ParameterItemName

stringParameterItemName="item_name"

Item Name (context-specific) (String).

letparams=[AnalyticsParameterItemName:"jeggings",// ...]

ParameterItemVariant

stringParameterItemVariant="item_variant"

Item variant (String).

letparams=[AnalyticsParameterItemVariant:"Black",// ...]

ParameterItems

stringParameterItems="items"

The list of items involved in the transaction expressed as[[String: Any]].

letparams=[AnalyticsParameterItems:[[AnalyticsParameterItemName : "jeggings", AnalyticsParameterItemCategory : "pants"],[AnalyticsParameterItemName : "boots", AnalyticsParameterItemCategory : "shoes"],],]

ParameterLevel

stringParameterLevel="level"

Level in game (Int).

letparams=[AnalyticsParameterLevel:42,// ...]

ParameterLevelName

stringParameterLevelName="level_name"

The name of a level in a game (String).

letparams=[AnalyticsParameterLevelName:"room_1",// ...]

ParameterLocation

stringParameterLocation="location"

Location (String).

The GooglePlace ID that corresponds to the associated event. Alternatively, you can supply your own custom Location ID.

letparams=[AnalyticsParameterLocation:"ChIJiyj437sx3YAR9kUWC8QkLzQ",// ...]

ParameterLocationID

stringParameterLocationID="location_id"

The location associated with the event.

Preferred to be the GooglePlace ID that corresponds to the associated item but could be overridden to a custom location ID string.(String).

letparams=[AnalyticsParameterLocationID:"ChIJiyj437sx3YAR9kUWC8QkLzQ",// ...]

ParameterMarketingTactic

stringParameterMarketingTactic="marketing_tactic"

Marketing Tactic (String).

Used to identify the targeting criteria applied to a specific campaign.

letparams=[AnalyticsParameterMarParameter(ketingTactic,"Remarketing"),// ...]

ParameterMedium

stringParameterMedium="medium"

The advertising or marParameter(keting, cpc, banner, email), push.

Highly recommended (String).

letparams=[AnalyticsParameterMedium:"email",// ...]

ParameterMethod

stringParameterMethod="method"

A particular approach used in an operation; for example, "facebook" or "email" in the context of a sign_up or login event.

(String).

letparams=[AnalyticsParameterMethod:"google",// ...]

ParameterNumberOfNights

stringParameterNumberOfNights="number_of_nights"

Number of nights staying at hotel (Int).

letparams=[AnalyticsParameterNumberOfNights:3,// ...]

ParameterNumberOfPassengers

stringParameterNumberOfPassengers="number_of_passengers"

Number of passengers traveling (Int).

letparams=[AnalyticsParameterNumberOfPassengers:11,// ...]

ParameterNumberOfRooms

stringParameterNumberOfRooms="number_of_rooms"

Number of rooms for travel events (Int).

letparams=[AnalyticsParameterNumberOfRooms:2,// ...]

ParameterOrigin

stringParameterOrigin="origin"

Flight or Travel origin (String).

letparams=[AnalyticsParameterOrigin:"Mountain View, CA",// ...]

ParameterPaymentType

stringParameterPaymentType="payment_type"

The chosen method of payment (String).

letparams=[AnalyticsParameterPaymentType:"Visa",// ...]

ParameterPrice

stringParameterPrice="price"

Purchase price (Double).

letparams=[AnalyticsParameterPrice:1.0,AnalyticsParameterCurrency:"USD",// e.g. $1.00 USD// ...]

ParameterPriceIsDiscounted

stringParameterPriceIsDiscounted="price_is_discounted"

Indicates if an item's price is discounted.

Specify 1 to indicate true and 0 to indicate false (Int).

letparams=[AnalyticsParameterPriceIsDiscounted:1,// ...]

ParameterProductID

stringParameterProductID="product_id"

The ID of a product (String).

letparams=[AnalyticsParameterProductID:"PROD_12345",// ...]

ParameterProductName

stringParameterProductName="product_name"

The name of a product (String).

letparams=[AnalyticsParameterProductName:"My Awesome Product",// ...]

ParameterPromotionID

stringParameterPromotionID="promotion_id"

The ID of a product promotion (String).

letparams=[AnalyticsParameterPromotionID:"ABC123",// ...]

ParameterPromotionName

stringParameterPromotionName="promotion_name"

The name of a product promotion (String).

letparams=[AnalyticsParameterPromotionName:"Summer Sale",// ...]

ParameterQuantity

stringParameterQuantity="quantity"

Purchase quantity (Int).

letparams=[AnalyticsParameterQuantity:1,// ...]

ParameterScore

stringParameterScore="score"

Score in game (Int).

letparams=[AnalyticsParameterScore:4200,// ...]

ParameterScreenClass

stringParameterScreenClass="screen_class"

Current screen class, such as the class name of the UIViewController, logged with screen_view event and added to every event (String).

letparams=[AnalyticsParameterScreenClass:"LoginViewController",// ...]

ParameterScreenName

stringParameterScreenName="screen_name"

Current screen name, such as the name of the UIViewController, logged with screen_view event and added to every event (String).

letparams=[AnalyticsParameterScreenName:"LoginView",// ...]

ParameterSearchTerm

stringParameterSearchTerm="search_term"

The search string/keywords used (String).

letparams=[AnalyticsParameterSearchTerm:"periodic table",// ...]

ParameterShipping

stringParameterShipping="shipping"

Shipping cost associated with a transaction (Double).

letparams=[AnalyticsParameterShipping:5.99,AnalyticsParameterCurrency:"USD",// e.g. $5.99 USD// ...]

ParameterShippingTier

stringParameterShippingTier="shipping_tier"

The shipping tier (e.g.

Ground, Air, Next-day) selected for delivery of the purchased item (String).

letparams=[AnalyticsParameterShippingTier:"Ground",// ...]

ParameterSource

stringParameterSource="source"

The origin of your traffic, such as an Ad network (for example, google) or partner (urban airship).

Identify the advertiser, site, publication, etc. that is sending traffic to your property. Highly recommended (String).

letparams=[AnalyticsParameterSource:"InMobi",// ...]

ParameterSourcePlatform

stringParameterSourcePlatform="source_platform"

Source Platform (String).

Used to identify the platform responsible for directing traffic to a givenAnalytics property (e.g., a buying platform where budgets, targeting criteria, etc. are set, a platform for managing organic traffic data, etc.).

letparams=[AnalyticsParameterSourcePlatform:"sa360",// ...]

ParameterStartDate

stringParameterStartDate="start_date"

The departure date, check-in date or rental start date for the item.

This should be in YYYY-MM-DD format (String).

letparams=[AnalyticsParameterStartDate:"2015-09-14",// ...]

ParameterSubscription

stringParameterSubscription="subscription"

Indicates if the purchase is a subscription.

Specify 1 to indicate true and 0 to indicate false (Int).

letparams=[AnalyticsParameterSubscription:1,// ...]

ParameterSuccess

stringParameterSuccess="success"

The result of an operation.

Specify 1 to indicate success and 0 to indicate failure (Int).

letparams=[AnalyticsParameterSuccess:1,// ...]

ParameterTax

stringParameterTax="tax"

Tax cost associated with a transaction (Double).

letparams=[AnalyticsParameterTax:2.43,AnalyticsParameterCurrency:"USD",// e.g. $2.43 USD// ...]

ParameterTerm

stringParameterTerm="term"

If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword (String).

letparams=[AnalyticsParameterTerm:"game",// ...]

ParameterTransactionID

stringParameterTransactionID="transaction_id"

The unique identifier of a transaction (String).

letparams=[AnalyticsParameterTransactionID:"T12345",// ...]

ParameterTravelClass

stringParameterTravelClass="travel_class"

Travel class (String).

letparams=[AnalyticsParameterTravelClass:"business",// ...]

ParameterValue

stringParameterValue="value"

A context-specific numeric value which is accumulated automatically for each event type.

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. Value should be specified as Int or Double. Notes: Values for pre-defined currency-related events (such asAnalyticsEventAddToCart) should be supplied using Double and must be accompanied by aAnalyticsParameterCurrency parameter. 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 correspondingAnalyticsParameterCurrency parameter, or supplying an invalidcurrency code for conversion events will cause that conversion to be omitted from reporting.

letparams=[AnalyticsParameterValue:3.99,AnalyticsParameterCurrency:"USD",// e.g. $3.99 USD// ...]

ParameterVirtualCurrencyName

stringParameterVirtualCurrencyName="virtual_currency_name"

Name of virtual currency type (String).

letparams=[AnalyticsParameterVirtualCurrencyName:"virtual_currency_name",// ...]

UserPropertyAllowAdPersonalizationSignals

stringUserPropertyAllowAdPersonalizationSignals="allow_personalized_ads"

Indicates whether events logged by GoogleAnalytics can be used to personalize ads for the user.

Set to "YES" to enable, or "NO" to disable. Default is enabled. See thedocumentation for more details and information about related settings.

Analytics.setUserProperty("NO",forName:AnalyticsUserPropertyAllowAdPersonalizationSignals)

UserPropertySignUpMethod

stringUserPropertySignUpMethod="sign_up_method"

The method used to sign in.

For example, "google", "facebook" or "twitter".

Public static functions

GetAnalyticsInstanceIdAsync

System.Threading.Tasks.Task<string>GetAnalyticsInstanceIdAsync()

Get the instance ID from the analytics service.

Details
Returns
A Task with theAnalytics instance ID.

GetSessionIdAsync

System.Threading.Tasks.Task<long>GetSessionIdAsync()

Asynchronously retrieves the identifier of the current app session.

The session ID retrieval could fail due toAnalytics collection disabled, or if the app session was expired.

Details
Returns
A Task with the identifier of the current app session.

InitiateOnDeviceConversionMeasurementWithEmailAddress

voidInitiateOnDeviceConversionMeasurementWithEmailAddress(stringemailAddress)

Initiates on-device conversion measurement given a user email address on iOS and tvOS (no-op on Android).

On iOS and tvOS, this method requires the dependency GoogleAppMeasurementOnDeviceConversion to be linked in, otherwise the invocation results in a no-op.

Details
Parameters
emailAddress
User email address. Include a domain name for all email addresses (e.g. gmail.com or hotmail.co.jp).

InitiateOnDeviceConversionMeasurementWithHashedEmailAddress

voidInitiateOnDeviceConversionMeasurementWithHashedEmailAddress(byte[]hashedEmailAddress)

Initiates on-device conversion measurement given a sha256-hashed user email address.

Requires dependency GoogleAppMeasurementOnDeviceConversion to be linked in, otherwise it is a no-op.

Details
Parameters
hashedEmailAddress
User email address as a UTF8-encoded string normalized and hashed according to the instructions athttps://firebase.google.com/docs/tutorials/ads-ios-on-device-measurement/step-3.

InitiateOnDeviceConversionMeasurementWithHashedPhoneNumber

voidInitiateOnDeviceConversionMeasurementWithHashedPhoneNumber(byte[]hashedPhoneNumber)

Initiates on-device conversion measurement given a sha256-hashed phone number in E.164 format.

Requires dependency GoogleAppMeasurementOnDeviceConversion to be linked in, otherwise it is a no-op.

Details
Parameters
hashedPhoneNumber
UTF8-encoded user phone number in E.164 format and then hashed according to the instructions athttps://firebase.google.com/docs/tutorials/ads-ios-on-device-measurement/step-3.

InitiateOnDeviceConversionMeasurementWithPhoneNumber

voidInitiateOnDeviceConversionMeasurementWithPhoneNumber(stringphoneNumber)

Initiates on-device conversion measurement given a phone number in E.164 format on iOS (no-op on Android).

On iOS, requires dependency GoogleAppMeasurementOnDeviceConversion to be linked in, otherwise it is a no-op.

Details
Parameters
phoneNumber
User phone number. Must be in E.164 format, which means it must be limited to a maximum of 15 digits and must include a plus sign (+) prefix and country code with no dashes, parentheses, or spaces.

LogEvent

voidLogEvent(stringname,stringparameterName,stringparameterValue)

Log an event with one string parameter.

See also:LogEvent(string, Parameter[])

Details
Parameters
name
Name of the event to log. Should contain 1 to 40 alphanumeric characters or underscores. The name must start with an alphabetic character. Some event names are reserved. See the FirebaseAnalytics.Event properties for the list of reserved event names. The "firebase_" prefix is reserved and should not be used. Note that event names are case-sensitive and that logging two events whose names differ only in case will result in two distinct events.
parameterName
Name of the parameter to log. For more information, seeParameter.
parameterValue
Value of the parameter to log.

LogEvent

voidLogEvent(stringname,stringparameterName,doubleparameterValue)

Log an event with one float parameter.

See also:LogEvent(string, Parameter[])

Details
Parameters
name
Name of the event to log. Should contain 1 to 40 alphanumeric characters or underscores. The name must start with an alphabetic character. Some event names are reserved. See the FirebaseAnalytics.Event properties for the list of reserved event names. The "firebase_" prefix is reserved and should not be used. Note that event names are case-sensitive and that logging two events whose names differ only in case will result in two distinct events.
parameterName
Name of the parameter to log. For more information, seeParameter.
parameterValue
Value of the parameter to log.

LogEvent

voidLogEvent(stringname,stringparameterName,longparameterValue)

Log an event with one 64-bit integer parameter.

See also:LogEvent(string, Parameter[])

Details
Parameters
name
Name of the event to log. Should contain 1 to 40 alphanumeric characters or underscores. The name must start with an alphabetic character. Some event names are reserved. See the FirebaseAnalytics.Event properties for the list of reserved event names. The "firebase_" prefix is reserved and should not be used. Note that event names are case-sensitive and that logging two events whose names differ only in case will result in two distinct events.
parameterName
Name of the parameter to log. For more information, seeParameter.
parameterValue
Value of the parameter to log.

LogEvent

voidLogEvent(stringname,stringparameterName,intparameterValue)

Log an event with one integer parameter (stored as a 64-bit integer).

See also:LogEvent(string, Parameter[])

Details
Parameters
name
Name of the event to log. Should contain 1 to 40 alphanumeric characters or underscores. The name must start with an alphabetic character. Some event names are reserved. See the FirebaseAnalytics.Event properties for the list of reserved event names. The "firebase_" prefix is reserved and should not be used. Note that event names are case-sensitive and that logging two events whose names differ only in case will result in two distinct events.
parameterName
Name of the parameter to log. For more information, seeParameter.
parameterValue
Value of the parameter to log.

LogEvent

voidLogEvent(stringname)

Log an event with no parameters.

See also:LogEvent(string, Parameter[])

Details
Parameters
name
Name of the event to log. Should contain 1 to 40 alphanumeric characters or underscores. The name must start with an alphabetic character. Some event names are reserved. See the FirebaseAnalytics.Event properties for the list of reserved event names. The "firebase_" prefix is reserved and should not be used. Note that event names are case-sensitive and that logging two events whose names differ only in case will result in two distinct events.

LogEvent

voidLogEvent(stringname,paramsParameter[]parameters)

Log an event with associated parameters.

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 in the reference guide via the FirebaseAnalytics.Event* constants, but you may also choose to specify custom event types that are associated with your specific app.

Details
Parameters
name
Name of the event to log. Should contain 1 to 40 alphanumeric characters or underscores. The name must start with an alphabetic character. Some event names are reserved. See the FirebaseAnalytics.Event properties for the list of reserved event names. The "firebase_" prefix is reserved and should not be used. Note that event names are case-sensitive and that logging two events whose names differ only in case will result in two distinct events.
parameters
A parameter array ofParameter instances.

LogEvent

voidLogEvent(stringname,IEnumerable<Parameter>parameters)

Log an event with associated parameters.

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 in the reference guide via the FirebaseAnalytics.Event* constants, but you may also choose to specify custom event types that are associated with your specific app.

Details
Parameters
name
Name of the event to log. Should contain 1 to 40 alphanumeric characters or underscores. The name must start with an alphabetic character. Some event names are reserved. See the FirebaseAnalytics.Event properties for the list of reserved event names. The "firebase_" prefix is reserved and should not be used. Note that event names are case-sensitive and that logging two events whose names differ only in case will result in two distinct events.
parameters
An enumerable list ofParameter instances.

ResetAnalyticsData

voidResetAnalyticsData()

Clears all analytics data for this app from the device and resets the app instance id.

SetAnalyticsCollectionEnabled

voidSetAnalyticsCollectionEnabled(boolenabled)

Sets whether analytics collection is enabled for this app on this device.

This setting is persisted across app sessions. By default it is enabled.

Details
Parameters
enabled
true to enable analytics collection, false to disable.

SetConsent

voidSetConsent(System.Collections.Generic.IDictionary<ConsentType,ConsentStatus>consentSettings)

Sets the applicable end user consent state (e.g., for device identifiers) for this app on this device.

Use the consent map to specify individual consent type values. Settings are persisted across app sessions. By default consent types are set to "granted".

SetDefaultEventParameters

voidSetDefaultEventParameters(paramsParameter[]parameters)

Adds parameters that will be set on every event logged from the SDK.

Adds parameters that will be set on every event logged from the SDK, including automatic ones. The values passed in the parameters bundle will be added to the map of default event parameters. These parameters persist across app runs. They are of lower precedence than event parameters, so if an event parameter and a parameter set using this API have the same name, the value of the event parameter will be used. The same limitations on event parameters apply to default event parameters.

Details
Parameters
parameters
A parameter array ofParameter instances.

SetDefaultEventParameters

voidSetDefaultEventParameters(IEnumerable<Parameter>parameters)

Adds parameters that will be set on every event logged from the SDK.

Adds parameters that will be set on every event logged from the SDK, including automatic ones. The values passed in the parameters bundle will be added to the map of default event parameters. These parameters persist across app runs. They are of lower precedence than event parameters, so if an event parameter and a parameter set using this API have the same name, the value of the event parameter will be used. The same limitations on event parameters apply to default event parameters.

Details
Parameters
parameters
An enumerable list ofParameter instances.

SetSessionTimeoutDuration

voidSetSessionTimeoutDuration(System.TimeSpantimeSpan)

Sets the duration of inactivity that terminates the current session.

Note: The default value is 30 minutes.

Details
Parameters
timeSpan
The duration of inactivity that terminates the current session.

SetUserId

voidSetUserId(stringuserId)

Sets the user ID property.

This feature must be used in accordance withGoogle's Privacy Policy

Details
Parameters
userId
The user ID associated with the user of this app on this device. The user ID must be non-empty and no more than 256 characters long. Setting userId to null removes the user ID.

SetUserProperty

voidSetUserProperty(stringname,stringproperty)

Set a user property to the given value.

Properties associated with a user allow a developer to segment users into groups that are useful to their application. Up to 25 properties can be associated with a user.

Suggested property names are listedAnalytics User Properties (user_property_names.h) but you're not limited to this set. For example, the "gamertype" property could be used to store the type of player where a range of values could be "casual", "mid_core", or "core".

Details
Parameters
name
Name of the user property to set. This must be a combination of letters and digits (matching the regular expression [a-zA-Z0-9] between 1 and 40 characters long starting with a letter [a-zA-Z] character.
property
Value to set the user property to. Set this argument to NULL or nullptr to remove the user property. The value can be between 1 to 100 characters long.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-11-20 UTC.