> ## Documentation Index
> Fetch the complete documentation index at: https://docs.permutive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube

> Target ads on YouTube.com and YouTube channels using Google Audience within Google Ad Manager

export const NoBadge = () => {
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.5rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: '#F7D0E2',
    color: '#1A1A1A',
    fontWeight: '500'
  }}>
      No
    </span>;
};

export const YesBadge = () => {
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.5rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: '#C7E8F9',
    color: '#1A1A1A',
    fontWeight: '500'
  }}>
      Yes
    </span>;
};

export const BadgeRowCenter = ({label, children}) => {
  return <div style={{
    display: 'flex',
    justifyContent: 'space-between',
    alignItems: 'center',
    marginBottom: '0.5rem'
  }}>
      <span style={{
    fontSize: '0.625rem',
    color: '#6b7280',
    textTransform: 'uppercase',
    fontWeight: '500',
    letterSpacing: '0.05em'
  }}>
        {label}
      </span>
      {children}
    </div>;
};

export const BadgeRow = ({label, children}) => {
  return <div style={{
    display: 'flex',
    justifyContent: 'space-between',
    alignItems: 'flex-start',
    marginBottom: '0.5rem'
  }}>
      <span style={{
    fontSize: '0.625rem',
    color: '#6b7280',
    textTransform: 'uppercase',
    fontWeight: '500',
    letterSpacing: '0.05em'
  }}>
        {label}
      </span>
      {children}
    </div>;
};

export const BadgeContainer = ({children}) => {
  return <div style={{
    display: 'flex',
    gap: '0.25rem',
    flexWrap: 'wrap',
    justifyContent: 'flex-end',
    minWidth: '0',
    flex: '1'
  }}>
      {children}
    </div>;
};

export const ProductRequiredBadge = ({product}) => {
  const getBadgeStyle = product => {
    switch (product) {
      case 'Core Platform':
        return {
          background: '#CB88FC',
          color: '#1A1A1A'
        };
        --purple;
      case 'Routing':
        return {
          background: '#CB88FC',
          color: '#1A1A1A'
        };
        --purple;
      case 'Contextual':
        return {
          background: '#CB88FC',
          color: '#1A1A1A'
        };
        --purple;
      default:
        return {
          background: '#A7B3D9',
          color: '#1A1A1A'
        };
        --haze;
    }
  };
  const style = getBadgeStyle(product);
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.375rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: style.background,
    color: style.color,
    fontWeight: '500'
  }}>
      {product}
    </span>;
};

export const SdkRequiredBadge = ({required}) => {
  const getBadgeStyle = required => {
    switch (required) {
      case 'Yes':
        return {
          background: '#C7E8F9',
          color: '#1A1A1A'
        };
        --blue;
      case 'No':
        return {
          background: '#F7D0E2',
          color: '#1A1A1A'
        };
        --pink;
      default:
        return {
          background: '#A7B3D9',
          color: '#1A1A1A'
        };
        --haze;
    }
  };
  const style = getBadgeStyle(required);
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.375rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: style.background,
    color: style.color,
    fontWeight: '500'
  }}>
      {required}
    </span>;
};

export const CapabilityBadge = ({capability}) => {
  const getBadgeStyle = capability => {
    switch (capability) {
      case 'Event Collection':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Cohort Activation':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Campaign Optimization':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Identity Signal':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Contextual Signal':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Connectivity':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Routing':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      case 'Data Collaboration':
        return {
          background: '#EFDFC8',
          color: '#1A1A1A'
        };
        --clay;
      default:
        return {
          background: '#A7B3D9',
          color: '#1A1A1A'
        };
        --haze;
    }
  };
  const style = getBadgeStyle(capability);
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.375rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: style.background,
    color: style.color,
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
      {capability}
    </span>;
};

