What are Cohorts
A cohort is a privacy-safe representation of an audience.Traditionally, user IDs like third-party cookies have been used to communicate information about audiences and activate (target) them. A publisher might communicate behavioral data for a user to an ad server by attaching the data to a cookie ID. The ad server uses the cookie ID to record information about the user—both information from the publisher and other data parties they work with—and the ad server can later target an ad for a request from that user based on the information it has attached to their cookie ID.With cohorts, a code represents the group of users that fall into an audience. In the example above, when the publisher requests an ad from the ad server for the user, it includes the cohort code in the request, but not a user ID. The ad server can use the cohort code(s) to decision on the ad to respond with, but no other publisher or user data is leaked and a profile of the user cannot be built.By removing user identifiers from the equation, users' privacy is protected, the publisher's data cannot be targeted off of their site/app, and publishers can provide reachability (scale) to the ecosystem since cohorts can be built & activated in environments like Apple Safari, Mozilla Firefox, and iOS where third-party cookies and other deterministic identifiers are prohibited.Cohort Types
- Behavioral
- Classification Model
- Contextual
Based on user actions and event patterns tracked through the SDK.Example: A user who reads 5+ sports articles becomes part of the "sports_enthusiast" cohort.
User reads article about tennis
↓
Track event: "Pageview" with properties
↓
Permutive evaluates: "User read 3+ sports articles in 7 days?"
↓
User enters cohort: "sports_enthusiast"How Cohorts Work
- Events are tracked via the SDK (pageviews, custom events, etc.)
- Rules are evaluated against user behavior
- Users enter/exit cohorts based on rule matching
- Cohorts are stored locally in the browser
- Cohorts are passed to ad platforms for targeting
Activations
Activations are subsets of cohorts configured for specific ad platforms. Not all cohorts are activated for all platforms—activations allow you to control which cohorts are sent to which ad networks.Why use Activations?
Why use Activations?
- Platform-specific targeting - Different ad platforms may need different cohorts
- Data governance - Control which platforms receive which user segments
- Performance optimization - Only send relevant cohorts to each platform
- Compliance - Manage consent and privacy requirements per platform
Activation Types
| Activation Type | Platform | Use Case |
|---|---|---|
dfp | Google Ad Manager | Standard behavioral cohort activations |
dfp_contextual | Google Ad Manager | Real-time contextual cohorts |
appnexus_adserver | Xandr/AppNexus | Standard behavioral cohort activations |
appnexus_adserver_contextual | Xandr/AppNexus | Real-time contextual cohorts |
freewheel | Freewheel | CTV/video ad targeting |
Cohorts vs Activations
| Aspect | Cohorts | Activations |
|---|---|---|
| Definition | All segments a user belongs to | Cohorts configured for specific platforms |
| Scope | Entire Permutive system | Platform-specific |
| Purpose | User segmentation | Ad targeting |
| Configuration | Automatic based on events | Configured in dashboard |
Accessing Cohorts
Get All Segments
Get Platform-Specific Segments
Check Single Cohort Membership
Wait for Cohort Data
Useready() with the 'realtime' stage to ensure cohort data is available:
Real-Time Triggers
React to cohort changes as they happen:localStorage Structure
Cohorts are stored in localStorage for fast access and ad targeting:| Key | Purpose |
|---|---|
_psegs | All cohorts |
_pdfps | Google Ad Manager (DFP) activations |
_papns | AppNexus activations |
_prubicons | Rubicon activations |
_ppubmatics | PubMatic activations |
Using Cohorts with Ad Platforms
Google Ad Manager
Prebid.js
Cohorts are automatically passed to Prebid via the RTD module. See Prebid Integration.AppNexus/Xandr
Cohort Patterns
- Personalization
- Paywall
- A/B Testing
- Analytics
Event-Based Cohort Updates
Cohorts update in real-time as users take actions:Debugging Cohorts
Enable debug mode to see cohort activity:Troubleshooting
segments() returns empty array
segments() returns empty array
Problem: No cohorts even after tracking events.Solutions:
- Use
ready('realtime')to wait for data - Check that events are being tracked (debug mode)
- Verify cohorts are configured in dashboard
- Ensure user hasn’t opted out (consent)
- Allow time for cohort processing (seconds to minutes)
User doesn't enter expected cohort
User doesn't enter expected cohort
Problem: Events tracked but user not in cohort.Solutions:
- Verify cohort rules in dashboard
- Check event properties match rule conditions
- Confirm cohort is active (not paused/archived)
- Check cohort minimum threshold/frequency
Activations not matching cohorts
Activations not matching cohorts
Problem: User in cohort but activation array differs.Solutions:
- Check that cohort is activated for the platform
- Verify activation configuration in dashboard
- Use correct type parameter:
segments(cb, 'dfp')
Stale cohort data
Stale cohort data
Problem: Cohorts not updating after new events.Solutions:
- Cohorts update in real-time but may take a few seconds
- Refresh page to trigger re-evaluation
- Check that new events are actually being tracked
- Use
trigger()for real-time change detection