Firebase. Analytics. FirebaseAnalytics
Summary
Public static attributes | |
|---|---|
EventAdImpression = "ad_impression" | stringAd Impression event. |
EventAddPaymentInfo = "add_payment_info" | stringAdd Payment Info event. |
EventAddShippingInfo = "add_shipping_info" | stringAdd Shipping Info event. |
EventAddToCart = "add_to_cart" | stringE-Commerce Add To Cart event. |
EventAddToWishlist = "add_to_wishlist" | stringE-Commerce Add To Wishlist event. |
EventAppOpen = "app_open" | stringApp Open event. |
EventBeginCheckout = "begin_checkout" | stringE-Commerce Begin Checkout event. |
EventCampaignDetails = "campaign_details" | stringCampaign Detail event. |
EventEarnVirtualCurrency = "earn_virtual_currency" | stringEarn Virtual Currency event. |
EventGenerateLead = "generate_lead" | stringGenerate Lead event. |
EventInAppPurchase = "in_app_purchase" | stringIn-App Purchase event. |
EventJoinGroup = "join_group" | stringJoin Group event. |
EventLevelEnd = "level_end" | stringLevel End event. |
EventLevelStart = "level_start" | stringLevel Start event. |
EventLevelUp = "level_up" | stringLevel Up event. |
EventLogin = "login" | stringLogin event. |
EventPostScore = "post_score" | stringPost Score event. |
EventPurchase = "purchase" | stringE-Commerce Purchase event. |
EventRefund = "refund" | stringE-Commerce Refund event. |
EventRemoveFromCart = "remove_from_cart" | stringE-Commerce Remove from Cart event. |
EventScreenView = "screen_view" | stringScreen View event. |
EventSearch = "search" | stringSearch event. |
EventSelectContent = "select_content" | stringSelect Content event. |
EventSelectItem = "select_item" | stringSelect Item event. |
EventSelectPromotion = "select_promotion" | stringSelect promotion event. |
EventShare = "share" | stringShare event. |
EventSignUp = "sign_up" | stringSign Up event. |
EventSpendVirtualCurrency = "spend_virtual_currency" | stringSpend Virtual Currency event. |
EventTutorialBegin = "tutorial_begin" | stringTutorial Begin event. |
EventTutorialComplete = "tutorial_complete" | stringTutorial End event. |
EventUnlockAchievement = "unlock_achievement" | stringUnlock Achievement event. |
EventViewCart = "view_cart" | stringE-commerce View Cart event. |
EventViewItem = "view_item" | stringView Item event. |
EventViewItemList = "view_item_list" | stringView Item List event. |
EventViewPromotion = "view_promotion" | stringView Promotion event. |
EventViewSearchResults = "view_search_results" | stringView Search Results event. |
ParameterAchievementID = "achievement_id" | stringGame achievement ID (String). |
ParameterAdFormat = "ad_format" | stringThe ad format (e.g. |
ParameterAdNetworkClickID = "aclid" | stringAd Network Click ID (String). |
ParameterAdPlatform = "ad_platform" | stringThe ad platform (e.g. |
ParameterAdSource = "ad_source" | stringThe ad source (e.g. |
ParameterAdUnitName = "ad_unit_name" | stringThe ad unit name (e.g. |
ParameterAffiliation = "affiliation" | stringA product affiliation to designate a supplying company or brick and mortar store location (String). |
ParameterCP1 = "cp1" | stringCampaign custom parameter (String). |
ParameterCampaign = "campaign" | stringThe individual campaign name, slogan, promo code, etc. |
ParameterCampaignID = "campaign_id" | stringCampaign ID (String). |
ParameterCharacter = "character" | stringCharacter used in game (String). |
ParameterContent = "content" | stringCampaign content (String). |
ParameterContentType = "content_type" | stringType of content selected (String). |
ParameterCoupon = "coupon" | stringCoupon code used for a purchase (String). |
ParameterCreativeFormat = "creative_format" | stringCreative Format (String). |
ParameterCreativeName = "creative_name" | stringThe name of a creative used in a promotional spot (String). |
ParameterCreativeSlot = "creative_slot" | stringThe name of a creative slot (String). |
ParameterCurrency = "currency" | stringCurrency of the purchase or items associated with the event, in 3-letterISO_4217 format (String). |
ParameterDestination = "destination" | stringFlight or Travel destination (String). |
ParameterDiscount = "discount" | stringMonetary value of discount associated with a purchase (Double). |
ParameterEndDate = "end_date" | stringThe arrival date, check-out date or rental end date for the item. |
ParameterExtendSession = "extend_session" | stringIndicates 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" | stringFlight number for travel events (String). |
ParameterFreeTrial = "free_trial" | stringIndicates if the user is on a free trial of a subscription. |
ParameterGroupID = "group_id" | stringGroup/clan/guild ID (String). |
ParameterIndex = "index" | stringThe index of the item in a list (Int). |
ParameterItemBrand = "item_brand" | stringItem brand (String). |
ParameterItemCategory = "item_category" | stringItem category (context-specific) (String). |
ParameterItemCategory2 = "item_category2" | stringItem Category (context-specific) (String). |
ParameterItemCategory3 = "item_category3" | stringItem Category (context-specific) (String). |
ParameterItemCategory4 = "item_category4" | stringItem Category (context-specific) (String). |
ParameterItemCategory5 = "item_category5" | stringItem Category (context-specific) (String). |
ParameterItemID = "item_id" | stringItem ID (context-specific) (String). |
ParameterItemListID = "item_list_id" | stringThe ID of the list in which the item was presented to the user (String). |
ParameterItemListName = "item_list_name" | stringThe name of the list in which the item was presented to the user (String). |
ParameterItemName = "item_name" | stringItem Name (context-specific) (String). |
ParameterItemVariant = "item_variant" | stringItem variant (String). |
ParameterItems = "items" | stringThe list of items involved in the transaction expressed as [[String: Any]]. |
ParameterLevel = "level" | stringLevel in game (Int). |
ParameterLevelName = "level_name" | stringThe name of a level in a game (String). |
ParameterLocation = "location" | stringLocation (String). |
ParameterLocationID = "location_id" | stringThe location associated with the event. |
ParameterMarketingTactic = "marketing_tactic" | stringMarketing Tactic (String). |
ParameterMedium = "medium" | stringThe advertising or marParameter(keting, cpc, banner, email), push. |
ParameterMethod = "method" | stringA 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" | stringNumber of nights staying at hotel (Int). |
ParameterNumberOfPassengers = "number_of_passengers" | stringNumber of passengers traveling (Int). |
ParameterNumberOfRooms = "number_of_rooms" | stringNumber of rooms for travel events (Int). |
ParameterOrigin = "origin" | stringFlight or Travel origin (String). |
ParameterPaymentType = "payment_type" | stringThe chosen method of payment (String). |
ParameterPrice = "price" | stringPurchase price (Double). |
ParameterPriceIsDiscounted = "price_is_discounted" | stringIndicates if an item's price is discounted. |
ParameterProductID = "product_id" | stringThe ID of a product (String). |
ParameterProductName = "product_name" | stringThe name of a product (String). |
ParameterPromotionID = "promotion_id" | stringThe ID of a product promotion (String). |
ParameterPromotionName = "promotion_name" | stringThe name of a product promotion (String). |
ParameterQuantity = "quantity" | stringPurchase quantity (Int). |
ParameterScore = "score" | stringScore in game (Int). |
ParameterScreenClass = "screen_class" | stringCurrent screen class, such as the class name of the UIViewController, logged with screen_view event and added to every event (String). |
ParameterScreenName = "screen_name" | stringCurrent screen name, such as the name of the UIViewController, logged with screen_view event and added to every event (String). |
ParameterSearchTerm = "search_term" | stringThe search string/keywords used (String). |
ParameterShipping = "shipping" | stringShipping cost associated with a transaction (Double). |
ParameterShippingTier = "shipping_tier" | stringThe shipping tier (e.g. |
ParameterSource = "source" | stringThe origin of your traffic, such as an Ad network (for example, google) or partner (urban airship). |
ParameterSourcePlatform = "source_platform" | stringSource Platform (String). |
ParameterStartDate = "start_date" | stringThe departure date, check-in date or rental start date for the item. |
ParameterSubscription = "subscription" | stringIndicates if the purchase is a subscription. |
ParameterSuccess = "success" | stringThe result of an operation. |
ParameterTax = "tax" | stringTax cost associated with a transaction (Double). |
ParameterTerm = "term" | stringIf you're manually tagging keyword campaigns, you should use utm_term to specify the keyword (String). |
ParameterTransactionID = "transaction_id" | stringThe unique identifier of a transaction (String). |
ParameterTravelClass = "travel_class" | stringTravel class (String). |
ParameterValue = "value" | stringA context-specific numeric value which is accumulated automatically for each event type. |
ParameterVirtualCurrencyName = "virtual_currency_name" | stringName of virtual currency type (String). |
UserPropertyAllowAdPersonalizationSignals = "allow_personalized_ads" | stringIndicates whether events logged by GoogleAnalytics can be used to personalize ads for the user. |
UserPropertySignUpMethod = "sign_up_method" | stringThe 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) | voidInitiates on-device conversion measurement given a user email address on iOS and tvOS (no-op on Android). |
InitiateOnDeviceConversionMeasurementWithHashedEmailAddress(byte[] hashedEmailAddress) | voidInitiates on-device conversion measurement given a sha256-hashed user email address. |
InitiateOnDeviceConversionMeasurementWithHashedPhoneNumber(byte[] hashedPhoneNumber) | voidInitiates on-device conversion measurement given a sha256-hashed phone number in E.164 format. |
InitiateOnDeviceConversionMeasurementWithPhoneNumber(string phoneNumber) | voidInitiates 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) | voidLog an event with one string parameter. |
LogEvent(string name, string parameterName, double parameterValue) | voidLog an event with one float parameter. |
LogEvent(string name, string parameterName, long parameterValue) | voidLog an event with one 64-bit integer parameter. |
LogEvent(string name, string parameterName, int parameterValue) | voidLog an event with one integer parameter (stored as a 64-bit integer). |
LogEvent(string name) | voidLog an event with no parameters. |
LogEvent(string name, paramsParameter[] parameters) | voidLog an event with associated parameters. |
LogEvent(string name, IEnumerable<Parameter > parameters) | voidLog an event with associated parameters. |
ResetAnalyticsData() | voidClears all analytics data for this app from the device and resets the app instance id. |
SetAnalyticsCollectionEnabled(bool enabled) | voidSets whether analytics collection is enabled for this app on this device. |
SetConsent(System.Collections.Generic.IDictionary<ConsentType,ConsentStatus > consentSettings) | voidSets the applicable end user consent state (e.g., for device identifiers) for this app on this device. |
SetDefaultEventParameters(paramsParameter[] parameters) | voidAdds parameters that will be set on every event logged from the SDK. |
SetDefaultEventParameters(IEnumerable<Parameter > parameters) | voidAdds parameters that will be set on every event logged from the SDK. |
SetSessionTimeoutDuration(System.TimeSpan timeSpan) | voidSets the duration of inactivity that terminates the current session. |
SetUserId(string userId) | voidSets the user ID property. |
SetUserProperty(string name, string property) | voidSet 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 bookingsAnalyticsParameterNumberOfRooms(Int) (optional) for hotel bookingsAnalyticsParameterNumberOfPassengers(Int) (optional) for travel bookingsAnalyticsParameterOrigin(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 |
|
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 |
|
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 |
|
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 |
|
LogEvent
voidLogEvent(stringname,stringparameterName,stringparameterValue)
Log an event with one string parameter.
See also:LogEvent(string, Parameter[])
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
LogEvent
voidLogEvent(stringname,stringparameterName,doubleparameterValue)
Log an event with one float parameter.
See also:LogEvent(string, Parameter[])
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
LogEvent
voidLogEvent(stringname,stringparameterName,longparameterValue)
Log an event with one 64-bit integer parameter.
See also:LogEvent(string, Parameter[])
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
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 |
|
LogEvent
voidLogEvent(stringname)
Log an event with no parameters.
See also:LogEvent(string, Parameter[])
| Details | |||
|---|---|---|---|
| Parameters |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
SetSessionTimeoutDuration
voidSetSessionTimeoutDuration(System.TimeSpantimeSpan)
Sets the duration of inactivity that terminates the current session.
Note: The default value is 30 minutes.
| Details | |||
|---|---|---|---|
| Parameters |
|
SetUserId
voidSetUserId(stringuserId)
Sets the user ID property.
This feature must be used in accordance withGoogle's Privacy Policy
| Details | |||
|---|---|---|---|
| Parameters |
|
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 |
|
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.