• Platforms
  • Partners
  • Forums
  • 日本語
  • TLC Tealium Learning Center Tealium Learning
    Community
  • Discussions & Ideas Dicussions & Ideas
  • Product Guides Product Guides
  • Knowledge Base Knowledge Base
  • Developer Docs Developer Docs
  • Education Education
  • TLC Blog TLC Blog
  • Support Desk Support Desk
  • CDH Customer Data Hub Customer Data Hub
  • Mobile
  • Getting Started
    • Overview
    • Quick Start Guide
    • Mobile Concepts
    • Client-Side
    • Server-Side
    • Tracking Webviews
    • Data Layer
    • Consent Management
    • Event Batching
    • User Location and Geofencing
    • Media Tracking
    • Deep Links
    • Timed Events
    • Trace
    • Hosted Data Layer
    • Adobe Visitor Service Module
    • Feature Comparison
    • Troubleshooting
  • Remote Commands
    • Overview
    • How It Works
    • Integrations
      • Adjust
      • AppsFlyer
      • Branch
      • Braze
      • Contentsquare
      • Facebook
      • Firebase
      • Kochava
      • Usabilla
  • Android (Java)
    • Overview
    • Install
    • Track
    • Data Layer
    • Data Management
    • Consent Management
    • Module List
      • Ad Identifier Module
      • Crash Reporter Module
      • Install Referrer Module
      • Lifecycle Tracking Module
      • Location Module
      • Optimizely X Tracking Module
    • Android TV
    • Android Wear
    • API Reference
      • ConsentManager
      • DataSources
      • Lifecycle
      • Tealium
      • Tealium.Config
      • TealiumLocation
    • Release Notes
  • Android (Kotlin)
    • Overview
    • Install
    • Track
    • Data Layer
    • Consent Management
    • Identity Resolution
    • Module List
      • Ad Identifier Module
      • AutoTracking Module
      • AdobeVisitorService Module
      • Collect Module
      • Collectors Module
      • Crash Reporter Module
      • In-App Purchase Module
      • Install Referrer Module
      • Lifecycle Tracking Module
      • Location Manager Module
      • Media Module
      • RemoteCommands Module
      • Tag Management Dispatcher Module
      • Visitor Service Module
    • Android TV
    • API Reference
      • ConsentCategory
      • ConsentManager
      • CurrentVisit
      • DataLayer
      • Lifecycle
      • LocationManager
      • Media
      • Tealium
      • TealiumConfig
      • VisitorProfile
      • VisitorService
    • Release Notes
  • Cordova 1.x
    • Overview
    • Install
    • Track
    • Data Management
    • Module List
      • Ad Identifier Module
      • Crash Reporter Module
      • Install Referrer Module
    • API Reference
    • Release Notes
  • Cordova 2.x
    • Overview
    • Install
    • Track
    • API Reference
    • Release Notes
  • Flutter 1.x
    • Overview
    • Install
    • Track
    • Consent Management
    • Data Management
    • API Reference
    • Release Notes
  • Flutter 2.x
    • Overview
    • Install
    • Track
    • Consent Management
    • Data Management
    • API Reference
      • Tealium
      • TealiumConfig
      • VisitorProfile
    • Release Notes
  • iOS (Objective-C)
    • Overview
    • Install
    • Track
    • Data Layer
    • Data Management
    • Consent Management
    • Tag Management
    • Module List
      • Lifecycle Tracking Module
    • tvOS
    • watchOS
    • API Reference
    • Release Notes
  • iOS (Swift) 1.x
    • Overview
    • Install
    • Track
    • Data Layer
    • Data Management
    • App Extensions
    • Identity Resolution
    • Consent Management
    • Modules
    • Module List
      • AppData Module
      • Attribution Module
      • AutoTracking Module
      • Collect Module
      • Connectivity Module
      • CrashReporter Module
      • DataSource Module
      • DefaultStorage Module
      • Delegate Module
      • DeviceData Module
      • DispatchQueue Module
      • FileStorage Module
      • Lifecycle Module
      • Location Module
      • Logger Module
      • PersistentData Module
      • RemoteCommands Module
      • TagManagement Module
      • VisitorService Module
      • VolatileData Module
    • Feature Comparison
    • Working with Objective-C
    • API Reference
      • TealiumConfig
      • TealiumConsentCategories
      • TealiumConsentManagerDelegate
      • TealiumConsentManager
      • TealiumInstanceManager
      • TealiumPersistentData
      • TealiumVolatileData
      • Tealium
    • Release Notes
  • iOS (Swift) 2.x
    • Overview
    • Install
    • Track
    • Data Layer
    • Consent Management
    • App Extensions
    • Identity Resolution
    • Modules
    • Module List
      • AppData Module
      • AdobeVisitorService Module
      • Attribution Module
      • AutoTracking Module
      • Collect Module
      • Connectivity Module
      • CrashReporter Module
      • DeviceData Module
      • In-App Purchase Module
      • Lifecycle Module
      • Location Module
      • Media Module
      • RemoteCommands Module
      • TagManagement Module
      • VisitorService Module
    • Working with Objective-C
    • API Reference
      • LocationModule
      • MediaSession
      • Tealium
      • TealiumConfig
      • TealiumConsentCategories
      • TealiumConsentManager
      • TealiumDataLayer
      • TealiumInstanceManager
    • Release Notes
  • NativeScript
    • Overview
    • Install
    • Track
    • API Reference
      • Tealium
      • TealiumConfig
    • Release Notes
  • React Native 1.x
    • Overview
    • Install
    • Track
    • API Reference
    • Release Notes
  • React Native 2.x
    • Overview
    • Install
    • Track
    • Location Module
    • API Reference
    • Release Notes
  • Unity 1.x
    • Overview
    • Install
    • Track
    • API Reference
  • Unity 2.x
    • Overview
    • Install
    • Track
    • API Reference
  • Xamarin 1.x
    • Overview
    • Install
    • Track
    • Data Management
    • Consent Management
    • API Reference
    • Release Notes
  • Xamarin 2.x
    • Overview
    • Install
    • Track
    • Data Layer
    • Consent Management
    • API Reference
    • Release Notes
  • Web
  • Getting Started
    • Overview
    • Quick Start Guide
    • Web Concepts
    • Data Layer
      • An Introduction to the Data Layer
      • How the Data Layer Works for Websites
      • Data Layer Best Practices
      • Definitions
        • Retail
        • Publisher
        • Hotel
        • Travel
        • Basic Video Tracking
  • Adobe Launch
    • Overview
    • Install
    • Data Layer
  • AMP
    • Overview
    • Install
    • Track
    • Data Layer
  • Angular
    • Overview
    • Install
    • Track
    • API Reference
  • Google Tag Manager
    • Overview
    • Install
    • Data Layer
  • JavaScript (Web)
    • Overview
    • Install
    • Track
    • Data Layer
    • Universal Data Object (utag_data)
    • Universal Tag (utag.js)
    • Data Layer Object (b)
    • Single-Page Applications
    • Settings
    • Debugging
    • API Reference
      • Cookie Functions
      • GDPR Functions
      • Tracking Functions
      • Utility Functions
    • Release Notes
  • Server
  • C#
    • Overview
    • Install
    • Track
    • Data Layer
    • API Reference
    • Release Notes
  • HTTP API
    • Overview
    • Endpoint
    • Data Layer
  • Java
    • Overview
    • Install
    • Track
    • API Reference
    • Release Notes
  • Node
    • Overview
    • Install
    • Track
    • API Reference
  • Python
    • Overview
    • Install
    • Track
    • API Reference
  • Roku
    • Overview
    • Install
    • Track
    • API Reference
  • Ruby
    • Overview
    • Install
    • Track
    • API Reference
