SWGATracker

class SWGATracker : NSObject

Implements Google Analystics for SWOO.

  • Undocumented

    See more

    Declaration

    Swift

    @objc
    enum Categories : Int, RawRepresentable
  • Undocumented

    See more

    Declaration

    Swift

    @objc
    enum Events : Int, RawRepresentable
  • Track screen view’s with Google Analytics. This method should be called within viewDidAppear to count a view.

    Declaration

    Swift

    @objc
    class func trackScreen(screenName: String)

    Parameters

    screenName

    <#screenName description#>

  • Track event with Google Analytics

    Declaration

    Swift

    class func trackEvent(category : SWGATracker.Categories, action : SWGATracker.Events, label : String? = "sw_ios_app", value : NSNumber? = 0)

    Parameters

    category

    <#category description#>

    action

    <#action description#>

    label

    Default label of sw_ios_app is used if no label is provided

    Value

    Default value of 0 is set if no value is provided

  • Track event with Google Analytics This method takes a string for custom action.

    Declaration

    Swift

    class func trackEvent(category : SWGATracker.Categories, customAction : String, label : String? = "sw_ios_app", Value : NSNumber? = 0)

    Parameters

    category

    <#category description#>

    customAction

    <#customAction description#>

    label

    <#label description#>

    Value

    <#Value description#>