export const EnvironmentBadge = ({environment}) => {
  const getBadgeStyle = environment => {
    switch (environment) {
      case 'Web':
        return {
          background: '#F9C1A8',
          color: '#1A1A1A'
        };
        --peach;
      case 'iOS':
        return {
          background: '#F9C1A8',
          color: '#1A1A1A'
        };
        --peach;
      case 'Android':
        return {
          background: '#F9C1A8',
          color: '#1A1A1A'
        };
        --peach;
      case 'CTV':
        return {
          background: '#F9C1A8',
          color: '#1A1A1A'
        };
        --peach;
      case 'API Direct':
        return {
          background: '#F9C1A8',
          color: '#1A1A1A'
        };
        --peach;
      default:
        return {
          background: '#A7B3D9',
          color: '#1A1A1A'
        };
        --haze;
    }
  };
  const style = getBadgeStyle(environment);
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.375rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: style.background,
    color: style.color,
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
      {environment}
    </span>;
};

export const DirectionBadge = ({direction}) => {
  const getBadgeStyle = direction => {
    switch (direction) {
      case 'Bidirectional':
        return {
          background: '#FA8784',
          color: '#1A1A1A'
        };
        --tomato;
      case 'Destination':
        return {
          background: '#FA8784',
          color: '#1A1A1A'
        };
        --tomato;
      case 'Source':
        return {
          background: '#FA8784',
          color: '#1A1A1A'
        };
        --tomato;
      default:
        return {
          background: '#A7B3D9',
          color: '#1A1A1A'
        };
        --haze;
    }
  };
  const style = getBadgeStyle(direction);
  return <span style={{
    display: 'inline-block',
    padding: '0.125rem 0.375rem',
    borderRadius: '0.25rem',
    fontSize: '0.625rem',
    background: style.background,
    color: style.color,
    fontWeight: '500'
  }}>
      {direction}
    </span>;
};

<Card title="">
  <div style={{ display: 'flex', alignItems: 'center', marginBottom: '1rem' }}>
    <div style={{ width: '32px', height: '32px', marginRight: '0.75rem', display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 }}>
      <img src="https://mintcdn.com/permutive/pNhz39ducTVcQczh/images/integrations/logos/youtube.svg?fit=max&auto=format&n=pNhz39ducTVcQczh&q=85&s=6e88a7f65b7b4bd42f6c6b9cf8f4ef4b" alt="YouTube" style={{ maxWidth: '32px', maxHeight: '32px', display: 'block' }} width="24" height="24" data-path="images/integrations/logos/youtube.svg" />
    </div>

    <h3 style={{ margin: 0, fontSize: '1.125rem', fontWeight: '600' }}>YouTube</h3>
  </div>

  <div style={{ marginBottom: '1rem' }}>
    <BadgeRowCenter label="Direction">
      <DirectionBadge direction="Destination" />
    </BadgeRowCenter>

    <BadgeRowCenter label="Environment">
      <BadgeContainer>
        <EnvironmentBadge environment="Web" />
      </BadgeContainer>
    </BadgeRowCenter>

    <BadgeRowCenter label="Capability">
      <BadgeContainer>
        <CapabilityBadge capability="Cohort Activation" />
      </BadgeContainer>
    </BadgeRowCenter>

    <BadgeRowCenter label="SDK Required">
      <SdkRequiredBadge required="Yes" />
    </BadgeRowCenter>

    <BadgeRowCenter label="Product(s) Required">
      <ProductRequiredBadge product="Core Platform" />
    </BadgeRowCenter>
  </div>

  <p style={{ margin: 0, fontSize: '0.875rem', color: '#6b7280', lineHeight: '1.5' }}>
    Target ads on YouTube.com and your YouTube channel using Google Audience within Google Ad Manager.
  </p>
</Card>

<CardGroup cols={2}>
  <Card title="Setup" href="#setup" icon="gear" />

  <Card title="Troubleshooting" href="#troubleshooting" icon="wrench" />
</CardGroup>

<Note>
  Looking to target ads in an embedded YouTube player on your website or app? See the [Embedded YouTube Player Integration](/integrations/video/youtube).
</Note>

## Overview

YouTube is the world's largest video platform, enabling publishers to distribute and monetize video content through YouTube.com and YouTube channels. This integration enables targeting of syndicated YouTube videos where your content is hosted on YouTube.com (outside your own domains) using Google Audience within Google Ad Manager.

This integration is a Destination:

* **Destination:** Permutive cohorts are synced to Google Audience segments in GAM, which can then be targeted on YouTube inventory.

