AdsApp.​PlacementBuilder

Builder for Placement objects.

Example usage:

var placementBuilder = adGroup.display().newPlacementBuilder()
    .withUrl("http://www.site.com")  // required
    .withCpc(0.50)                   // optional
    .build()                         // create the placement

Methods:

MemberTypeDescription
buildAdsApp.PlacementOperationBuilds the placement.
excludeAdsApp.ExcludedPlacementOperationBuilds the excluded placement.
withCpcAdsApp.PlacementBuilderSets the max CPC bid of the new placement to the specified value.
withCpmAdsApp.PlacementBuilderSets the CPM bid of the new placement to the specified value.
withUrlAdsApp.PlacementBuilderSets the URL of the placement.

build()

Builds the placement. Returns a PlacementOperation that corresponds to the creation of the Placement.

Return values:

TypeDescription
AdsApp.PlacementOperationThe PlacementOperation.

exclude()

Builds the excluded placement. Returns an ExcludedPlacementOperation that corresponds to the creation of the ExcludedPlacement.

Return values:

TypeDescription
AdsApp.ExcludedPlacementOperationThe ExcludedPlacementOperation.

withCpc(cpc)

Sets the max CPC bid of the new placement to the specified value.

Arguments:

NameTypeDescription
cpcdoubleThe max CPC bid of the placement.

Return values:

TypeDescription
AdsApp.PlacementBuilderThe placement builder with the specified max CPC.

withCpm(cpm)

Sets the CPM bid of the new placement to the specified value.

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

Arguments:

NameTypeDescription
cpmdoubleThe CPM bid of the placement.

Return values:

TypeDescription
AdsApp.PlacementBuilderThe placement builder with the specified CPM.

withUrl(url)

Sets the URL of the placement. This field is required.

Arguments:

NameTypeDescription
urlStringThe placement URL.

Return values:

TypeDescription
AdsApp.PlacementBuilderA PlacementBuilder with the specified URL.