Edit in GitHubLog an issue

Java

Syntax

Copied to your clipboard
public static void clearQueue()

Example

Copied to your clipboard
Analytics.clearQueue();

Kotlin

Example

Copied to your clipboard
Analytics.clearQueue();

Swift

Syntax

Copied to your clipboard
static func clearQueue()

Example

Copied to your clipboard
Analytics.clearQueue()

Objective-C

Syntax

Copied to your clipboard
+ (void) clearQueue;

Example

Copied to your clipboard
[AEPMobileAnalytics clearQueue];

Java

Syntax

Copied to your clipboard
public static String extensionVersion()

Example

Copied to your clipboard
String analyticsExtensionVersion = Analytics.extensionVersion();

Kotlin

Example

Copied to your clipboard
val extensionVersion = Analytics.extensionVersion();

Swift

Syntax

Copied to your clipboard
static var extensionVersion: String

Example

Copied to your clipboard
let version = Analytics.extensionVersion

Objective-C

Syntax

Copied to your clipboard
+ (nonnull NSString*) extensionVersion;

Example

Copied to your clipboard
NSString *version = [AEPMobileAnalytics extensionVersion];

Java

Syntax

Copied to your clipboard
public static void getQueueSize(@NonNull final AdobeCallback<Long> callback)

Example

Copied to your clipboard
Analytics.getQueueSize(new AdobeCallbackWithError<Long>() {
@Override
public void fail(AdobeError adobeError) {
// Handle the error
}
@Override
public void call(Long size) {
// Handle the queue size
}
});

Kotlin

Example

Copied to your clipboard
Analytics.getQueueSize(object: AdobeCallbackWithError<Long> {
override fun call(size: Long?) {
// Handle the queue size
}
override fun fail(error: AdobeError?) {
// Handle the error
}
})

Please use the getQueueSizeWithCompletionHandler API instead.

Swift

Syntax

Copied to your clipboard
static func getQueueSize(completion: @escaping (Int, Error?) -> Void)

Example

Copied to your clipboard
Analytics.getQueueSize { (queueSize, error) in
// Handle error (if non-nil) or use queueSize.
}

Objective-C

Syntax

Copied to your clipboard
+ (void)getQueueSize:^(NSInteger, NSError * _Nullable)completion

Example

Copied to your clipboard
[AEPMobileAnalytics getQueueSize:^(NSInteger queueSize, NSError * _Nullable error) {
// Handle error (if non-nil) or use queueSize.
}];

Java

Syntax

Copied to your clipboard
public static void getTrackingIdentifier(@NonNull final AdobeCallback<String> callback)
  • callback is invoked with the tracking Identifier string value. 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.

Example

Copied to your clipboard
Analytics.getTrackingIdentifier(new AdobeCallbackWithError<String>() {
@Override
public void fail(AdobeError adobeError) {
// Handle the error
}
@Override
public void call(String s) {
// Handle the Experience Cloud ID
}
});

Kotlin

Example

Copied to your clipboard
Analytics.getTrackingIdentifier(object: AdobeCallbackWithError<String> {
override fun call(id: String?) {
// Handle the Experience Cloud ID
}
override fun fail(error: AdobeError?) {
// Handle the error
}
})

Please see the getTrackingIdentifierWithCompletionHandler section for using this API call.

Swift

Syntax

Copied to your clipboard
static func getTrackingIdentifier(completion: @escaping (String?, Error?) -> Void)

Example

Copied to your clipboard
Analytics.getTrackingIdentifier { (trackingId, error) in
// Handle the error (if non-nil) or use the trackingIdentifier value
}

Objective-C

Syntax

Copied to your clipboard
+ (void) getTrackingIdentifier:^(NSString * _Nullable, NSError * _Nullable)completion

Example

Copied to your clipboard
AEPMobileAnalytics getTrackingIdentifier:^(NSString * _Nullable trackingIdentifier, NSError * _Nullable error) {
// Handle the error (if non-nil) or use the trackingIdentifier value
}];

Java

Syntax

Copied to your clipboard
public static void getVisitorIdentifier(@NonNull final AdobeCallback<String> callback)
  • callback is invoked with the visitor identifier value. 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.

Example

Copied to your clipboard
Analytics.getVisitorIdentifier(new AdobeCallbackWithError<String>() {
@Override
public void fail(AdobeError adobeError) {
// Handle the error
}
@Override
public void call(String s) {
// Handle the Visitor ID
}
});

Kotlin

Example

Copied to your clipboard
Analytics.getVisitorIdentifier(object: AdobeCallbackWithError<String> {
override fun call(id: String?) {
// Handle the Visitor ID
}
override fun fail(error: AdobeError?) {
// Handle the error
}
})

For more information on using this API call, please read getVisitorIdentifierWithCompletionHandler.

Swift

Syntax

Copied to your clipboard
static func getVisitorIdentifier(completion: @escaping (String?, Error?) -> Void)

Example

Copied to your clipboard
Analytics.getVisitorIdentifier { (visitorIdentifier, error) in
// Handle the error (if non-nil) or use the visitorIdentifier value
}

Objective-C

Syntax

Copied to your clipboard
+ (void) getVisitorIdentifier:^(NSString * _Nullable, NSError * _Nullable)completion

Example

Copied to your clipboard
[AEPMobileAnalytics getVisitorIdentifier:^(NSString * _Nullable visitorIdentifier, NSError * _Nullable error) {
// Handle the error (if non-nil) or use the visitorIdentifier value
}];

Java

Syntax

Copied to your clipboard
public static void registerExtension()

Example

Copied to your clipboard
Analytics.registerExtension();

Kotlin

Example

Copied to your clipboard
Analytics.registerExtension()

Java

Syntax

Copied to your clipboard
public static void sendQueuedHits()

Example

Copied to your clipboard
Analytics.sendQueuedHits();

Kotlin

Example

Copied to your clipboard
Analytics.sendQueuedHits();

Swift

Syntax

Copied to your clipboard
static func sendQueuedHits()

Example

Copied to your clipboard
[AEPMobileAnalytics sendQueueHits];

Objective-C

Syntax

Copied to your clipboard
+ (void) sendQueueHits

Example

Copied to your clipboard
Analytics.sendQueuedHits()

Java

Syntax

Copied to your clipboard
public static void setVisitorIdentifier(@NonNull final String visitorID)
  • visitorIdentifier is the new value for the visitor identifier.

Example

Copied to your clipboard
Analytics.setVisitorIdentifier("custom_identifier");

Kotlin

Example

Copied to your clipboard
Analytics.setVisitorIdentifier("custom_identifier");

Swift

Syntax

Copied to your clipboard
static func setVisitorIdentifier(visitorIdentifier: String)
  • visitorIdentifier is the new value for the visitor identifier.

Example

Copied to your clipboard
Analytics.setVisitorIdentifier(visitorIdentifier:"custom_identifier")

Objective-C

Syntax

Copied to your clipboard
+ (void) setVisitorIdentifier:(NSString * _Nonnull)

Example

Copied to your clipboard
[AEPMobileAnalytics setVisitorIdentifier:@"custom_identifier"];
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.