YouTube is the world’s largest video platform, enabling publishers to embed and monetize video content through various advertising formats. This integration enables cohort activation for video ads served in YouTube players embedded on your own website or app.This integration is a Destination:
Destination: Permutive cohorts are passed to YouTube IFrame Player ad requests as key-value parameters for real-time targeting.
Use cases include:
Target video ads in embedded YouTube players with Permutive cohorts
Deliver personalized video advertising based on user behavior and interests
Optimize video ad inventory monetization with audience targeting
Enable real-time cohort activation for pre-roll, mid-roll, and post-roll video ads
Before setting up YouTube targeting, you must enable the Google Ad Manager integration in the Permutive dashboard. See the Google Ad Manager integration documentation for detailed setup instructions.
2
Enable GAM Activation Sync for Cohorts
Navigate to the cohorts you want to target in embedded YouTube players in the Permutive dashboard. Enable the Google Ad Manager Activation Sync for each cohort. This will make the cohorts available in localStorage for targeting.
3
Configure Your YouTube Player
Follow the environment-specific tab (Web, iOS, Android, or CTV) for detailed implementation steps for your YouTube player. Each platform requires passing Permutive cohort IDs as custom parameters in video ad requests.
4
Verify Targeting
Test your implementation to ensure cohort IDs are being passed correctly in ad requests from the YouTube player. Use your browser’s developer tools or platform-specific debugging tools to inspect ad request parameters.
When initializing the YouTube IFrame Player, pass cohort IDs through the embedConfig object. Use adsConfig.adTagParameters.cust_params to pass custom targeting parameters.
The cust_params value must be URI-encoded as required by Google Ad Manager.
Verify that cohort IDs are being passed correctly:
Check your browser’s network tab for ad requests from the YouTube player
Look for the cust_params parameter in ad request URLs
Confirm the permutive key-values are present and properly encoded
If the YouTube player loads before the Permutive SDK has run on the page, the cohort IDs retrieved from localStorage may not be updated from the previous pageview. Consider delaying player initialization until after Permutive has loaded.
For iOS apps embedding YouTube players with Permutive cohort targeting, the typical approach involves using Google’s Interactive Media Ads (IMA) SDK to pass cohort IDs as custom parameters in video ad requests.
Contact your Permutive Customer Success Manager for guidance on implementing cohort targeting in embedded YouTube players on iOS. They can provide recommendations based on your specific app architecture and ad serving configuration.
For Android apps embedding YouTube players with Permutive cohort targeting, the typical approach involves using Google’s Interactive Media Ads (IMA) SDK to pass cohort IDs as custom parameters in video ad requests.
Contact your Permutive Customer Success Manager for guidance on implementing cohort targeting in embedded YouTube players on Android. They can provide recommendations based on your specific app architecture and ad serving configuration.
For CTV applications embedding YouTube players with Permutive cohort targeting, the typical approach involves using Google’s Interactive Media Ads (IMA) SDK to pass cohort IDs as custom parameters in video ad requests. Implementation details will vary by platform (e.g., Roku, Fire TV, Apple TV).
Contact your Permutive Customer Success Manager for guidance on implementing cohort targeting in embedded YouTube players on CTV. They can provide recommendations based on your specific CTV platform and ad serving configuration.
Comma-separated list of Permutive cohort IDs that the user belongs to. Passed via cust_params parameter in video ad requests.Example: permutive=abc123,def456,ghi789
For Web implementations, cohort IDs are retrieved from the localStorage variable _pdfps which contains an array of cohort IDs the user belongs to. Updated in real-time as users qualify for cohorts.
The custom parameters field in YouTube IFrame API’s adsConfig.adTagParameters or IMA SDK’s ad request. Must be URI-encoded.Example: cust_params=permutive%3Dabc123%2Cdef456%2Cghi789
Cohorts not appearing in ad requests (Embedded Player)
If cohort IDs are not being passed to your YouTube player ad requests:
Check localStorage: Open your browser’s developer console and inspect localStorage._pdfps to verify cohort IDs are being stored
Verify GAM Activation: Ensure the cohorts have GAM Activation Sync enabled in the Permutive dashboard
Check timing: The YouTube player may be loading before Permutive has run. Consider delaying player initialization until after Permutive loads
Verify encoding: Ensure cust_params values are properly URI-encoded using encodeURIComponent()
Inspect network requests: Use your browser’s network tab to inspect ad requests and verify the permutive key-values are present in cust_params
Cohorts not updating from previous pageview
If the YouTube player is showing cohort data from a previous pageview:
Problem: The video/player loads before Permutive SDK has executed on the current page, so localStorage._pdfps contains stale cohort IDs
Solution: Delay YouTube player initialization until after Permutive has loaded. You can use Permutive’s ready callback:
window.permutive = window.permutive || [];window.permutive.push(['ready', function() { // Initialize YouTube player here onYouTubeIframeAPIReady();}]);
Cohorts not appearing in mobile/CTV implementations
If cohort IDs are not being passed in mobile or CTV implementations:
Verify SDK integration: Ensure the Permutive SDK is properly integrated on your mobile/CTV platform
Check cohort retrieval: Verify you’re correctly retrieving cohort IDs from the Permutive SDK using the platform-specific method
Verify parameter encoding: Ensure parameters are properly URI-encoded before including in ad requests
Test with debugging tools: Use platform-specific debugging tools to inspect ad requests and verify parameters are included
Contact your CSM: Mobile and CTV implementations can vary significantly—reach out to your Permutive Customer Success Manager for platform-specific guidance
GAM integration not enabled
The YouTube integration requires Google Ad Manager to be set up first: