Support Home > SDK Integration > SDK – KochavaTracker > Class – KochavaTracker > Instance Method – sendWatchEventWithNameString:infoString:

Instance Method – sendWatchEventWithNameString:infoString:

  • Instance Method

    sendWatchEvent(withNameString:infoString:)

    Creates an instance of class KochavaEvent for an Apple Watch which has a nameString and an optional infoString, and then sends it to the Kochava Server. A convenience method.


    Declaration

    Parameters

    nameString A name string.
    This can be any alphanumeric string value which does not begin with an underscore.

    NOTE: Prepending an event name with an underscore is a convention reserved for Kochava system events. (i.e., _INSTALL)

    infoString A informational string.
    This can be any alphanumeric string value.

    If the string passed is all numeric (and may include a decimal point), Kochava will automatically sum the amounts passed for the same nameString. For example, if you sent the purchase amount of in-app purchases in infoString and named nameString “IAP – Purchase Price”, Kochava would add up all the purchase amounts for you and present them as a total for “IAP – Purchase Price”.

    Regardless of what is passed in infoString, Kochava’s user dashboard will let you access all the data passed in infoString for any nameString, and present a count of all times an event was sent passing any given nameString.

    NOTE: If you pass a string of JSON represented data, only the root level (no nested chunks) is stored. Also, a limit of 75 characters is applied for a non-JSON-decodable string passed as an event infoString.

    Overview

    This method should be viewed as a convenience method which is functionally equivalent to first calling instance method handleWatchEvents() and then calling instance method sendEvent(withNameString:infoString:).

    There are several different ways of creating and sending a KochavaEvent. Use this convenience method if the event is for an Apple Watch and the event name is a custom name.

    Discussion

    After you have associated an Apple Watch to your application, you may optionally send events which occur on the Apple Watch to Kochava for tracking. To do this you send information using a protocol you develop, from your WatchKit Extension to your host application.

     

    Sample Code:

     

    See Also

    Related Symbols class KochavaEvent

    The class KochavaEvent provides a means of defining the parameters for a post-install event, providing standardized types and key names.

    func send(KochavaEvent)

    Sends an instance of class KochavaEvent to the Kochava Server.

    func sendEvent(withNameString: String, infoDictionary: [AnyHashable: Any]?)

    Creates an instance of class which has a nameString and an optional infoDictionary, and then sends it to the Kochava Server. A convenience method.

    func sendEvent(withNameString: String, infoString: String?)

    Creates an instance of class KochavaEvent which has a nameString and an optional infoString, and then sends it to the Kochava Server. A convenience method.

    Related Documentation framework Watch Connectivity

    oordinate activities between your iOS app and your corresponding Watch app.

  • Instance Method

    sendWatchEventWithNameString:infoString:

    Creates an instance of class KochavaEvent for an Apple Watch which has a nameString and an optional infoString, and then sends it to the Kochava Server. A convenience method.


    Declaration

    Parameters

    nameString A name string.
    This can be any alphanumeric string value which does not begin with an underscore.

    NOTE: Prepending an event name with an underscore is a convention reserved for Kochava system events. (i.e., _INSTALL)

    infoString A informational string.
    This can be any alphanumeric string value.

    If the string passed is all numeric (and may include a decimal point), Kochava will automatically sum the amounts passed for the same nameString. For example, if you sent the purchase amount of in-app purchases in infoString and named nameString “IAP – Purchase Price”, Kochava would add up all the purchase amounts for you and present them as a total for “IAP – Purchase Price”.

    Regardless of what is passed in infoString, Kochava’s user dashboard will let you access all the data passed in infoString for any nameString, and present a count of all times an event was sent passing any given nameString.

    NOTE: If you pass a string of JSON represented data, only the root level (no nested chunks) is stored. Also, a limit of 75 characters is applied for a non-JSON-decodable string passed as an event infoString.

    Overview

    This method should be viewed as a convenience method which is functionally equivalent to first calling instance method handleWatchEvents and then calling instance method sendEventWithNameString:infoString:

    There are several different ways of creating and sending a KochavaEvent. Use this convenience method if the event is for an Apple Watch and the event name is a custom name.

    Discussion

    After you have associated an Apple Watch to your application, you may optionally send events which occur on the Apple Watch to Kochava for tracking. To do this you send information using a protocol you develop, from your WatchKit Extension to your host application.

     

    Sample Code:

     

    See Also

    Related Symbols class KochavaEvent

    The class KochavaEvent provides a means of defining the parameters for a post-install event, providing standardized types and key names.

    -sendEvent:

    Sends an instance of class KochavaEvent to the Kochava Server.

    -sendEventWithNameString:infoDictionary:

    Creates an instance of class KochavaEvent which has a nameString and an optional infoDictionary, and then sends it to the Kochava Server. A convenience method.

    -sendEventWithNameString:infoString:

    Creates an instance of class KochavaEvent which has a nameString and an optional infoString, and then sends it to the Kochava Server. A convenience method.

    Related Documentation framework Watch Connectivity

    oordinate activities between your iOS app and your corresponding Watch app.

 
 

Last Modified: Jul 12, 2018 at 9:44 am