YouTube
YouTube is the world’s largest video platform, enabling content creators and advertisers to reach global audiences.
Setup
Troubleshooting
Looking to target ads on YouTube.com or your YouTube channel instead? See the YouTube.com Integration.
Overview
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.
- 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
Environment Compatibility
Prerequisites
- Google Ad Manager Integration: The GAM integration must be enabled in Permutive before setting up YouTube targeting.
- Permutive SDK: The Permutive SDK must be installed on your website or app where the YouTube player is embedded.
- Cohorts with GAM Activation: Cohorts must have GAM Activation Sync enabled in the Permutive dashboard.
- YouTube IFrame API (Web): You must be using the YouTube IFrame Player API to embed videos.
- Access to Player Configuration: You need the ability to modify your YouTube player configuration code to pass custom parameters.
Setup
- Primary Setup Steps
- Web
- iOS
- Android
- CTV
1
Enable Google Ad Manager Integration
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.
Data Types
Permutive cohorts are passed to YouTube player ad requests as key-value parameters, enabling real-time targeting for video ads in embedded players.Cohort Activation Data
Cohort Activation Data
Permutive cohorts are passed to YouTube player ad requests as key-value pairs, enabling real-time targeting based on your audience segments.
string
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,ghi789array
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.string
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%2Cghi789object
For Web implementations using YouTube IFrame API, the configuration object passed to the player that includes ad targeting parameters.
Troubleshooting
Cohorts not appearing in ad requests (Embedded Player)
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._pdfpsto 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_paramsvalues are properly URI-encoded usingencodeURIComponent() - Inspect network requests: Use your browser’s network tab to inspect ad requests and verify the
permutivekey-values are present incust_params
Cohorts not updating from previous pageview
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._pdfpscontains stale cohort IDs - Solution: Delay YouTube player initialization until after Permutive has loaded. You can use Permutive’s ready callback:
Cohorts not appearing in mobile/CTV implementations
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
GAM integration not enabled
The YouTube integration requires Google Ad Manager to be set up first:
- Prerequisite: Complete the Google Ad Manager integration setup before configuring YouTube targeting
- Verify GAM connection: In the Permutive dashboard, check that GAM is listed under Integrations and shows as connected
- Check permissions: Ensure dfp@permutive.com has the required permissions in your GAM account
Changelog
For detailed changelog information, visit our Changelog.