Package 

Class Batch.User

    • Method Detail

      • editor

         static BatchUserDataEditor editor()

        Get the user data editor. Batch must be started to save it.Note that you should chain calls to the returned editor.If you call this method again, you will get another editor that's not aware of changes made elsewhere that have not been saved.

      • trackEvent

         static void trackEvent(@NonNull() String event)

        Track an event.You can call this method from any thread. Batch must be started at some point, or events won't be sent to the server.

        Parameters:
        event - The event name.
      • trackEvent

         static void trackEvent(@NonNull() String event, String label)

        Track an event.You can call this method from any thread. Batch must be started at some point, or events won't be sent to the server.

        Parameters:
        event - The event name.
        label - The event label.
      • trackEvent

        @Deprecated() static void trackEvent(@NonNull() String event, String label, JSONObject data)

        Track an event.You can call this method from any thread. Batch must be started at some point, or events won't be sent to the server.

        Parameters:
        event - The event name.
        label - The event label.
        data - The event data.
      • trackEvent

         static void trackEvent(@NonNull() String event, String label, BatchEventData data)

        Track an event.You can call this method from any thread. Batch must be started at some point, or events won't be sent to the server.

        Parameters:
        event - The event name.
        label - The event label.
        data - The event data.
      • trackLocation

         static void trackLocation(@NonNull() Location location)

        Track a location update.You can call this method from any thread. Batch must be started at some point, or location updates won't be sent to the server.The location object usually comes from the location system service, or the Fused Location API, but can also manually create it.If you manually create it, please make sure to fill the accuracy and date if you have that data: both of these values are usedto improve the targeting.

        Parameters:
        location - The location.
      • trackTransaction

         static void trackTransaction(double amount)

        Track a transaction.You can call this method from any thread. Batch must be started at some point, or events won't be sent to the server.

        Parameters:
        amount - Transaction amount.
      • trackTransaction

         static void trackTransaction(double amount, JSONObject data)

        Track a transaction.You can call this method from any thread. Batch must be started at some point, or events won't be sent to the server.

        Parameters:
        amount - Transaction amount.
        data - Transaction data.
      • printDebugInformation

         static void printDebugInformation()

        Print the currently known attributes and tags for a user to logcat.

        For debug purposes only. Don't rely on the log format, because it can change at any time without warning.