Ad Identifier Module
Provides the ability to make use of the device “Ad Identifier” (ADID) to help identify interactions with display ad networks.
Requirements
Install
Install the Ad Identifier module with Maven (recommended) or manually.
Maven
To install the module using Maven:
-
In your project’s top-level
build.gradle
file, add the following Maven repository:maven { url "https://maven.tealiumiq.com/android/releases/" }
-
In your project module’s
build.gradle
file, add the following Maven dependency:dependencies{ implementation 'com.tealium:kotlin-core:1.6.0' implementation 'com.tealium:kotlin-ad-identifier:1.1.1' }
Manual
To install the Ad Identifier module manually:
-
Download the Tealium AdIdentifier module.
-
In your top-level
build.gradle
file, verify the following:allprojects { repositories { mavenCentral() flatDir { dirs 'libs' } } }
-
Copy the file
tealium.adidentifier-1.1.1.aar
into your project’s<PROJECT_ROOT>/<MODULE>/libs
directory. -
Add the Tealium library dependency to your project module’s
build.gradle
file:dependencies { implementation (name:'tealium-kotlin.adidentifier-1.1.1', ext:'aar') }
Initialize
Initialize the Ad Identifier module, as shown in the following example:
val config = TealiumConfig(application,
"ACCOUNT",
"PROFILE",
ENVIRONMENT,
modules = mutableSetOf(Modules.AdIdentifier), // Ad Identifier module
dispatchers = mutableSetOf(Dispatchers.Collect,
Dispatchers.TagManagement,
Dispatchers.RemoteCommands)
)
Data Layer
The Ad Identifier module adds the following variables to the data layer:
Variable | Type | Description | Example |
---|---|---|---|
google_adid |
String |
The Google Ad Identifier | ca-app-pub-0123456789012345~0123456789 |
google_limit_ad_tracking |
Boolean |
Is true if limit ad tracking is enabled on the device, or false otherwise |
true |
API Reference
removeAdInfo()
Removes the stored Ad Identifier string from the data layer.
tealium?.adIdentifier?.removeAdInfo()
removeAppSetIdInfo()
Removes the stored App Set data from the data layer.
tealium?.adIdentifier?.removeAppSetIdInfo()
This page was last updated: July 11, 2024