AdsApp.​VideoAudienceBuilder

Builder for VideoAudience objects. For details about video audiences, please see About targeting for video campaigns.

Example usage:

var videoAudienceBuilder = videoAdGroup
  .videoTargeting()
  .newAudienceBuilder();
var videoAudienceOperation = videoAudienceBuilder
  .withAudienceType('USER_INTEREST')   // required
  .withAudienceId(80432)               // required
  .build();                            // create the audience

Methods:

MemberTypeDescription
buildAdsApp.VideoAudienceOperationBuilds the video audience.
excludeAdsApp.ExcludedVideoAudienceOperationBuilds the excluded video audience.
withAudienceIdAdsApp.VideoAudienceBuilderSets the ID of the excluded audience.
withAudienceTypeAdsApp.VideoAudienceBuilderSets the type of the audience.

build()

Builds the video audience. Returns a VideoAudienceOperation that corresponds to the creation of the VideoAudience.

Return values:

TypeDescription
AdsApp.VideoAudienceOperationThe VideoAudienceOperation.

exclude()

Builds the excluded video audience. Returns an ExcludedVideoAudienceOperation that corresponds to the creation of the ExcludedVideoAudience.

Custom affinities cannot be excluded.

Return values:

TypeDescription
AdsApp.ExcludedVideoAudienceOperationThe ExcludedVideoAudienceOperation.

withAudienceId(audienceId)

Sets the ID of the excluded audience. This field is required. For user interests, affinity categories and corresponding IDs can be found on API documentation on affinity categories, and in-market categories and corresponding IDs can be found on API documentation on in-market categories. User List IDs (List IDs) are available on the details page of a User List (found under the Audiences section of the Shared Library).

Arguments:

NameTypeDescription
audienceIdStringThe ID of the excluded audience.

Return values:

TypeDescription
AdsApp.VideoAudienceBuilderAn audience builder with the specified audience ID.

withAudienceType(audienceType)

Sets the type of the audience. Possible values: USER_INTEREST, USER_LIST or CUSTOM_AFFINITY. This field is required.

Arguments:

NameTypeDescription
audienceTypeStringThe type of the excluded audience.

Return values:

TypeDescription
AdsApp.VideoAudienceBuilderAn VideoAudienceBuilder with the specified audience type.