AdsApp.ExcludedYouTubeChannel
Stay organized with collections
Save and categorize content based on your preferences.
Represents a Google Ads excluded YouTube Channel.
Methods:
getAdGroup()
Returns the ad group to which this excluded YouTube channel belongs.
Return values:
Type | Description |
AdsApp.AdGroup |
The ad group to which this excluded YouTube channel belongs. |
getBaseAdGroup()
Returns the base ad group to which this excluded YouTube channel belongs.
Return values:
Type | Description |
AdsApp.AdGroup |
The base ad group to which this excluded YouTube channel belongs. |
getBaseCampaign()
Returns the base campaign to which this excluded YouTube channel belongs.
Return values:
Type | Description |
AdsApp.Campaign |
The base campaign to which this excluded YouTube channel belongs. |
getCampaign()
Returns the campaign to which this excluded YouTube channel belongs or
null
if it does not belong to a search or display campaign.
Return values:
Type | Description |
AdsApp.Campaign |
The campaign to which this excluded YouTube channel belongs or
null if it does
not belong to a search or display campaign. |
getChannelId()
Returns the YouTube channel ID.
Return values:
Type | Description |
String |
The YouTube channel ID. |
getId()
Returns the ID of the excluded YouTube channel.
Return values:
Type | Description |
String |
The ID of the excluded YouTube channel. |
getResourceName()
Returns the resource name of the excluded YouTube channel.
Return values:
Type | Description |
String |
The resource name of the excluded YouTube channel. |
remove()
Removes the excluded YouTube channel.
Returns nothing.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[null,null,["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eRepresents an excluded YouTube channel within Google Ads, allowing advertisers to prevent their ads from showing on specific channels.\u003c/p\u003e\n"],["\u003cp\u003eProvides methods to retrieve information about the excluded channel, such as its ID, associated ad groups and campaigns, and the YouTube channel ID it targets.\u003c/p\u003e\n"],["\u003cp\u003eEnables advertisers to remove the exclusion, allowing ads to potentially show on the previously excluded YouTube channel.\u003c/p\u003e\n"],["\u003cp\u003eOffers functionality to access details about the base ad group and campaign associated with the excluded channel for deeper insights.\u003c/p\u003e\n"]]],[],null,["# AdsApp.ExcludedYouTubeChannel\n\nRepresents a Google Ads excluded YouTube Channel.\n\n### Methods:\n\n| Member | Type | Description |\n|---------------------------------------|------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| [getAdGroup()](#getAdGroup) | [AdsApp.AdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) | Returns the ad group to which this excluded YouTube channel belongs. |\n| [getBaseAdGroup()](#getBaseAdGroup) | [AdsApp.AdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) | Returns the base ad group to which this excluded YouTube channel belongs. |\n| [getBaseCampaign()](#getBaseCampaign) | [AdsApp.Campaign](/google-ads/scripts/docs/reference/adsapp/adsapp_campaign) | Returns the base campaign to which this excluded YouTube channel belongs. |\n| [getCampaign()](#getCampaign) | [AdsApp.Campaign](/google-ads/scripts/docs/reference/adsapp/adsapp_campaign) | Returns the campaign to which this excluded YouTube channel belongs or `null` if it does not belong to a search or display campaign. |\n| [getChannelId()](#getChannelId) | `String` | Returns the YouTube channel ID. |\n| [getId()](#getId) | `String` | Returns the ID of the excluded YouTube channel. |\n| [getResourceName()](#getResourceName) | `String` | Returns the resource name of the excluded YouTube channel. |\n| [remove()](#remove) | `void` | Removes the excluded YouTube channel. |\n\n`getAdGroup()`\n--------------\n\nReturns the ad group to which this excluded YouTube channel belongs.\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------|--------------------------------------------------------------|\n| [AdsApp.AdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) | The ad group to which this excluded YouTube channel belongs. |\n\n`getBaseAdGroup()`\n------------------\n\nReturns the base ad group to which this excluded YouTube channel belongs.\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------|-------------------------------------------------------------------|\n| [AdsApp.AdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) | The base ad group to which this excluded YouTube channel belongs. |\n\n`getBaseCampaign()`\n-------------------\n\nReturns the base campaign to which this excluded YouTube channel belongs.\n\n### Return values:\n\n| Type | Description |\n|------------------------------------------------------------------------------|-------------------------------------------------------------------|\n| [AdsApp.Campaign](/google-ads/scripts/docs/reference/adsapp/adsapp_campaign) | The base campaign to which this excluded YouTube channel belongs. |\n\n`getCampaign()`\n---------------\n\nReturns the campaign to which this excluded YouTube channel belongs or `null` if it does not belong to a search or display campaign.\n\n### Return values:\n\n| Type | Description |\n|------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| [AdsApp.Campaign](/google-ads/scripts/docs/reference/adsapp/adsapp_campaign) | The campaign to which this excluded YouTube channel belongs or `null` if it does not belong to a search or display campaign. |\n\n`getChannelId()`\n----------------\n\nReturns the YouTube channel ID.\n\n### Return values:\n\n| Type | Description |\n|----------|-------------------------|\n| `String` | The YouTube channel ID. |\n\n`getId()`\n---------\n\nReturns the ID of the excluded YouTube channel.\n\n### Return values:\n\n| Type | Description |\n|----------|-----------------------------------------|\n| `String` | The ID of the excluded YouTube channel. |\n\n`getResourceName()`\n-------------------\n\nReturns the resource name of the excluded YouTube channel.\n\n### Return values:\n\n| Type | Description |\n|----------|----------------------------------------------------|\n| `String` | The resource name of the excluded YouTube channel. |\n\n`remove()`\n----------\n\nRemoves the excluded YouTube channel.\n\nReturns nothing."]]