Skip to main content

YouTube

YouTube

DirectionDestination
Environment
WebiOSAndroidCTV
Capability
Cohort Activation
SDK RequiredYes
Product(s) RequiredCore Platform

YouTube is the world’s largest video platform, enabling content creators and advertisers to reach global audiences.

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

Environment Compatibility

EnvironmentSupportedNotes
WebYesEmbedded YouTube player with IFrame API
iOSYesCustom implementation required—contact your CSM
AndroidYesCustom implementation required—contact your CSM
CTVYesCustom implementation required—contact your CSM
API DirectNo

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

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.
Permutive cohorts are passed to YouTube player ad requests as key-value pairs, enabling real-time targeting based on your audience segments.
permutive
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,ghi789
_pdfps
array
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.
cust_params
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%2Cghi789
embedConfig
object
For Web implementations using YouTube IFrame API, the configuration object passed to the player that includes ad targeting parameters.

Troubleshooting

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
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();
}]);
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
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 [email protected] has the required permissions in your GAM account

Changelog

For detailed changelog information, visit our Changelog.