AdsApp.​YouTubeChannelBuilder

  • The YouTubeChannelBuilder facilitates the creation and management of YouTube channel targeting within Google Ads campaigns.

  • It enables setting the channel ID, which is mandatory, and optional parameters like maximum CPC or CPM bids.

  • build() and exclude() methods are used to create or exclude YouTube channel criteria respectively, for targeting or exclusion purposes.

  • withChannelId(), withCpc(), and withCpm() methods allow for further customization of the targeting settings by specifying channel ID and bid values.

Builder for YouTubeChannel objects.

Example usage:

var youTubeChannelBuilder = adGroup.display().newYouTubeChannelBuilder();
var youTubeChannelOperation = youTubeChannelBuilder
  .withChannelId('UCqVDpXKLmKeBU_yyt_QkItQ')    // required
  .build();                                     // create the YouTube
                                                // channel

Methods:

MemberTypeDescription
build() AdsApp.YouTubeChannelOperation Builds the YouTube channel criterion.
exclude() AdsApp.ExcludedYouTubeChannelOperation Builds the excluded YouTube channel criterion.
withChannelId(channelId) AdsApp.YouTubeChannelBuilder Sets the YouTube channel ID.
withCpc(cpc) AdsApp.YouTubeChannelBuilder Sets the max CPC bid of the new YouTube channel to the specified value.
withCpm(cpm) AdsApp.YouTubeChannelBuilder Sets the CPM bid of the new YouTube channel to the specified value.

build()

Builds the YouTube channel criterion. Returns a YouTubeChannelOperation that corresponds to the creation of the YouTubeChannel.

Return values:

TypeDescription
AdsApp.YouTubeChannelOperation The YouTubeChannelOperation.

exclude()

Builds the excluded YouTube channel criterion. Returns an ExcludedYouTubeChannelOperation that corresponds to the creation of the ExcludedYouTubeChannel.

Return values:

TypeDescription
AdsApp.ExcludedYouTubeChannelOperation The ExcludedYouTubeChannelOperation.

withChannelId(channelId)

Sets the YouTube channel ID. This field is required.

Arguments:

NameTypeDescription
channelId String The YouTube channel ID.

Return values:

TypeDescription
AdsApp.YouTubeChannelBuilder A YouTubeChannelBuilder with the specified channel ID.

withCpc(cpc)

Sets the max CPC bid of the new YouTube channel to the specified value.

Arguments:

NameTypeDescription
cpc double The max CPC bid of the YouTube channel.

Return values:

TypeDescription
AdsApp.YouTubeChannelBuilder The YouTube channel builder with the specified max CPC.

withCpm(cpm)

Sets the CPM bid of the new YouTube channel to the specified value.

See Cost-per-thousand impressions (CPM) for more information.

Arguments:

NameTypeDescription
cpm double The CPM bid of the YouTube channel.

Return values:

TypeDescription
AdsApp.YouTubeChannelBuilder The YouTube channel builder with the specified CPM.