ID Sync In App with Adobe Mobile Services




I'm trying to figure out how to implement an ID sync when customers open/login to my company's mobile app. We have AAM, Adobe Analytics (SSF enabled), and are using Adobe Mobile Services (AAM SSF enabled), but I can't quite figure out when/how to implement the ID sync. Can anyone help please, seeking advice for both iOS & Android.

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)




Hi caseyo84500701 ,

When it comes id sync in mobile implementation,make sure we implement both device I d sync as well as customer Id sync.

Device ID Sync (IDFA)

Device ID sync (IDFA ID) is done using the “setAdvertisingIdentifier” method outlined here:

If the marketing cloud visitor ID service is implemented then the below method automatically fires the d_cid_ic value for the IDFA value sycn with the global iOS data source DSID_20915 (fires along with call).


+ (void) setAdvertisingIdentifier:(NSString *)identifier;


NSString *idfa = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];

[ADBMobile setAdvertisingIdentifier:idfa];

Sample call

Remember that Audience Manager supports advertising only through device ID captured in raw format (without any encoding). Retrieve the IDFA from Apple APIs only if you are using an ad service. If you retrieve IDFA and are not using it properly, your app might be rejected.

If you want to use Advertising Identifier in Acquisition or Lifecycle, you must call it before calling collectLifecycleData. And, should be done at the launch of the app. This will send the device ID in the lifecycle hit via the “adid” variable. It can also be accessed in Signals (Postbacks).

Should you get the error relating to ASIdentifierManager, please include the following header:

  #import <AdSupport/ASIdentifierManager.h>

Customer login/ID sync

If you are using the Marketing Cloud Visitor Service then along with the Marketing Cloud visitor ID, you can set additional customer IDs to associate with each visitor. The Visitor API accepts multiple Customer IDs for the same visitor, along with a customer type identifier to separate the scope of the different customer IDs and links them to different data sources. This method of visitorSyncIdentifiers corresponds to setCustomerIDs in the JavaScript library.


+ (void) visitorSyncIdentifiers:(nullable NSDictionary *)identifiers authenticationState:(ADBMobileVisitorAuthenticationState)authState;


[ADBMobile visitorSyncIdentifiers:@{@"myIdType":@"valueForUser"}authenticationState:ADBMobileVisitorAuthenticationStateAuthenticated];

The above code synchronizes the provided identifiers to the visitor ID service. “idType” is the integration code that you will have to provide in the data source that is associated with the customer ID.

In order to use the profile merge rules related to authenticated state you have to pass in the authentication state as one of the following values:

  • ADBMobileVisitorAuthenticationStateUnknown
  • ADBMobileVisitorAuthenticationStateAuthenticated
  • ADBMobileVisitorAuthenticationStateLoggedOut

For android implementation,please refer to the doc here:

Implementing AAM for Android



Answers (0)