Overview
Contextual Cohorts enable publishers to target ads based on contextual data derived from page content without processing or storing any user data. Since no user consent is required, Contextual Cohorts allow publishers to reach users who have not given consent and cannot be targeted with behavioral data today.Contextual Cohorts work by analyzing page-level signals such as automated content classifications, editorial metadata, and affinity scores from consented users. This enables publishers to create a differentiated contextual targeting offering that combines the precision of content understanding with the unique insights from their first-party data. In the iOS SDK, contextual cohorts are generated in real-time when you track pages or videos with URLs. The SDK automatically includes these cohorts in ad requests alongside behavioral cohorts.Requirements
- SDK Version: 2.0.0 or higher
- Platform: iOS 12.0+ / tvOS 12.0+
- Feature Enablement: Contact your Customer Success Manager
Feature Activation Required: Contextual content classification must be enabled by Permutive for your workspace. Please contact your Customer Success Manager if you’d like to use this feature.
How It Works
Content analyzed
Permutive analyzes the content at the URL (page title, main text, keywords, IAB categories, sentiment)
Implementation
Page Tracking with Contextual Data
Simply include URLs when tracking pages - contextual analysis happens automatically:Accessing Contextual Cohorts
Contextual cohorts are automatically included in activations with special keys:In Current Activations
In Ad Requests
Contextual cohorts are automatically included when usinggoogleCustomTargeting:
Performance Considerations
Content Analysis Timing
- First analysis: May take 1-2 seconds for initial content fetch and analysis
- Cached results: Subsequent views of the same URL use cached analysis
- Background processing: Analysis happens asynchronously, doesn’t block UI
- Network required: Content classification requires network connectivity
Best Practices for Performance
Privacy and Compliance
Privacy-Friendly Targeting
Contextual Cohorts operate entirely on page-level data, requiring no user consent. This enables publishers to monetize inventory from users who haven't consented to data collection, expanding addressable inventory while maintaining privacy compliance.Key privacy benefits:- No user data processing - Targets content, not user behavior
- No consent required - Works for all users regardless of consent status
- No cross-site tracking - Only analyzes current page content
- Cookie-less - Works without third-party cookies or persistent identifiers
Data Sent for Analysis
When tracking a page with a URL:- URL - The page URL for content fetching
- Title - Page title (if provided)
- No PII - No personal information sent for classification
Error Handling
Classification Failures
Contextual classification may fail if:- URL is not publicly accessible
- Content is behind a paywall or login
- Network connectivity issues
- Server-side analysis errors
Debugging Classification
Enable debug logging to see classification status:Use Cases
Content-Aligned Advertising
Contextual + Behavioral Targeting
Combine contextual and behavioral cohorts for powerful targeting:Contextual vs. Behavioral Cohorts
| Aspect | Behavioral Cohorts | Contextual Cohorts |
|---|---|---|
| Based on | User history | Current content |
| Speed | Minutes to hours | Real-time |
| Persistence | Long-term | Session/page |
| Privacy | Requires user profile | No profiling needed |
| Accuracy | Improves over time | Immediate |
| Use Case | Audience targeting | Content alignment |
dfp_contextual and appnexus_adserver_contextual, while behavioral cohorts use dfp and appnexus_adserver.
When to Use Each
Use Behavioral Cohorts When:- Building long-term audience segments
- Retargeting campaigns
- Personalization based on user history
- Lookalike modeling
- Real-time content alignment needed
- Privacy regulations are strict
- New users without history
- Brand safety is critical
- Cookie-less environment
- Maximum targeting precision needed
- Combining user intent (contextual) with user interests (behavioral)
- Premium inventory requires both signals
tvOS Considerations
tvOS Note: Contextual data works identically on tvOS. Provide URLs in the Context when creating PageTrackers for content analysis.
Troubleshooting
No contextual cohorts appearing
No contextual cohorts appearing
Problem:
dfp_contextual is empty or not present.Possible Causes & Solutions:-
Feature not enabled
- Contact Customer Success Manager to enable
-
SDK version too old
- Update to SDK 2.0.0+
-
No URL tracked
- Ensure you’re using
PageTrackerwith a Context that has a valid URL
- Ensure you’re using
-
Classification in progress
- First analysis may take 1-2 seconds
- Check again after a moment
-
URL not accessible
- Ensure URL is publicly accessible
- Remove authentication requirements for analysis
-
Network issues
- Check device connectivity
- Look for network errors in logs
Classification taking too long
Classification taking too long
Problem: Contextual cohorts not appearing before ads load.Solutions:
- Start page tracking earlier in view lifecycle
- Consider delaying ad request slightly if contextual is critical
- Use behavioral cohorts as fallback
Wrong contextual cohorts
Wrong contextual cohorts
Problem: Cohorts don’t match content.Possible Causes:
- URL points to different content than displayed
- Content changed since classification
- Cache from previous analysis
- Ensure URL matches actual content
- Use unique URLs for different content
- Wait for cache expiry or contact support to invalidate
Best Practices
Do
- Track pages with URLs as early as possible
- Use publicly accessible URLs
- Ensure URLs are stable and won’t change
- Test with debug logging enabled
- Use unique URLs for different content
- Combine with behavioral targeting for best results
Don’t
- Use authentication-protected URLs
- Track pages without URLs (contextual won’t work)
- Expect instant results (allow 1-2 seconds)
- Rely solely on contextual for returning users
- Use duplicate URLs for different content