ANDROID JAVA/MODULE LIST

Ad Identifier Module

Provides the ability to make use of the device “Ad Identifier” (ADID) to help identify interactions with display ad networks.

Requirements

  • Google Play Services SDK

Install

Install the Ad Identifier module with Maven or manually.

Maven

To install the Ad Identifier module with Maven:

  1. In your project’s top-level build.gradle file, add the following Maven repository:

    maven {
      url "https://maven.tealiumiq.com/android/releases/"
    }
    
  2. In your project module’s build.gradle file, add the following Maven dependency:

    dependencies{
      implementation 'com.tealium:library:5.8.0' //only required if you do not have this reference
      implementation 'com.tealium:adidentifier:1.0.4'
      implementation 'com.tealium:lifecycle:1.1.4' //only required if you do not already have this reference and require lifecycle tracking
    }
    
  3. In the same block where you instantiate the Tealium library, after instantiating Tealium, add the following:

    // import the Tealium AdIdentifier module in the import section
    import com.tealium.adidentifier.AdIdentifier;
    
    // context to pass to AdIdentifier module
    Context mContext = this;
    
    // substitute the example instance name here with the same instance name you used when initializing the Tealium library
    private static final String TEALIUM_INSTANCENAME = "INSTANCE_NAME";
    
    // call this to store the referrer as Persistent data - recommended
    AdIdentifier.setIdPersistent(TEALIUM_INSTANCENAME, mContext);
    
    // call this to store the referrer as Volatile data (reset at app restart/terminate) - not recommended in most cases
    AdIdentifier.setIdVolatile(TEALIUM_INSTANCENAME, mContext);
    

