Adobe Campaign Classic
Configure Campaign Classic extension in the Data Collection UI
In the Data Collection UI, select the Extensions tab.
On the Catalog tab, locate the Adobe Campaign Classic extension, and select Install.
Type in the settings for your extension.
Select Save.
Complete the publishing process to update the SDK configuration.
For more information about publishing, see the publishing overview.
Configure Campaign Classic extension
You can retrieve your Campaign Classic registration or tracking endpoint URLs in the Campaign Classic interface under the Tools > Advanced > Deployment wizard menu. The endpoint for push notifications is usually the same as the URL that is used for web forms and surveys.
Registration endpoints
Type the registration endpoint URL(s) for your Campaign Classic instances. You can specify up to three unique endpoints for your development, staging, and production environments.
For this extension, the registration endpoint URLs should be entered without a prefixing https://.
Tracking endpoints
Type the tracking endpoint URL(s) for your Campaign Classic instances. Like the registration URLs, you can specify up to three unique endpoints for your development, staging, and production environments.
For this extension, the tracking endpoint URLs should be entered without a prefixing https://.
Integration key (iOS)
You can specify up to three unique iOS integration keys for your development, staging, and production environments. iOS integration keys are generated after creating a service that contains iOS applications using the Campaign Classic client console. For more information on where to find the integration key, see the tutorial on configuring the mobile application in Adobe Campaign.
Integration key (Android)
You can specify up to three unique Android integration keys for your development, staging, and production environments. Android integration keys are generated after creating a service that contains Android applications using the Campaign Classic client console. For more information on where to find the integration key, see the tutorial on configuring the mobile application in Adobe Campaign.
Request timeout
The request timeout is the amount of time, in seconds, to wait for a response from the registration or tracking endpoint before timing out. The SDK default timeout value is 30 seconds.
Add Campaign Classic to your app
Add the Mobile Core, Lifecycle and Campaign Classic dependencies in your app's Gradle file.
Kotlin
Copied to your clipboardimplementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))implementation("com.adobe.marketing.mobile:core")implementation("com.adobe.marketing.mobile:lifecycle")implementation("com.adobe.marketing.mobile:campaignclassic")
Groovy
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:lifecycle'implementation 'com.adobe.marketing.mobile:campaignclassic'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
Add the Campaign Classic and Mobile Core libraries to your project.
You can add the following pods to your Podfile
:
Copied to your clipboardpod 'AEPCore', '~> 5.0'pod 'AEPCampaignClassic', '~> 5.0'
or you can manually include the XCFrameworks by following this GitHub documentation.
Add the Mobile Core, Lifecycle and Campaign Classic dependencies in your app's Gradle file.
Kotlin
Copied to your clipboardimplementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))implementation("com.adobe.marketing.mobile:core")implementation("com.adobe.marketing.mobile:lifecycle")implementation("com.adobe.marketing.mobile:campaignclassic")
Groovy
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:lifecycle'implementation 'com.adobe.marketing.mobile:campaignclassic'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
Add the Campaign Classic and Mobile Core libraries to your project.
You can add the following pods to your Podfile
:
Copied to your clipboardpod 'AEPCore', '~> 5.0'pod 'AEPCampaignClassic', '~> 5.0'
or you can manually include the XCFrameworks by following this GitHub documentation.
Register Campaign Classic with Mobile Core
In your app's OnCreate
method, register the Campaign Classic and Lifecycle extensions:
Java
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.CampaignClassic;import com.adobe.marketing.mobile.Lifecycle;public 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);MobileCore.registerExtensions(Arrays.asList(CampaignClassic.EXTENSION, Lifecycle.EXTENSION),o -> Log.d("MainApp", "Adobe Experience Platform Campaign Classic Mobile SDK was initialized."));}}
Kotlin
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.CampaignClassic;import com.adobe.marketing.mobile.Lifecycle;class MainApp : Application() {private var ENVIRONMENT_FILE_ID: String = "YOUR_APP_ENVIRONMENT_ID"override fun onCreate() {super.onCreate()MobileCore.setApplication(this)MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID)MobileCore.registerExtensions(listOf(CampaignClassic.EXTENSION, Lifecycle.EXTENSION)) {Log.d("MainApp", "Adobe Experience Platform Campaign Classic Mobile SDK was initialized")}}}
In your app's application:didFinishLaunchingWithOptions:
method, register the Campaign Classic extension:
Swift
Copied to your clipboard// AppDelegate.swiftimport AEPCoreimport AEPCampaignClassicfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {MobileCore.registerExtensions([CampaignClassic.self], {MobileCore.configureWith(appId: "<YOUR_ENVIRONMENT_FILE_ID>")})return true;}
Objective-C
Copied to your clipboard// AppDelegate.m@import AEPCore;@import AEPCampaignClassic;- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore registerExtensions:@[AEPMobileCampaignClassic.class] completion:^{[AEPMobileCore configureWithAppId: @"<YOUR_ENVIRONMENT_FILE_ID>"];}];return YES;}
In your app's OnCreate
method, register the Campaign Classic and Lifecycle extensions:
Java
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.CampaignClassic;import com.adobe.marketing.mobile.Lifecycle;public 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);MobileCore.registerExtensions(Arrays.asList(CampaignClassic.EXTENSION, Lifecycle.EXTENSION),o -> Log.d("MainApp", "Adobe Experience Platform Campaign Classic Mobile SDK was initialized."));}}
Kotlin
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.CampaignClassic;import com.adobe.marketing.mobile.Lifecycle;class MainApp : Application() {private var ENVIRONMENT_FILE_ID: String = "YOUR_APP_ENVIRONMENT_ID"override fun onCreate() {super.onCreate()MobileCore.setApplication(this)MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID)MobileCore.registerExtensions(listOf(CampaignClassic.EXTENSION, Lifecycle.EXTENSION)) {Log.d("MainApp", "Adobe Experience Platform Campaign Classic Mobile SDK was initialized")}}}
In your app's application:didFinishLaunchingWithOptions:
method, register the Campaign Classic extension:
Swift
Copied to your clipboard// AppDelegate.swiftimport AEPCoreimport AEPCampaignClassicfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {MobileCore.registerExtensions([CampaignClassic.self], {MobileCore.configureWith(appId: "<YOUR_ENVIRONMENT_FILE_ID>")})return true;}
Objective-C
Copied to your clipboard// AppDelegate.m@import AEPCore;@import AEPCampaignClassic;- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore registerExtensions:@[AEPMobileCampaignClassic.class] completion:^{[AEPMobileCore configureWithAppId: @"<YOUR_ENVIRONMENT_FILE_ID>"];}];return YES;}
Configuration keys
To update SDK configuration programmatically, use the following information to change your Campaign Classic configuration values. For more information, see the Configuration API reference.
Key | Required | Description | Data Type |
---|---|---|---|
build.environment | Yes | Specifies which environment to use (prod, dev, or staging) when sending registration and tracking information. It is also used to specify which mobile app integration key to use. | String |
campaignclassic.timeout | No | Specifies the amount of time to wait for a response from the Campaign Classic registration or tracking server. | Integer |
campaignclassic.marketingServer | Yes | Sets the marketing server, which receives registration requests. | String |
campaignclassic.trackingServer | Yes | Sets the tracking server, which receives tracking requests. | String |
campaignclassic.ios.integrationKey | Yes | Sets the iOS mobile app integration key, which links the app to an iOS application campaign in Campaign Classic. | String |
campaignclassic.android.integrationKey | Yes | Sets the Android mobile app integration key, which links the app to an Android application campaign in Campaign Classic. | String |