TargetedLocation

Contains the methods for managing location targets. For information about location criteria, see Show ads to your target audience and Geographical Location Codes.

Methods

Method Name Return Type Description
getAdGroup AdGroup Gets the ad group that this targeted location belongs to.
getBidModifier double Gets the bid modifier for this targeted location.
getCampaign Campaign Gets the campaign that this targeted location belongs to.
getCampaignType string Gets the type of campaign that this targeted location belongs to.
getCountryCode string Gets the country code of this targeted location.
getEntityType string Gets this entity's type.
getId string Gets the ID that uniquely identifies this targeted location.
getName string Gets this targeted location's name.
getStats Stats Gets this targeted locations's performance data.
getTargetType string Gets the target type of this targeted location.
getTargetingStatus string Gets the targeting status of this targeted location.
remove void Removes the targeted location.
setBidModifier void Sets the bid modifier for this targeted location.

getAdGroup

Gets the ad group that this targeted location belongs to.

Note

This method is not supported with campaign level targeted locations.

Returns

Type Description
AdGroup The ad group that this targeted location belongs to.

getBidModifier

Gets the bid modifier for this targeted location.

Returns

Type Description
double The bid modifier for this targeted location.

getCampaign

Gets the campaign that this targeted location belongs to.

Returns

Type Description
Campaign The campaign that this targeted location belongs to.

getCampaignType

Gets the type of campaign that this targeted location belongs to.

Possible values include Audience, DynamicSearchAds, Search, and Shopping.

Returns

Type Description
string The type of campaign that this targeted location belongs to.

getCountryCode

Gets the country code of this targeted location.

Returns

Type Description
string The country code of this targeted location.

getEntityType

Returns this entity's type.

Returns

Type Description
string This entity's type, which is TargetedLocation.

getId

Gets the ID that uniquely identifies this targeted location.

Returns

Type Description
string The ID that uniquely identifies this targeted location.

Location IDs can be shared across campaigns and ad groups. Use the entity ID (campaign or ad group) as well as the location ID to uniquely identify a targeted location.

getName

Gets this targeted location's name.

Returns

Type Description
string The name of this targeted location.

getStats

Gets this targeted locations's performance data.

To call this method, you must include one of the forDateRange methods in the targeted location selector's chain.

Returns

Type Description
Stats The targeted location's performance data. For example, clicks and impressions.

getTargetType

Gets the target type of this targeted location.

Returns

Type Description
string The target type of this targeted location.

getTargetingStatus

Gets the targeting status of this targeted location.

Returns

Type Description
string The targeting status of this targeted location.

remove

Removes this targeted location.

Returns

Type Description
void Returns nothing.

setbidmodifier(double modifier)

Sets the bid modifier for this targeted location.

Arguments

Name Type Description
modifier double The modifier value is applied to bids which match this targeted location. For example, a modifier value of 1.4 increases the bid to 140% of its original value, and changes a bid of $2 to $2.80.

Returns

Type Description
void Returns nothing.