Manual

To install the Ad Identifier module manually:

  1. Download the Tealium AdIdentifier module.

  2. In your top-level build.gradle file, verify the following:

    allprojects {
      repositories {
         jcenter()
         flatDir {
              dirs 'libs'
        }
      }
    }
    
  3. Copy the file tealium.adidentifier-1.0.4.aar into your project’s <PROJECT_ROOT>/<MODULE>/libs directory.

  4. Add the Tealium library dependency to your project module’s build.gradle file:

    dependencies {
      // only required if you do not already have this reference
      implementation (name:'tealium-5.8.0', ext:'aar')
      implementation (name:'tealium.adidentifier-1.0.4', ext:'aar')
      // only required if you do not already have this reference and require lifecycle tracking
      implementation (name:'tealium.lifecycle-1.1.4', ext:'aar')
    }
    

Additional Considerations

  • Blocked Access
    If the user has not allowed access to the Ad Identifier, the module sets the google_adid variable to the string “Ad Tracking Disabled”, which is handled in your Tealium iQ configuration to ensure you pass the expected data to your third-party vendors.

  • Delete the Ad Identifier
    To delete the stored Ad Identifier string, call the standard methods provided by the Tealium library to remove variables from persistent or volatile storage. The key name for the variable is exposed by the TealiumAdIdentifier class. Here’s an example to remove the stored Ad Identifier from both persistent and volatile data. This code has no effect and does not throw an error if the variable doesn’t already exist.

    // import the Tealium AdIdentifier module in the import section
    import com.tealium.adidentifier.AdIdentifier;
    
    private static final String TEALIUM_INSTANCENAME = "INSTANCE_NAME";
    final Tealium instance = Tealium.getInstance(TEALIUM_INSTANCENAME);
    
    // remove from persistent data store
    instance.getDataSources().getPersistentDataSources().edit().remove(AdIdentifier.KEY_GOOGLE_ADID).apply();
    
    // remove from volatile data store (session only)
    instance.getDataSources().getVolatileDataSources().remove(AdIdentifier.KEY_GOOGLE_ADID);
    

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 ID ca-app-pub-0123456789012345~0123456789

API Reference

For the complete reference of methods for the Ad Identifier module, see the AdIdentifier class in the Tealium SDK for Android API.

Next
Crash Reporter Module
"Crash Reporter Module"

 

Was this article helpful?

This page was last updated: February 2, 2021      

Thank you for your feedback!

Table of Contents

  • Requirements
  • Install
    • Maven
    • Manual
  • Additional Considerations
  • Data Layer
  • API Reference
  • Platforms
  • Partners
  • Forums
  • Mobile
  • Getting Started
  • Remote Commands
  • Android (Java)
  • Android (Kotlin)
  • Cordova 1.x
  • Cordova 2.x
  • Flutter 1.x
  • Flutter 2.x
  • iOS (Objective-C)
  • iOS (Swift) 1.x
  • iOS (Swift) 2.x
  • NativeScript
  • React Native 1.x
  • React Native 2.x
  • Unity 1.x
  • Unity 2.x
  • Xamarin 1.x
  • Xamarin 2.x
  • Web
  • Getting Started
  • Adobe Launch
  • AMP
  • Angular
  • Google Tag Manager
  • JavaScript (Web)
  • Server
  • C#
  • HTTP API
  • Java
  • Node
  • Python
  • Roku
  • Ruby