Cohorts
Activations
Contextual
What are Cohorts?
Cohort Types
What are Activations?
Available Activation Types
Cohorts vs. Activations
In the SDK, access cohorts viacurrentCohorts and activations via currentActivations.
Example:
Accessing Cohorts and Activations
- Get Cohorts
- Get Activations
- Reactive Updates
Get all cohorts the user currently belongs to:
Use Cases
Personalization
Personalization
Feature Flags / A/B Testing
Feature Flags / A/B Testing
Dynamic Ad Targeting
Dynamic Ad Targeting
Activations are automatically used by our add-on libraries:
Analytics and Logging
Analytics and Logging
Contextual Cohorts in Detail
Contextual cohorts require SDK version 1.10.0+, feature enabled by your CSM, and page/video tracking with URLs.Contextual Data Guide
Complete contextual cohorts documentation
Deprecated APIs
The SDK previously used integer-based segment IDs. These are now deprecated:Classification Model cohorts and contextual cohorts use string identifiers. The new APIs support all cohort types uniformly.
Troubleshooting
Empty cohorts list
Empty cohorts list
Problem:
currentCohorts returns an empty list.Solutions:- Wait a few seconds after initialization
- Track some events and check again
- Use TriggersProvider for reactive updates
- Enable debug logging to see sync status
Activations different from cohorts
Activations different from cohorts
Problem: User is in a cohort but it doesn’t appear in activations.Cause: Not all cohorts are activated for all platforms. This is configured in your Permutive dashboard.Solution: Check your dashboard configuration or contact your Customer Success Manager.
Contextual cohorts not appearing
Contextual cohorts not appearing
Problem:
dfp_contextual activations are empty.Solutions:- Verify feature is enabled with your CSM
- Update to SDK 1.10.0+
- Ensure you’re using PageTracker with valid URLs
- Check debug logs for classification errors
Best Practices
- Do
- Don't
- Use
currentCohortsfor one-time checks - Use TriggersProvider for reactive updates
- Check activation keys exist before accessing
- Handle empty lists gracefully
- Log cohorts for debugging (in development only)
Related Documentation
Triggers Provider
Reactive cohort updates
Contextual Data
Content-based segmentation
Google Ad Manager
GAM integration
Xandr Integration
AppNexus integration