Constants

The following constants are available globally.

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

    Declaration

    Swift

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

    • kFIRParameterQuantity (signed 64-bit integer as NSNumber)
    • kFIRParameterItemID (NSString)
    • kFIRParameterItemName (NSString)
    • kFIRParameterItemCategory (NSString)
    • kFIRParameterItemLocationID (NSString) (optional)
    • kFIRParameterPrice (double as NSNumber) (optional)
    • kFIRParameterCurrency (NSString) (optional)
    • kFIRParameterValue (double as NSNumber) (optional)
    • kFIRParameterOrigin (NSString) (optional)
    • kFIRParameterDestination (NSString) (optional)
    • kFIRParameterStartDate (NSString) (optional)
    • kFIRParameterEndDate (NSString) (optional)

    Declaration

    Swift

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

    • kFIRParameterQuantity (signed 64-bit integer as NSNumber)
    • kFIRParameterItemID (NSString)
    • kFIRParameterItemName (NSString)
    • kFIRParameterItemCategory (NSString)
    • kFIRParameterItemLocationID (NSString) (optional)
    • kFIRParameterPrice (double as NSNumber) (optional)
    • kFIRParameterCurrency (NSString) (optional)
    • kFIRParameterValue (double as NSNumber) (optional)

    Declaration

    Swift

    let AnalyticsEventAddToWishlist: String
  • 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.

    Declaration

    Swift

    let AnalyticsEventAppOpen: String
  • 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 kFIREventEcommercePurchase event to gauge the effectiveness of your checkout process. Note: If you supply the kFIRParameterValue parameter, you must also supply the kFIRParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

    • kFIRParameterValue (double as NSNumber) (optional)
    • kFIRParameterCurrency (NSString) (optional)
    • kFIRParameterTransactionID (NSString) (optional)
    • kFIRParameterStartDate (NSString) (optional)
    • kFIRParameterEndDate (NSString) (optional)
    • kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for hotel bookings
    • kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for hotel bookings
    • kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional) for travel bookings
    • kFIRParameterOrigin (NSString) (optional)
    • kFIRParameterDestination (NSString) (optional)
    • kFIRParameterTravelClass (NSString) (optional) for travel bookings

    Declaration

    Swift

    let AnalyticsEventBeginCheckout: String
  • 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 kFIRParameterSource, kFIRParameterMedium or kFIRParameterCampaign. Params:

    • kFIRParameterSource (NSString)
    • kFIRParameterMedium (NSString)
    • kFIRParameterCampaign (NSString)
    • kFIRParameterTerm (NSString) (optional)
    • kFIRParameterContent (NSString) (optional)
    • kFIRParameterAdNetworkClickID (NSString) (optional)
    • kFIRParameterCP1 (NSString) (optional)

    Declaration

    Swift

    let AnalyticsEventCampaignDetails: String
  • Checkout progress. Params:

    • kFIRParameterCheckoutStep (unsigned 64-bit integer as NSNumber)
    • kFIRParameterCheckoutOption (NSString) (optional)

    Declaration

    Swift

    let AnalyticsEventCheckoutProgress: String
  • Earn Virtual Currency event. This event tracks the awarding of virtual currency in your app. Log this along with kFIREventSpendVirtualCurrency to better understand your virtual economy. Params:

    • kFIRParameterVirtualCurrencyName (NSString)
    • kFIRParameterValue (signed 64-bit integer or double as NSNumber)

    Declaration

    Swift

    let AnalyticsEventEarnVirtualCurrency: String
  • E-Commerce Purchase event. This event signifies that an item was purchased by a user. Note: This is different from the in-app purchase event, which is reported automatically for App Store-based apps. Note: If you supply the kFIRParameterValue parameter, you must also supply the kFIRParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

    • kFIRParameterCurrency (NSString) (optional)
    • kFIRParameterValue (double as NSNumber) (optional)
    • kFIRParameterTransactionID (NSString) (optional)
    • kFIRParameterTax (double as NSNumber) (optional)
    • kFIRParameterShipping (double as NSNumber) (optional)
    • kFIRParameterCoupon (NSString) (optional)
    • kFIRParameterLocation (NSString) (optional)
    • kFIRParameterStartDate (NSString) (optional)
    • kFIRParameterEndDate (NSString) (optional)
    • kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for hotel bookings
    • kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for hotel bookings
    • kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional) for travel bookings
    • kFIRParameterOrigin (NSString) (optional)
    • kFIRParameterDestination (NSString) (optional)
    • kFIRParameterTravelClass (NSString) (optional) for travel bookings

    Declaration

    Swift

    let AnalyticsEventEcommercePurchase: String
  • 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 kFIRParameterValue parameter, you must also supply the kFIRParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

    • kFIRParameterCurrency (NSString) (optional)
    • kFIRParameterValue (double as NSNumber) (optional)

    Declaration

    Swift

    let AnalyticsEventGenerateLead: String
  • 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:

    • kFIRParameterGroupID (NSString)

    Declaration

    Swift

    let AnalyticsEventJoinGroup: String
  • 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:

    • kFIRParameterLevel (signed 64-bit integer as NSNumber)
    • kFIRParameterCharacter (NSString) (optional)

    Declaration

    Swift

    let AnalyticsEventLevelUp: String
  • Login event. Apps with a login feature can report this event to signify that a user has logged in.

    Declaration

    Swift

    let AnalyticsEventLogin: String
  • 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:

    • kFIRParameterScore (signed 64-bit integer as NSNumber)
    • kFIRParameterLevel (signed 64-bit integer as NSNumber) (optional)
    • kFIRParameterCharacter (NSString) (optional)

    Declaration

    Swift

    let AnalyticsEventPostScore: String
  • Present Offer event. This event signifies that the app has presented a purchase offer to a user. Add this event to a funnel with the kFIREventAddToCart and kFIREventEcommercePurchase to gauge your conversion process. Note: If you supply the kFIRParameterValue parameter, you must also supply the kFIRParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

    • kFIRParameterQuantity (signed 64-bit integer as NSNumber)
    • kFIRParameterItemID (NSString)
    • kFIRParameterItemName (NSString)
    • kFIRParameterItemCategory (NSString)
    • kFIRParameterItemLocationID (NSString) (optional)
    • kFIRParameterPrice (double as NSNumber) (optional)
    • kFIRParameterCurrency (NSString) (optional)
    • kFIRParameterValue (double as NSNumber) (optional)

    Declaration

    Swift

    let AnalyticsEventPresentOffer: String
  • E-Commerce Purchase Refund event. This event signifies that an item purchase was refunded. Note: If you supply the kFIRParameterValue parameter, you must also supply the kFIRParameterCurrency parameter so that revenue metrics can be computed accurately. Params:

    • kFIRParameterCurrency (NSString) (optional)
    • kFIRParameterValue (double as NSNumber) (optional)
    • kFIRParameterTransactionID (NSString) (optional)

    Declaration

    Swift

    let AnalyticsEventPurchaseRefund: String
  • Remove from cart event. Params:

    • kFIRParameterQuantity (signed 64-bit integer as NSNumber)
    • kFIRParameterItemID (NSString)
    • kFIRParameterItemName (NSString)
    • kFIRParameterItemCategory (NSString)
    • kFIRParameterItemLocationID (NSString) (optional)
    • kFIRParameterPrice (double as NSNumber) (optional)
    • kFIRParameterCurrency (NSString) (optional)
    • kFIRParameterValue (double as NSNumber) (optional)
    • kFIRParameterOrigin (NSString) (optional)
    • kFIRParameterDestination (NSString) (optional)
    • kFIRParameterStartDate (NSString) (optional)
    • kFIRParameterEndDate (NSString) (optional)

    Declaration

    Swift

    let AnalyticsEventRemoveFromCart: String
  • 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:

    • kFIRParameterSearchTerm (NSString)
    • kFIRParameterStartDate (NSString) (optional)
    • kFIRParameterEndDate (NSString) (optional)
    • kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for hotel bookings
    • kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for hotel bookings
    • kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional) for travel bookings
    • kFIRParameterOrigin (NSString) (optional)
    • kFIRParameterDestination (NSString) (optional)
    • kFIRParameterTravelClass (NSString) (optional) for travel bookings

    Declaration

    Swift

    let AnalyticsEventSearch: String
  • 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:

    • kFIRParameterContentType (NSString)
    • kFIRParameterItemID (NSString)

    Declaration

    Swift

    let AnalyticsEventSelectContent: String
  • Set checkout option. Params:

    • kFIRParameterCheckoutStep (unsigned 64-bit integer as NSNumber)
    • kFIRParameterCheckoutOption (NSString)

    Declaration

    Swift

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

    • kFIRParameterContentType (NSString)
    • kFIRParameterItemID (NSString)

    Declaration

    Swift

    let AnalyticsEventShare: String
  • 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:

    • kFIRParameterSignUpMethod (NSString)

    Declaration

    Swift

    let AnalyticsEventSignUp: String
  • 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:

    • kFIRParameterItemName (NSString)
    • kFIRParameterVirtualCurrencyName (NSString)
    • kFIRParameterValue (signed 64-bit integer or double as NSNumber)

    Declaration

    Swift

    let AnalyticsEventSpendVirtualCurrency: String
  • Tutorial Begin event. This event signifies the start of the on-boarding process in your app. Use this in a funnel with kFIREventTutorialComplete to understand how many users complete this process and move on to the full app experience.

    Declaration

    Swift

    let AnalyticsEventTutorialBegin: String
  • 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 kFIREventTutorialBegin to gauge the completion rate of your on-boarding process.

    Declaration

    Swift

    let AnalyticsEventTutorialComplete: String
  • 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:

    • kFIRParameterAchievementID (NSString)

    Declaration

    Swift

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

    • kFIRParameterItemID (NSString)
    • kFIRParameterItemName (NSString)
    • kFIRParameterItemCategory (NSString)
    • kFIRParameterItemLocationID (NSString) (optional)
    • kFIRParameterPrice (double as NSNumber) (optional)
    • kFIRParameterQuantity (signed 64-bit integer as NSNumber) (optional)
    • kFIRParameterCurrency (NSString) (optional)
    • kFIRParameterValue (double as NSNumber) (optional)
    • kFIRParameterStartDate (NSString) (optional)
    • kFIRParameterEndDate (NSString) (optional)
    • kFIRParameterFlightNumber (NSString) (optional) for travel bookings
    • kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional) for travel bookings
    • kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for travel bookings
    • kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for travel bookings
    • kFIRParameterOrigin (NSString) (optional)
    • kFIRParameterDestination (NSString) (optional)
    • kFIRParameterSearchTerm (NSString) (optional) for travel bookings
    • kFIRParameterTravelClass (NSString) (optional) for travel bookings

    Declaration

    Swift

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

    • kFIRParameterItemCategory (NSString)

    Declaration

    Swift

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

    • kFIRParameterSearchTerm (NSString)

    Declaration

    Swift

    let AnalyticsEventViewSearchResults: String
  • Level Start event. Log this event when the user starts a new level. Params:

    • kFIRParameterLevelName (NSString)

    Declaration

    Swift

    let AnalyticsEventLevelStart: String
  • Level End event. Log this event when the user finishes a level. Params:

    • kFIRParameterLevelName (NSString)
    • kFIRParameterSuccess (NSString)

    Declaration

    Swift

    let AnalyticsEventLevelEnd: String
  • Game achievement ID (NSString).

        NSDictionary *params = @{
          kFIRParameterAchievementID : @"10_matches_won",
          // ...
        };
    

    Declaration

    Swift

    let AnalyticsParameterAchievementID: String
  • Ad Network Click ID (NSString). Used for network-specific click IDs which vary in format.

        NSDictionary *params = @{
          kFIRParameterAdNetworkClickID : @"1234567",
          // ...
        };
    

    Declaration

    Swift

    let AnalyticsParameterAdNetworkClickID: String
  • The store or affiliation from which this transaction occurred (NSString).

        NSDictionary *params = @{
          kFIRParameterAffiliation : @"Google Store",
          // ...
        };
    

    Declaration

    Swift

    let AnalyticsParameterAffiliation: String
  • 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 (NSString).

        NSDictionary *params = @{
          kFIRParameterCampaign : @"winter_promotion",
          // ...
        };
    

    Declaration

    Swift

    let AnalyticsParameterCampaign: String
  • Character used in game (NSString).

        NSDictionary *params = @{
          kFIRParameterCharacter : @"beat_boss",
          // ...
        };
    

    Declaration

    Swift

    let AnalyticsParameterCharacter: String