Skip to main content
Understanding cohorts and activations is fundamental to using the Permutive SDK effectively.

Cohorts

Activations

Contextual

What are Cohorts?

Cohort Types

What are Activations?

Available Activation Types

Cohorts vs. Activations

In the SDK, access cohorts via currentCohorts and activations via currentActivations. Example:

Accessing Cohorts and Activations

Get all cohorts the user currently belongs to:
currentCohorts and currentActivations return snapshot values at the time they’re called. For real-time updates, use TriggersProvider.

Use Cases

Activations are automatically used by our add-on libraries:

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

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
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.
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

  • Use currentCohorts for 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)

Triggers Provider

Reactive cohort updates

Contextual Data

Content-based segmentation

Google Ad Manager

GAM integration

Xandr Integration

AppNexus integration