Skip to main content

Privacy & Compliance Guide

The Teads SDK is designed with privacy at its core, providing comprehensive tools for managing user consent and ensuring compliance with global privacy regulations. This guide covers everything you need to know about privacy management, consent handling, and regulatory compliance.

Overview

The SDK includes the TeadsPrivacy component that:

  • ✅ Automatically detects and respects IAB consent strings
  • ✅ Supports GDPR, CCPA, and GPP frameworks
  • ✅ Manages Android Advertising ID consent
  • ✅ Provides manual consent configuration options
  • ✅ Ensures end-to-end privacy compliance

Supported Privacy Standards

🇪🇺 GDPR (General Data Protection Regulation)

Full support for European privacy requirements including:

  • IAB TCF v1.1 and v2.0 consent strings
  • Purpose and vendor consent management
  • Legitimate interest handling

🇺🇸 CCPA (California Consumer Privacy Act)

Complete CCPA compliance with:

  • IAB US Privacy String support
  • Opt-out mechanism implementation
  • Sale of personal information controls

🌍 GPP (Global Privacy Platform)

Support for the IAB's Global Privacy Platform:

  • Multi-jurisdiction privacy signals
  • Section-specific consent handling
  • Future-proof privacy framework

Basic Implementation

Automatic Privacy Detection

The SDK automatically detects and respects privacy signals from your CMP (Consent Management Platform).

// The SDK automatically reads consent from SharedPreferences
// No additional configuration needed if using IAB-compliant CMP

Complete Privacy Implementation Example

Here's a comprehensive example combining all privacy frameworks for apps with custom consent implementations, meaning for when you are not using a CMP to handle it on your behalf:

import tv.teads.sdk.combinedsdk.privacy.TeadsPrivacy
import android.content.Context

// Define the callback interface
interface AdvertisingIDCallback {
fun onAdvertisingIDReceived(advertisingId: String?)
fun onAdvertisingIDError(exception: Exception)
}

object PrivacyConfiguration {

fun configureAllPrivacySettings(context: Context) {
// Set GDPR applies flag
TeadsPrivacy.setGDPRApplies(true)

// Set GDPR TCF v2 consent string
TeadsPrivacy.setGDPRConsentStringV2("YOUR_TCF_V2_CONSENT_STRING")

// Set GDPR TCF v1 consent string (if using legacy CMP)
TeadsPrivacy.setGDPRConsentStringV1("YOUR_TCF_V1_CONSENT_STRING")

// Set US Privacy (CCPA) string
TeadsPrivacy.setUSPrivacyString("1YNN")

// Set GPP consent string
TeadsPrivacy.setGPPString("YOUR_GPP_CONSENT_STRING")

// Set GPP sections
TeadsPrivacy.setGPPSections("1,2,3")

// Request Android Advertising ID
TeadsPrivacy.requestAdvertisingID(
context,
object : AdvertisingIDCallback {
override fun onAdvertisingIDReceived(advertisingId: String?) {
// Handle advertising ID result
}

override fun onAdvertisingIDError(exception: Exception) {
// Handle advertising ID error
}
}
)

// Clear all custom settings (if needed)
TeadsPrivacy.clearAllCustomSettings()
}
}

Testing Privacy Compliance

Debug Privacy Settings

object TeadsPrivacyDebug {

fun debugPrintPrivacyStatus(context: Context) {
Log.d("PrivacyStatus", "=== Privacy Status ===")
Log.d("PrivacyStatus", "GDPR Applies: ${TeadsPrivacy.gdprApplies(context)}")
Log.d("PrivacyStatus", "GDPR Consent V2: ${TeadsPrivacy.gdprConsentStringV2(context) ?: "none"}")
Log.d("PrivacyStatus", "GDPR Consent V1: ${TeadsPrivacy.gdprConsentStringV1(context) ?: "none"}")
Log.d("PrivacyStatus", "US Privacy: ${TeadsPrivacy.usPrivacyString(context) ?: "none"}")
Log.d("PrivacyStatus", "GPP String: ${TeadsPrivacy.gppString(context) ?: "none"}")
Log.d("PrivacyStatus", "GPP Sections: ${TeadsPrivacy.gppSections(context) ?: "none"}")
Log.d("PrivacyStatus", "CMP Present: ${TeadsPrivacy.isCMPPresent(context)}")
Log.d("PrivacyStatus", "Has GDPR Consent for Teads: ${TeadsPrivacy.hasGDPRConsentForTeads(context)}")
Log.d("PrivacyStatus", "US Privacy Opted Out: ${TeadsPrivacy.usPrivacyStringHasOptedOutOfSale(context)}")
Log.d("PrivacyStatus", "===================")
}
}

// Usage
if (BuildConfig.DEBUG) {
TeadsPrivacyDebug.debugPrintPrivacyStatus(context)
}

Privacy Checklist

Implementation Checklist

  • Consent Management

    • Request user consent before ad loading
    • Implement or integrate CMP
    • Handle GDPR consent
    • Handle CCPA compliance
    • Support GPP if applicable
  • Testing

    • Test with consent given
    • Test with consent denied
    • Test consent changes
    • Test different geographic regions

Best Practices

1. Early Initialization

Initialize privacy settings as early as possible:

With CMP (Automatic):

class MainApplication : Application() {
override fun onCreate() {
super.onCreate()

// Initialize CMP
// CMP automatically writes to SharedPreferences
// SDK reads consent automatically - no manual setup needed
// Initialize SDK and load the placements
}
}

Manual Configuration:

class MainApplication : Application() {
override fun onCreate() {
super.onCreate()

// Manual privacy configuration
TeadsPrivacy.setGDPRApplies(true)
TeadsPrivacy.setGDPRConsentStringV2("YOUR_CONSENT_STRING")
TeadsPrivacy.setUSPrivacyString("1YNN")

// Initialize SDK and load the placements
}
}

Additional Resources

Support

For privacy-related questions:


Privacy is fundamental to building trust with your users. The Teads SDK helps you maintain that trust while maximizing monetization opportunities.