Swift SDK Version

AppEvent

publicstructAppEvent:AppEventLoggable
Represents a single application event that can be logged to Facebook Analytics.
  • Name of the application event.

    Declaration

    Swift
    publicletname:AppEventName
  • Arbitrary parameter dictionary of characteristics of an event.

    Declaration

    Swift
    publicvarparameters:ParametersDictionary
  • Amount to be aggregated into all events of this eventName. App Insights will report the cumulative and average value of this amount.

    Declaration

    Swift
    publicvarvalueToSum:Double?
  • Creates an app event.

    Declaration

    Swift
    publicinit(name:AppEventName,parameters:ParametersDictionary=[:],valueToSum:Double?=nil)

    Parameters

    name
    App event name.
    parameters
    Parameters dictionary. Default: empty.
    valueToSum
    Optional value to sum. Default: nil.
  • Create an event that indicates that the user has completed registration.

    Declaration

    Swift
    publicstaticfunccompletedRegistration(registrationMethod:String?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    registrationMethod
    Optional registration method used.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an event that indicates that the user has completed tutorial.

    Declaration

    Swift
    publicstaticfunccompletedTutorial(successful:Bool?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    successful
    Optional boolean value that indicates whether operation was succesful.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an event that indicates that the user viewed specific content.

    Declaration

    Swift
    publicstaticfuncviewedContent(contentType:String?=nil,contentId:String?=nil,currency:String?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    contentType
    Optional content type.
    contentId
    Optional content identifier.
    currency
    Optional string representation of currency.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an event that indicatest that the user has performed a search within the app.

    Declaration

    Swift
    publicstaticfuncsearched(contentId:String?=nil,searchedString:String?=nil,successful:Bool?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    contentId
    Optional content identifer.
    searchedString
    Optional searched string.
    successful
    Optional boolean value that indicatest whether the operation was succesful.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an event that indicatest the user has rated an item in the app.

    Declaration

    Swift
    publicstaticfuncrated<T:UnsignedInteger>(contentType:String?=nil,contentId:String?=nil,maxRatingValue:T?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    contentType
    Optional type of the content.
    contentId
    Optional content identifier.
    maxRatingValue
    Optional max rating value.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an app event that a user has purchased something in the application.

    Declaration

    Swift
    publicstaticfuncpurchased(amount:Double,currency:String?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    amount
    An amount of purchase.
    currency
    Optional string representation of currency.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an app event that indicatest that user has added an item to the cart.

    Declaration

    Swift
    publicstaticfuncaddedToCart(contentType:String?=nil,contentId:String?=nil,currency:String?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    contentType
    Optional content type.
    contentId
    Optional content identifier.
    currency
    Optional string representation of currency.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an app event that indicates that user added an item to the wishlist.

    Declaration

    Swift
    publicstaticfuncaddedToWishlist(contentType:String?=nil,contentId:String?=nil,currency:String?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    contentType
    Optional content type.
    contentId
    Optional content identifier.
    currency
    Optional string representation of currency.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an event that indicatest that a user added payment information.

    Declaration

    Swift
    publicstaticfuncaddedPaymentInfo(successful:Bool?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    successful
    Optional boolean value that indicates whether operation was succesful.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an event that indicatest that a user has initiated a checkout.

    Declaration

    Swift
    publicstaticfuncinitiatedCheckout<T:UnsignedInteger>(contentType:String?=nil,contentId:String?=nil,itemCount:T?=nil,paymentInfoAvailable:Bool?=nil,currency:String?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    contentType
    Optional content type.
    contentId
    Optional content identifier.
    itemCount
    Optional count of items.
    paymentInfoAvailable
    Optional boolean value that indicatest whether payment info is available.
    currency
    Optional string representation of currency.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an app event that indicates that a user has achieved a level in the application.

    Declaration

    Swift
    publicstaticfuncachievedLevel(level:AppEventParameterValueType?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    level
    Optional level achieved. Can be either a String or NSNumber.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an app event that indicatest that a user has unlocked an achievement.

    Declaration

    Swift
    publicstaticfuncunlockedAchievement(description:String?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    description
    Optional achievement description.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Create an event that indicatest that a user spent in-app credits.

    Declaration

    Swift
    publicstaticfuncspentCredits(contentType:String?=nil,contentId:String?=nil,valueToSum:Double?=nil,extraParameters:ParametersDictionary=[:])->AppEvent

    Parameters

    contentType
    Optional content type.
    contentId
    Optional content identifier.
    valueToSum
    Optional value to sum.
    extraParameters
    Optional dictionary of extra parameters.

    Return Value

    An app event that can be logged via AppEventsLogger.
  • Creates an app event.

    Declaration

    Swift
    publicinit(name:String,parameters:ParametersDictionary=[:],valueToSum:Double?=nil)

    Parameters

    name
    String representation of app event name.
    parameters
    Parameters dictionary. Default: empty.
    valueToSum
    Optional value to sum. Default: nil.