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.
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-letter ISO_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).
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).
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.
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 Google Analytics can be used to personalize ads for the user.
UserPropertySignUpMethod = "sign_up_method"
string
The method used to sign in.

Properties

ParameterGroupId
static string
Deprecated. Use ParameterGroupID instead

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, params 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.
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

string EventAdImpression =
    "ad_impression"

Ad Impression event.

This event signifies when a user sees an ad impression. Note: If you supply the AnalyticsParameterValue parameter, you must also supply the AnalyticsParameterCurrency 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

string EventAddPaymentInfo =
    "add_payment_info"

Add Payment Info event.

This event signifies that a user has submitted their payment information. Note: If you supply the AnalyticsParameterValue parameter, you must also supply the AnalyticsParameterCurrency 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

string EventAddShippingInfo =
    "add_shipping_info"

Add Shipping Info event.

This event signifies that a user has submitted their shipping information. Note: If you supply the AnalyticsParameterValue parameter, you must also supply the AnalyticsParameterCurrency 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

string EventAddToCart = "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 with AnalyticsEventPurchase to gauge the effectiveness of your checParameter(kout, If you supply the AnalyticsParameterValue parameter), you must also supply the AnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

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

EventAddToWishlist

string EventAddToWishlist =
    "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 the AnalyticsParameterValue parameter, you must also supply the AnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

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

EventAppOpen

string EventAppOpen = "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

string EventBeginCheckout =
    "begin_checkout"

E-Commerce Begin Checkout event.

This event signifies that a user has begun the process of checking out. Add this event to a funnel with your AnalyticsEventPurchase event to gauge the effectiveness of your checkout process. Note: If you supply the AnalyticsParameterValue parameter, you must also supply the AnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

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

EventCampaignDetails

string EventCampaignDetails =
    "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

string EventEarnVirtualCurrency = "earn_virtual_currency"

Earn Virtual Currency event.

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

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

EventGenerateLead

string EventGenerateLead =
    "generate_lead"

Generate Lead event.

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

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

EventJoinGroup

string EventJoinGroup = "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

string EventLevelEnd = "level_end"

Level End event.

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

  • AnalyticsParameterLevelName (String)
  • AnalyticsParameterSuccess (String)

EventLevelStart

string EventLevelStart = "level_start"

Level Start event.

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

  • AnalyticsParameterLevelName (String)

EventLevelUp

string EventLevelUp = "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

string EventLogin = "login"

Login event.

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

EventPostScore

string EventPostScore = "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

string EventPurchase = "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 the AnalyticsParameterValue parameter, you must also supply the AnalyticsParameterCurrency 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

string EventRefund = "refund"

E-Commerce Refund event.

This event signifies that a refund was issued. Note: If you supply the AnalyticsParameterValue parameter, you must also supply the AnalyticsParameterCurrency 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

string EventRemoveFromCart =
    "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 the AnalyticsParameterValue parameter, you must also supply the AnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

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

EventScreenView

string EventScreenView = "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

string EventSearch = "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

string EventSelectContent =
    "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

string EventSelectItem = "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

string EventSelectPromotion =
    "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

string EventShare = "share"

Share event.

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

  • AnalyticsParameterContentType (String)
  • AnalyticsParameterItemID (String)

EventSignUp

string EventSignUp = "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

string EventSpendVirtualCurrency = "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

string EventTutorialBegin =
    "tutorial_begin"

Tutorial Begin event.

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

EventTutorialComplete

string EventTutorialComplete =
    "tutorial_complete"

Tutorial End event.

Use this event to signify the user's completion of your app's on-boarding process. Add this to a funnel with AnalyticsEventTutorialBegin to gauge the completion rate of your on-boarding process.

EventUnlockAchievement

string EventUnlockAchievement =
    "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

string EventViewCart = "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 the AnalyticsParameterValue parameter, you must also supply the AnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

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

EventViewItem

string EventViewItem = "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 the AnalyticsParameterValue parameter, you must also supply the AnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

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

EventViewItemList

string EventViewItemList =
    "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

string EventViewPromotion =
    "view_promotion"

View Promotion event.

This event signifies that a promotion was shown to a user. Add this event to a funnel with the AnalyticsEventAddToCart and AnalyticsEventPurchase 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

string EventViewSearchResults =
    "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

string ParameterAchievementID =
    "achievement_id"

Game achievement ID (String).

let params = [
  AnalyticsParameterAchievementID : "10_matches_won",
  // ...
]

ParameterAdFormat

string ParameterAdFormat =
    "ad_format"

