Single Identity
Multiple Identities
AAID Provider
Overview
In the Android SDK, you can set aliases using thesetIdentity() method or configure automatic identity providers like AAID at initialization.
Key Concepts
Alias
Alias
Identity Resolution
Identity Resolution
Priority System
Priority System
Setting Identity
- Single Identity
- Multiple Identities
- At Initialization
Security Best Practices
- Correct - Hashed
- Incorrect - Plain Text
Standard Tag Names
Automatic Identity Providers
AAID (Android Advertising ID)
Use the Google Ads add-on for automatic AAID identification:1
Add Dependency
2
Add Permission
In your
AndroidManifest.xml:From Android 13 (API 33+), the AD_ID permission is required to access the advertising ID.
3
Configure SDK
"aaid".Common Patterns
Login Flow
Login Flow
Logout Flow
Logout Flow
Guest to Logged-In Transition
Guest to Logged-In Transition
Expiry
Aliases can expire automatically, useful for GDPR compliance, ad IDs, and session identifiers.Troubleshooting
Identity not resolving
Identity not resolving
Problem: Setting identity doesn’t seem to merge user data.Solutions:
- Check network connectivity
- Verify alias has been used in other sessions/devices
- Enable debug logging:
permutive.setDeveloperMode(true) - Look for “Identified user with aliases” in logs
User identity split
User identity split
Problem: Same user appears as two different users.Solution: Use consistent alias tags and values. When user logs in on multiple devices, use the same alias (e.g., hashed email).
PII concerns
PII concerns
Problem: Worried about sending personally identifiable information.Solution:
- Always hash emails and other PII with SHA-256
- Normalize data before hashing (lowercase, trim whitespace)
- Never send raw email addresses, phone numbers, or names
Best Practices
- Do
- Don't
- Hash PII (especially email addresses) before setting as identity
- Use meaningful tag names that describe the identifier type
- Set priorities based on reliability and persistence
- Use expiry dates for temporary or less reliable identifiers
- Set identity as early as possible in the user journey
- Test identity resolution with debug logging enabled
Related Documentation
AAID Provider
Automatic advertising ID tracking
Cohorts & Activations
Understanding user segments
Triggers Provider
React to cohort changes
Issues
Solutions to common issues