Use cases include:

* Target ads on your YouTube channel videos with Permutive cohorts
* Retarget users who visited your website when they watch videos on YouTube.com
* Extend your audience reach to YouTube inventory beyond your owned properties
* Monetize your YouTube channel with advanced audience targeting

<Info>
  **How DV360 Fits Into This Workflow**

  Display & Video 360 (DV360) is Google's demand-side platform (DSP) that advertisers use to programmatically buy video inventory, including YouTube. When you create Google Audience segments in GAM using Permutive cohorts:

  1. **You create segments in GAM** using Permutive key-values (as described in this guide)
  2. **Segments can be shared** with linked DV360 accounts via your Ad Exchange connection
  3. **Advertisers target these segments** in DV360 when buying YouTube inventory

  The "Addressable Users" metric in DV360 shows how many users in your audience segment can actually be reached on YouTube—this is where PPID becomes critical for achieving meaningful scale.

  This integration focuses on the publisher side (creating segments in GAM). The advertiser-side workflow in DV360 is managed by your advertising partners or internal ad ops team.
</Info>

## Environment Compatibility

| Environment    | Supported    | Notes                                                           |
| -------------- | ------------ | --------------------------------------------------------------- |
| **Web**        | <YesBadge /> | SDK required to build cohorts; targeting applies to YouTube.com |
| **iOS**        | <NoBadge />  | --                                                              |
| **Android**    | <NoBadge />  | --                                                              |
| **CTV**        | <NoBadge />  | --                                                              |
| **API Direct** | <NoBadge />  | --                                                              |

## Prerequisites