The ad format (e.g.

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

let params = [
  AnalyticsParameterAdFormat : "Banner",
  // ...
]

ParameterAdNetworkClickID

string ParameterAdNetworkClickID = "aclid"

Ad Network Click ID (String).

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

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

ParameterAdPlatform

string ParameterAdPlatform =
    "ad_platform"

The ad platform (e.g.

MoPub, IronSource) (String).

let params = [
  AnalyticsParameterAdPlatform : "MoPub",
  // ...
]

ParameterAdSource

string ParameterAdSource =
    "ad_source"

The ad source (e.g.

AdColony) (String).

let params = [
  AnalyticsParameterAdSource : "AdColony",
  // ...
]

ParameterAdUnitName

string ParameterAdUnitName =
    "ad_unit_name"

The ad unit name (e.g.

Banner_03) (String).

let params = [
  AnalyticsParameterAdUnitName : "Banner_03",
  // ...
]

ParameterAffiliation

string ParameterAffiliation =
    "affiliation"

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

let params = [
  AnalyticsParameterAffiliation : "Google Store",
  // ...
]

ParameterCP1

string ParameterCP1 = "cp1"

Campaign custom parameter (String).

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

let params = [
  AnalyticsParameterCP1 : "custom_data",
  // ...
]

ParameterCampaign

string ParameterCampaign =
    "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).

let params = [
  AnalyticsParameterCampaign : "winter_promotion",
  // ...
]

ParameterCampaignID

string ParameterCampaignID =
    "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.

let params = [
  AnalyticsParameterCampaignID : "7877652710",
  // ...
]

ParameterCharacter

string ParameterCharacter =
    "character"

Character used in game (String).

let params = [
  AnalyticsParameterCharacter : "beat_boss",
  // ...
]

ParameterContent

string ParameterContent = "content"

Campaign content (String).

ParameterContentType

string ParameterContentType =
    "content_type"

Type of content selected (String).

let params = [
  AnalyticsParameterContentType : "news article",
  // ...
]

ParameterCoupon

string ParameterCoupon = "coupon"

Coupon code used for a purchase (String).

let params = [
  AnalyticsParameterCoupon : "SUMMER_FUN",
  // ...
]

ParameterCreativeFormat

string ParameterCreativeFormat =
    "creative_format"

Creative Format (String).

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

let params = [
  AnalyticsParameterCreativeFormat : "display",
  // ...
]

ParameterCreativeName

string ParameterCreativeName =
    "creative_name"

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

let params = [
  AnalyticsParameterCreativeName : "Summer Sale",
  // ...
]

ParameterCreativeSlot

string ParameterCreativeSlot =
    "creative_slot"

The name of a creative slot (String).

let params = [
  AnalyticsParameterCreativeSlot : "summer_banner2",
  // ...
]

ParameterCurrency

string ParameterCurrency =
    "currency"

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

let params = [
  AnalyticsParameterCurrency : "USD",
  // ...
]

ParameterDestination

string ParameterDestination =
    "destination"

Flight or Travel destination (String).

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

ParameterDiscount

string ParameterDiscount =
    "discount"

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

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

ParameterEndDate

string ParameterEndDate = "end_date"

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

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

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

ParameterExtendSession

string ParameterExtendSession =
    "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.

let params = [
  AnalyticsParameterExtendSession : 1,
  // ...
]

ParameterFlightNumber

string ParameterFlightNumber =
    "flight_number"

Flight number for travel events (String).

let params = [
  AnalyticsParameterFlightNumber : "ZZ800",
  // ...
]

ParameterGroupID

string ParameterGroupID = "group_id"

Group/clan/guild ID (String).

let params = [
  AnalyticsParameterGroupID : "g1",
  // ...
]

ParameterIndex

string ParameterIndex = "index"

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

let params = [
  AnalyticsParameterIndex : 5,
  // ...
]

ParameterItemBrand

string ParameterItemBrand =
    "item_brand"

Item brand (String).

let params = [
  AnalyticsParameterItemBrand : "Google",
  // ...
]

ParameterItemCategory

string ParameterItemCategory =
    "item_category"

Item category (context-specific) (String).

let params = [
  AnalyticsParameterItemCategory : "pants",
  // ...
]

ParameterItemCategory2

string ParameterItemCategory2 =
    "item_category2"

Item Category (context-specific) (String).

let params = [
  AnalyticsParameterItemCategory2 : "pants",
  // ...
]

ParameterItemCategory3

string ParameterItemCategory3 =
    "item_category3"

Item Category (context-specific) (String).

let params = [
  AnalyticsParameterItemCategory3 : "pants",
  // ...
]

ParameterItemCategory4

string ParameterItemCategory4 =
    "item_category4"

Item Category (context-specific) (String).

let params = [
  AnalyticsParameterItemCategory4 : "pants",
  // ...
]

ParameterItemCategory5

string ParameterItemCategory5 =
    "item_category5"

Item Category (context-specific) (String).

let params = [
  AnalyticsParameterItemCategory5 : "pants",
  // ...
]

ParameterItemID

string ParameterItemID = "item_id"

Item ID (context-specific) (String).

let params = [
  AnalyticsParameterItemID : "SKU_12345",
  // ...
]

ParameterItemListID

string ParameterItemListID =
    "item_list_id"

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

let params = [
  AnalyticsParameterItemListID : "ABC123",
  // ...
]

ParameterItemListName

string ParameterItemListName =
    "item_list_name"

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

let params = [
  AnalyticsParameterItemListName : "Related products",
  // ...
]

ParameterItemName

string ParameterItemName =
    "item_name"

Item Name (context-specific) (String).

let params = [
  AnalyticsParameterItemName : "jeggings",
  // ...
]

ParameterItemVariant

string ParameterItemVariant =
    "item_variant"

Item variant (String).

let params = [
  AnalyticsParameterItemVariant : "Black",
  // ...
]

ParameterItems

string ParameterItems = "items"

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

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

ParameterLevel

string ParameterLevel = "level"

Level in game (Int).

let params = [
  AnalyticsParameterLevel : 42,
  // ...
]

ParameterLevelName

string ParameterLevelName =
    "level_name"

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

let params = [
  AnalyticsParameterLevelName : "room_1",
  // ...
]

ParameterLocation

string ParameterLocation =
    "location"

Location (String).

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

let params = [
  AnalyticsParameterLocation : "ChIJiyj437sx3YAR9kUWC8QkLzQ",
  // ...
]

ParameterLocationID

string ParameterLocationID =
    "location_id"

The location associated with the event.

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

let params = [
  AnalyticsParameterLocationID : "ChIJiyj437sx3YAR9kUWC8QkLzQ",
  // ...
]

ParameterMarketingTactic

string ParameterMarketingTactic = "marketing_tactic"

Marketing Tactic (String).

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

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

ParameterMedium

string ParameterMedium = "medium"

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

Highly recommended (String).

let params = [
  AnalyticsParameterMedium : "email",
  // ...
]

ParameterMethod

string ParameterMethod = "method"

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

(String).

let params = [
  AnalyticsParameterMethod : "google",
  // ...
]

ParameterNumberOfNights

string ParameterNumberOfNights = "number_of_nights"

Number of nights staying at hotel (Int).

let params = [
  AnalyticsParameterNumberOfNights : 3,
  // ...
]

ParameterNumberOfPassengers

string ParameterNumberOfPassengers = "number_of_passengers"

Number of passengers traveling (Int).

let params = [
  AnalyticsParameterNumberOfPassengers : 11,
  // ...
]

ParameterNumberOfRooms

string ParameterNumberOfRooms =
    "number_of_rooms"

Number of rooms for travel events (Int).

let params = [
  AnalyticsParameterNumberOfRooms : 2,
  // ...
]

ParameterOrigin

string ParameterOrigin = "origin"

Flight or Travel origin (String).

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

ParameterPaymentType

string ParameterPaymentType =
    "payment_type"

The chosen method of payment (String).

let params = [
  AnalyticsParameterPaymentType : "Visa",
  // ...
]

ParameterPrice

string ParameterPrice = "price"

Purchase price (Double).

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

ParameterPromotionID

string ParameterPromotionID =
    "promotion_id"

The ID of a product promotion (String).

let params = [
  AnalyticsParameterPromotionID : "ABC123",
  // ...
]

ParameterPromotionName

string ParameterPromotionName =
    "promotion_name"

The name of a product promotion (String).

let params = [
  AnalyticsParameterPromotionName : "Summer Sale",
  // ...
]

ParameterQuantity

string ParameterQuantity =
    "quantity"

Purchase quantity (Int).

let params = [
  AnalyticsParameterQuantity : 1,
  // ...
]

ParameterScore

string ParameterScore = "score"

Score in game (Int).

let params = [
  AnalyticsParameterScore : 4200,
  // ...
]

ParameterScreenClass

string ParameterScreenClass =
    "screen_class"

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

let params = [
  AnalyticsParameterScreenClass : "LoginViewController",
  // ...
]

ParameterScreenName

string ParameterScreenName =
    "screen_name"

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

let params = [
  AnalyticsParameterScreenName : "LoginView",
  // ...
]

ParameterSearchTerm

string ParameterSearchTerm =
    "search_term"

The search string/keywords used (String).

let params = [
  AnalyticsParameterSearchTerm : "periodic table",
  // ...
]

ParameterShipping

string ParameterShipping =
    "shipping"

Shipping cost associated with a transaction (Double).

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

ParameterShippingTier

string ParameterShippingTier =
    "shipping_tier"

The shipping tier (e.g.

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

let params = [
  AnalyticsParameterShippingTier : "Ground",
  // ...
]

ParameterSource

string ParameterSource = "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).

let params = [
  AnalyticsParameterSource : "InMobi",
  // ...
]

ParameterSourcePlatform

string ParameterSourcePlatform =
    "source_platform"

Source Platform (String).

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

let params = [
  AnalyticsParameterSourcePlatform : "sa360",
  // ...
]

ParameterStartDate

string ParameterStartDate =
    "start_date"

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

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

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

ParameterSuccess

string ParameterSuccess = "success"

The result of an operation.

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

let params = [
  AnalyticsParameterSuccess : 1,
  // ...
]

ParameterTax

string ParameterTax = "tax"

Tax cost associated with a transaction (Double).

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

ParameterTerm

string ParameterTerm = "term"

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

let params = [
  AnalyticsParameterTerm : "game",
  // ...
]

ParameterTransactionID

string ParameterTransactionID =
    "transaction_id"

The unique identifier of a transaction (String).

let params = [
  AnalyticsParameterTransactionID : "T12345",
  // ...
]

ParameterTravelClass

string ParameterTravelClass =
    "travel_class"

Travel class (String).

let params = [
  AnalyticsParameterTravelClass : "business",
  // ...
]

ParameterValue

string ParameterValue = "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 as AnalyticsEventAddToCart) should be supplied using Double and must be accompanied by a AnalyticsParameterCurrency 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 corresponding AnalyticsParameterCurrency parameter, or supplying an invalid currency code for conversion events will cause that conversion to be omitted from reporting.

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

ParameterVirtualCurrencyName

string ParameterVirtualCurrencyName = "virtual_currency_name"

Name of virtual currency type (String).

let params = [
  AnalyticsParameterVirtualCurrencyName : "virtual_currency_name",
  // ...
]

UserPropertyAllowAdPersonalizationSignals

string UserPropertyAllowAdPersonalizationSignals = "allow_personalized_ads"

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

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

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

UserPropertySignUpMethod

string UserPropertySignUpMethod = "sign_up_method"

The method used to sign in.

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

Properties

ParameterGroupId

static string ParameterGroupId

Deprecated. Use ParameterGroupID instead

Public static functions

GetAnalyticsInstanceIdAsync

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

Get the instance ID from the analytics service.

Details
Returns
A Task with the Analytics 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 to Analytics collection disabled, or if the app session was expired.

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

InitiateOnDeviceConversionMeasurementWithEmailAddress

void InitiateOnDeviceConversionMeasurementWithEmailAddress(
  string emailAddress
)

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

void InitiateOnDeviceConversionMeasurementWithHashedEmailAddress(
  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 at https://firebase.google.com/docs/tutorials/ads-ios-on-device-measurement/step-3.

InitiateOnDeviceConversionMeasurementWithHashedPhoneNumber

void InitiateOnDeviceConversionMeasurementWithHashedPhoneNumber(
  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 at https://firebase.google.com/docs/tutorials/ads-ios-on-device-measurement/step-3.

InitiateOnDeviceConversionMeasurementWithPhoneNumber

void InitiateOnDeviceConversionMeasurementWithPhoneNumber(
  string phoneNumber
)

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

void LogEvent(
  string name,
  string parameterName,
  string parameterValue
)

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, see Parameter.
parameterValue
Value of the parameter to log.

LogEvent

void LogEvent(
  string name,
  string parameterName,
  double parameterValue
)

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, see Parameter.
parameterValue
Value of the parameter to log.

LogEvent

void LogEvent(
  string name,
  string parameterName,
  long parameterValue
)

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, see Parameter.
parameterValue
Value of the parameter to log.

LogEvent

void LogEvent(
  string name,
  string parameterName,
  int parameterValue
)

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, see Parameter.
parameterValue
Value of the parameter to log.

LogEvent

void LogEvent(
  string name
)

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

void LogEvent(
  string name,
  params 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
A parameter array of Parameter instances.

ResetAnalyticsData

void ResetAnalyticsData()

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

SetAnalyticsCollectionEnabled

void SetAnalyticsCollectionEnabled(
  bool enabled
)

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

void SetConsent(
  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".

SetSessionTimeoutDuration

void SetSessionTimeoutDuration(
  System.TimeSpan timeSpan
)

Sets the duration of inactivity that terminates the current session.

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

SetUserId

void SetUserId(
  string userId
)

Sets the user ID property.

This feature must be used in accordance with Google'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

void SetUserProperty(
  string name,
  string property
)

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 listed Analytics 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.