Package com.adobe.marketing.mobile
Class Analytics
-
- All Implemented Interfaces:
public class Analytics
-
-
Method Summary
Modifier and Type Method Description static StringextensionVersion()Returns the version for the Analytics extension static voidgetTrackingIdentifier(@NonNull() AdobeCallback<String> callback)Retrieves the analytics tracking identifier generated for this app/device instance. static voidgetQueueSize(@NonNull() AdobeCallback<Long> callback)Retrieves the total number of analytics hits currently in the tracking queue. static voidclearQueue()Clears all unsent analytics hits from the tracking queue. static voidsendQueuedHits()Forces analytics to send all queued hits regardless of current batch options. static voidgetVisitorIdentifier(@NonNull() AdobeCallback<String> callback)Retrieves the visitor identifier static voidsetVisitorIdentifier(@Nullable() String visitorID)Sets the visitor identifier. -
-
Method Detail
-
extensionVersion
@NonNull() static String extensionVersion()
Returns the version for the Analytics extension
- Returns:
The version string
-
getTrackingIdentifier
static void getTrackingIdentifier(@NonNull() AdobeCallback<String> callback)
Retrieves the analytics tracking identifier generated for this app/device instance.
- Parameters:
callback-AdobeCallbackinvoked with the analytics identifierStringvalue; when an AdobeCallbackWithError is provided, an AdobeError can be returned in the eventuality of an unexpected error or if the default timeout (5000ms) is met before the callback is returned with analytics tracking identifier.
-
getQueueSize
static void getQueueSize(@NonNull() AdobeCallback<Long> callback)
Retrieves the total number of analytics hits currently in the tracking queue.
- Parameters:
callback-AdobeCallbackinvoked with the queue sizelongvalue; when an AdobeCallbackWithError is provided, an AdobeError can be returned in the eventuality of an unexpected error or if the default timeout (5000ms) is met before the callback is returned with queue size.
-
clearQueue
static void clearQueue()
Clears all unsent analytics hits from the tracking queue.
NOTE: Use caution when clearing the queue manually. This process cannot be reversed.
-
sendQueuedHits
static void sendQueuedHits()
Forces analytics to send all queued hits regardless of current batch options.
-
getVisitorIdentifier
static void getVisitorIdentifier(@NonNull() AdobeCallback<String> callback)
Retrieves the visitor identifier
- Parameters:
callback-AdobeCallbackinvoked with the visitor identifierStringvalue; when an AdobeCallbackWithError is provided, an AdobeError can be returned in the eventuality of an unexpected error or if the default timeout (5000ms) is met before the callback is returned with visitor identifier.
-
setVisitorIdentifier
static void setVisitorIdentifier(@Nullable() String visitorID)
Sets the visitor identifier. Clears the visitor identifier when passed null or an empty string.
- Parameters:
visitorID-Stringnew value for visitor identifier
-
-
-
-