LiveRamp

In this article, you will understand how to use the LiveRamp SDK to help Nimbus to identify your users.

Integrating Nimbus with LiveRamp requires a Config ID which should be obtained by contacting LiveRamp. Check here for more information.

Installation

Add the LiveRamp Maven repository to your settings.gradle file for access to the LiveRamp SDK

dependencyResolutionManagement {
    maven {
        url = uri("https://sdk-android-prod.launch.liveramp.com")
        content {
            includeGroupByRegex(".*\\.liveramp.*")
        }
    }
}

Add the LiveRamp extension in your build.gradle.

dependencies {
    implementation("com.adsbynimbus.android:extension-liveramp:2.+")
    implementation("com.liveramp:ats:v2.+")
}

Configure the SDK to include LiveRamp

The LiveRamp Extension needs to be initialized, make sure to do this after Nimbus SDK has been initialized.

LiveRamp Extension can be initialized by providing an user's email or using phone number; at least one must be provided. Refer to Preparing Identifiers for information on how Phone Numbers need to be formatted.

LiveRampExtension.initialize(
    configurationId = TODO("Your Config Id provided by LiveRamp"),
    email = TODO("e-mail address used to identify the user"),
    phone = TODO("Optional phone if email isn't known, only US is supported"),
    hasConsentToNoLegislation = true/false, // Set to true if the user is not governed by consent laws (i.e CCPA/GDPR)
)

LiveRamp SDK will look for consent strings in SharedPreferences in order to properly initialize, be sure to setup these strings before calling LiveRampExtension.initialize. More information can be found here.

Using the listener

The initialization of the LiveRamp SDK is asynchronous. If you would like to wait for the retrieval of the LiveRamp envelope prior to making a request to Nimbus, you can set an LREnvelopeCallback on the LiveRampExtension when initializing the extension.

LiveRampExtension.initialize(
    configurationId = TODO("Your Config Id provided by LiveRamp"),
    email = TODO("e-mail address used to identify the user"),
    phone = TODO("Optional phone if email isn't known, only US is supported"),
    hasConsentToNoLegislation = true/false,
    callback = object : LREnvelopeCallback {
        override fun invoke(envelope: com.liveramp.ats.model.Envelope?, error: com.liveramp.ats.LRError?) {

        }
    }
)

Testing

To test the integration with LiveRamp test mode enabled, initialize the LiveRampExtension using initializeTestMode.

LiveRampExtension.initializeTestMode(
    configurationId = TODO("Your Config Id provided by LiveRamp"),
    email = TODO("e-mail address used to identify the user"),
)

Last updated