Adobe Audience Manager
Adobe Audience Manager is a versatile audience data management platform. With the SDK, you can update audience profiles for users and retrieve user segment information from your mobile app. For more information, see Adobe Audience Manager.
Configuring the Audience Manager extension in the Data Collection UI
- In the Data Collection UI, select the Extensions tab.
- Choose Catalog, locate the Adobe Audience Manager extension, and select Install.
- Type your Audience Manager server.
- Type a timeout value. This value is the period, in seconds, to wait for a response from Audience Manager before timing out. For best practices, you should use a default value of 2s.
- Select Save.
- Follow the publishing process to update the SDK configuration.
Add Audience Manager to your app
- Add the library to your project.
Kotlin
Copied to your clipboardimplementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))implementation("com.adobe.marketing.mobile:core")implementation("com.adobe.marketing.mobile:identity")implementation("com.adobe.marketing.mobile:audience")
Groovy
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:identity'implementation 'com.adobe.marketing.mobile:audience'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
- Import the library.
Java
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.Identity;import com.adobe.marketing.mobile.Audience;
Kotlin
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCoreimport com.adobe.marketing.mobile.Identityimport com.adobe.marketing.mobile.Audience
Add the Mobile Core and Audience extensions to your project using Cocoapods.
Add the following pods in your
Podfile
:Copied to your clipboardpod 'AEPCore', '~> 5.0'pod 'AEPAudience', '~> 5.0'pod 'AEPIdentity', '~> 5.0'
Please note that the Audience Manager extension depends on the Identity extension.
Swift
Copied to your clipboardimport AEPCoreimport AEPAudienceimport AEPIdentity
Objective-C
Copied to your clipboard@import AEPCore;@import AEPAudience;@import AEPIdentity;
- Add the library to your project.
Kotlin
Copied to your clipboardimplementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))implementation("com.adobe.marketing.mobile:core")implementation("com.adobe.marketing.mobile:identity")implementation("com.adobe.marketing.mobile:audience")
Groovy
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:identity'implementation 'com.adobe.marketing.mobile:audience'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
- Import the library.
Java
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.Identity;import com.adobe.marketing.mobile.Audience;
Kotlin
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCoreimport com.adobe.marketing.mobile.Identityimport com.adobe.marketing.mobile.Audience
Add the Mobile Core and Audience extensions to your project using Cocoapods.
Add the following pods in your
Podfile
:Copied to your clipboardpod 'AEPCore', '~> 5.0'pod 'AEPAudience', '~> 5.0'pod 'AEPIdentity', '~> 5.0'
Please note that the Audience Manager extension depends on the Identity extension.
Swift
Copied to your clipboardimport AEPCoreimport AEPAudienceimport AEPIdentity
Objective-C
Copied to your clipboard@import AEPCore;@import AEPAudience;@import AEPIdentity;
Register Audience Manager with Mobile Core
Java
Copied to your clipboardpublic class MainApp extends Application {private final String ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID";@Overridepublic void onCreate() {super.onCreate();MobileCore.setApplication(this);MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID);List<Class<? extends Extension>> extensions = new ArrayList<>();extensions.add(Audience.EXTENSION);extensions.add(Identity.EXTENSION);MobileCore.registerExtensions(extensions, o -> {Log.d(LOG_TAG, "AEP Mobile SDK is initialized");});}}
Kotlin
Copied to your clipboardclass MyApp : Application() {val ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID"override fun onCreate() {super.onCreate()MobileCore.setApplication(this)MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID)val extensions = listOf(Audience.EXTENSION, Identity.EXTENSION)MobileCore.registerExtensions(extensions) {Log.d(LOG_TAG, "AEP Mobile SDK is initialized")}}}
Swift
In your app's _:didFinishLaunchingWithOptions
function, register the Audience Manager extension with the Mobile Core:
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {MobileCore.registerExtensions([Audience.self, Identity.self], {MobileCore.configureWith(appId: "yourAppId")})...}
Objective-C
In your app's application:didFinishLaunchingWithOptions
function, register the Audience Manager extension with the Mobile Core:
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore registerExtensions:@[AEPMobileAudience.class, AEPMobileIdentity.class] completion:^{[AEPMobileCore configureWithAppId: @"yourAppId"];}];...}
Java
Copied to your clipboardpublic class MainApp extends Application {private final String ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID";@Overridepublic void onCreate() {super.onCreate();MobileCore.setApplication(this);MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID);List<Class<? extends Extension>> extensions = new ArrayList<>();extensions.add(Audience.EXTENSION);extensions.add(Identity.EXTENSION);MobileCore.registerExtensions(extensions, o -> {Log.d(LOG_TAG, "AEP Mobile SDK is initialized");});}}
Kotlin
Copied to your clipboardclass MyApp : Application() {val ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID"override fun onCreate() {super.onCreate()MobileCore.setApplication(this)MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID)val extensions = listOf(Audience.EXTENSION, Identity.EXTENSION)MobileCore.registerExtensions(extensions) {Log.d(LOG_TAG, "AEP Mobile SDK is initialized")}}}
Swift
In your app's _:didFinishLaunchingWithOptions
function, register the Audience Manager extension with the Mobile Core:
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {MobileCore.registerExtensions([Audience.self, Identity.self], {MobileCore.configureWith(appId: "yourAppId")})...}
Objective-C
In your app's application:didFinishLaunchingWithOptions
function, register the Audience Manager extension with the Mobile Core:
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore registerExtensions:@[AEPMobileAudience.class, AEPMobileIdentity.class] completion:^{[AEPMobileCore configureWithAppId: @"yourAppId"];}];...}
Implement Audience Manager APIs
For more information about implementing Audience Manager APIs, please read the Audience Manager API reference.
Configuration keys
To update SDK configuration programmatically, use the following information to change your Audience Manager configuration values. For more information, see the Configuration API reference.
Key | Required | Description | Data Type |
---|---|---|---|
audience.server | Yes | Server endpoint used to collect Audience Manager data | String |
audience.timeout | No | Time, in seconds, to wait for a response from Audience Manager before timing out. Default value is 2 seconds. | Integer |
Additional information
- How do you find your Audience Manager server?
- Want to know more about setting up Adobe Analytics server-side forwarding to Audience Manager?