* **Google Ad Manager Integration**: The [GAM integration](/integrations/advertising/ad-servers/google-ad-manager) must be enabled in Permutive.
* **Google Audience Access**: You must have access to Google Audience within your Google Ad Manager instance.
* **Cohorts with GAM Activation**: Cohorts must have GAM Activation Sync enabled in the Permutive dashboard.
* **PPID Implementation (Strongly Recommended)**: Publisher Provided ID (PPID) should be configured in GAM for meaningful audience scale on YouTube.com. Without PPID, match rates will be very limited. See the [Understanding PPID](#understanding-ppid) section below.

## Setup

<Tabs>
  <Tab title="Primary Setup Steps">
    <Steps>
      <Step title="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](/integrations/advertising/ad-servers/google-ad-manager) for detailed setup instructions.
      </Step>

      <Step title="Enable GAM Activation Sync for Cohorts">
        Navigate to the cohorts you want to target on YouTube in the Permutive dashboard. Enable the Google Ad Manager Activation Sync for each cohort. This will create targeting key-values in GAM that can be used in Google Audience rules.
      </Step>

      <Step title="Create Google Audience Segments">
        In your Google Ad Manager dashboard, navigate to **Audience** > **Google Audience**. You will create a first-party audience segment for each Permutive cohort you want to target on YouTube.

        Follow [Google's documentation](https://support.google.com/admanager/answer/2423498) to create each segment:

        1. Click **New Audience**
        2. **Name** your segment (recommended: use the same name as in Permutive for consistency)
        3. Set the segment **Status** to **Active**
        4. In the **Rules** section, click **Key-values and Audience**
        5. Select the **permutive** key-value
        6. Select the specific cohort ID value that corresponds to your Permutive cohort
        7. Set **Page Views** to **1**
        8. Set **Membership Expiration** to **90 days** (standard setting)
        9. Click **Save**

        Repeat this process for each Permutive cohort you want to target on YouTube.
      </Step>

      <Step title="Target Google Audience Segments in YouTube Campaigns">
        When creating line items in Google Ad Manager for YouTube inventory:

        1. In the **Targeting** section of your line item, add **Audience Segments**
        2. Select the Google Audience segments you created that map to your Permutive cohorts
        3. Configure your YouTube inventory targeting as needed
        4. Complete your line item setup and activate

        The segments will be matched to signed-in Google users on YouTube based on their activity on your site.
      </Step>
    </Steps>

    <Warning>
      This approach relies on third-party cookie matching between your site and YouTube. Users must be logged into Google and have visited your site for matching to occur. You will not achieve 100% scale compared to on-site targeting.
    </Warning>
  </Tab>

  <Tab title="Web">
    YouTube.com targeting is configured entirely within Google Ad Manager using Google Audience segments. There is no additional web implementation required beyond:

    1. Having the Permutive SDK deployed on your website to build cohorts
    2. Enabling GAM Activation Sync for cohorts in the Permutive dashboard

    All targeting configuration happens in the Google Ad Manager interface as described in the Primary Setup Steps tab.
  </Tab>
</Tabs>

## Understanding PPID

Publisher Provided ID (PPID) is critical for achieving meaningful audience scale when targeting on YouTube.com. This section explains why PPID matters and how it affects your YouTube targeting.

### Why PPID Matters for YouTube Targeting

Google Audience segments in GAM can be built using key-values from Permutive cohorts. However, **the effectiveness of targeting these audiences on YouTube.com depends heavily on whether you have PPID configured**.

<Tabs>
  <Tab title="Without PPID">
    Without PPID, your Google Audience segments are populated using browser-based identifiers (such as Google's `__gpi` cookie). These identifiers have significant limitations:

    * **Website-only scope**: Browser cookies only identify users on your website
    * **No cross-site linking**: When users visit YouTube.com, they don't carry your website's cookies with them
    * **Poor match rates**: Google cannot reliably link your website visitors to their YouTube sessions
    * **Limited scale**: You may see very low "Addressable Users" counts in DV360 for your audience lists

    In essence, without PPID, Google Audience segments act as "folders" filled with identifiers that only work on your own properties.
  </Tab>

  <Tab title="With PPID">
    With PPID configured, your Google Audience segments are populated with stable, persistent identifiers that Google can link to users' Google Accounts:

    * **Deterministic matching**: PPIDs provide a stable identifier that Google can match to signed-in users
    * **Cross-platform recognition**: When users visit YouTube.com while signed into Google, they can be recognized as members of your audience
    * **Higher match rates**: Significantly improved "Addressable Users" counts in DV360
    * **Meaningful scale**: Your first-party audiences become actionable on YouTube inventory

    PPID can be based on:

    * A first-party cookie for anonymous traffic
    * A login ID for authenticated users (provides the best cross-device matching)
  </Tab>
</Tabs>

<Warning>
  Without PPID, you may technically be able to create Google Audience segments and target them on YouTube, but the actual reach and match rate will be very limited. For meaningful YouTube.com targeting, PPID implementation is strongly recommended.
</Warning>

### Setting Up PPID

PPID configuration is done within Google Ad Manager. For detailed instructions on implementing PPID, refer to [Google's PPID documentation](https://support.google.com/admanager/answer/2880055).

Key considerations:

* PPID must be passed consistently in ad requests from your website
* The same PPID should be used across all platforms where possible for cross-device matching
* For authenticated users, consider using a hashed login ID as your PPID for the best results

## Data Types

Permutive cohorts are mapped to Google Audience segments in GAM, which can then be targeted on YouTube.com inventory.

<AccordionGroup>
  <Accordion title="Google Audience Segments">
    Permutive cohorts are mapped to Google Audience first-party segments within GAM for targeting on YouTube inventory.

    <ResponseField name="Segment Name" type="string">
      The name of the Google Audience segment. Recommended to match the Permutive cohort name for consistency.
    </ResponseField>

    <ResponseField name="Key-Value Rule" type="targeting rule">
      The targeting rule that defines membership in the Google Audience segment. Uses the `permutive` key with a specific cohort ID value.

      Example: `permutive = abc123def456`
    </ResponseField>

    <ResponseField name="Membership Duration" type="number">
      The number of days a user remains in the audience segment. Standard is 90 days.
    </ResponseField>

    <ResponseField name="Minimum Page Views" type="number">
      The minimum number of page views required for segment membership. Typically set to 1.
    </ResponseField>

    <ResponseField name="Status" type="string">
      The status of the audience segment. Must be set to "Active" for targeting.
    </ResponseField>
  </Accordion>

  <Accordion title="Cohort Activation via Key-Values">
    When you enable GAM Activation Sync for a cohort in Permutive, the cohort ID is automatically created as a targeting value under the `permutive` key in Google Ad Manager.

    <ResponseField name="permutive" type="key">
      The targeting key used in GAM for all Permutive cohorts.
    </ResponseField>

    <ResponseField name="Cohort ID" type="value">
      The unique identifier for each Permutive cohort, created as a value under the `permutive` key when GAM Activation Sync is enabled.

      Example: `abc123def456`
    </ResponseField>
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Google Audience segments not populating">
    If your Google Audience segments created in GAM are not building membership:

    * **Verify key-value configuration**: Ensure the segment rule is correctly configured to target the `permutive` key with the specific cohort ID value
    * **Check segment status**: Confirm the segment status is set to "Active" in Google Audience
    * **Allow time for population**: Audience segments may take 24-48 hours to begin populating after creation
    * **Verify Permutive cohort is active**: Ensure the cohort is active in Permutive and has GAM Activation Sync enabled
    * **Check key-value exists in GAM**: Navigate to **Inventory > Key-Values** in GAM and confirm the specific cohort ID value exists under the `permutive` key
    * **Verify site traffic**: Google Audience requires sufficient site traffic for meaningful audience building. Check that your site has adequate daily unique users.
  </Accordion>

  <Accordion title="Limited scale on YouTube.com targeting">
    If you're seeing lower-than-expected reach for YouTube targeting:

    * **PPID not configured**: This is the most common cause of limited scale. Without PPID, Google cannot reliably match your website visitors to their YouTube sessions. See the [Understanding PPID](#understanding-ppid) section above
    * **Audience size minimums**: Google Audience segments may have minimum size requirements before they're eligible for targeting on YouTube
    * **Membership expiration**: Check your segment's membership duration setting. 90 days is recommended for sufficient scale
    * **Traffic requirements**: Ensure your site has sufficient daily traffic for meaningful audience building
    * **User sign-in status**: Users must be signed into Google for matching to occur—anonymous YouTube viewers cannot be targeted
    * **Consider alternative approaches**: For better scale, consider using Google Customer Match with CRM data or leveraging Google's Optimized Targeting features with your first-party segments as a seed
  </Accordion>

  <Accordion title="Unable to find permutive key-values in GAM">
    If you cannot find the `permutive` key or specific cohort ID values in Google Ad Manager:

    * **Verify GAM integration is enabled**: Check that the Google Ad Manager integration is properly configured in the Permutive dashboard
    * **Check cohort activation**: Ensure GAM Activation Sync is enabled for the specific cohorts in Permutive
    * **Verify GAM permissions**: Confirm that [dfp@permutive.com](mailto:dfp@permutive.com) has the required permissions in your GAM account (View and Edit key-values)
    * **Allow time for sync**: After enabling GAM Activation Sync, allow a few minutes for the key-value to be created in GAM
    * **Check correct GAM network**: Ensure you're viewing the correct GAM network that's configured in Permutive
  </Accordion>

  <Accordion title="GAM integration not enabled">
    The YouTube.com integration requires Google Ad Manager to be set up first:

    * **Prerequisite**: Complete the [Google Ad Manager integration setup](/integrations/advertising/ad-servers/google-ad-manager) 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](mailto:dfp@permutive.com) has the required permissions in your GAM account
    * **Verify network code**: Confirm the correct GAM network code is configured in Permutive
  </Accordion>

  <Accordion title="YouTube inventory not available in line items">
    If you cannot target YouTube inventory in your GAM line items:

    * **Check ad exchange access**: YouTube inventory is typically available through Google Ad Exchange (AdX). Verify your GAM account has AdX access
    * **Verify inventory targeting**: Ensure your line item targeting includes YouTube placements or uses the appropriate inventory targeting settings
    * **Check geographic targeting**: Some YouTube inventory may have geographic restrictions. Verify your targeting settings
    * **Contact Google support**: If YouTube inventory is not appearing, you may need to work with your Google account manager to enable access
  </Accordion>
</AccordionGroup>

## Changelog

<Info>
  For detailed changelog information, visit our [Changelog](https://changelog.permutive.com/).
</Info>
