Excluded locations are used to restrict your ads from showing in specific geographic areas. For instance, a campaign could show ads in all parts of a country except for a specific city by having a TargetedLocation for the entire country and an ExcludedLocation for that specific city.
For more information on locations, please see the AdWords API documentation on geotargeting.
See also TargetedLocation.
Methods:
Member | Type | Description |
---|---|---|
getCampaign | AdsApp.ShoppingCampaign |
Returns the campaign to which this location belongs. |
getCountryCode | String |
Returns the country code of this location. |
getEntityType | String |
Returns the type of this entity as a String , in this case, "ShoppingExcludedLocation" . |
getId | long |
Returns the ID of the shopping excluded location. |
getName | String |
Returns the name of this location. |
getTargetType | String |
Returns the target type of this location. |
getTargetingStatus | String |
Returns the targeting status of this location. |
remove | void |
Removes the shopping excluded location. |
getCampaign()
Returns the campaign to which this location belongs.Return values:
Type | Description |
---|---|
AdsApp.ShoppingCampaign |
The campaign to which this location belongs. |
getCountryCode()
Returns the country code of this location.
This is the standard two-letter country code, e.g. "US"
or "BR"
.
Return values:
Type | Description |
---|---|
String |
The country code of this location. |
getEntityType()
Returns the type of this entity as a String
, in this case, "ShoppingExcludedLocation"
.Return values:
Type | Description |
---|---|
String |
Type of this entity: "ShoppingExcludedLocation" . |
getId()
Returns the ID of the shopping excluded location.
Location IDs are shared across campaigns. In order to uniquely identify a location exclusion, one must specify both its campaign ID and the location ID.
Return values:
Type | Description |
---|---|
long |
The ID of the shopping excluded location. |
getName()
Returns the name of this location.Return values:
Type | Description |
---|---|
String |
The name of this location. |
getTargetType()
Returns the target type of this location.
The target type is a generic description of the location, such as "City"
, "Postal Code"
, or "Country"
. For a full list of target types, see the AdWords API documentation on geotargeting.
Return values:
Type | Description |
---|---|
String |
The target type of this location. |
getTargetingStatus()
Returns the targeting status of this location.
This can return one of three values:
"ACTIVE"
: indicates that the location can be targeted as normal. The vast majority of locations are active."PHASING_OUT"
: indicates that the location can be targeted, but that support will soon be removed. To get a list of which locations are phasing out, please see the AdWords API documentation on geotargeting."OBSOLETE"
: indicates that the location cannot be targeted.
Return values:
Type | Description |
---|---|
String |
The targeting status of this location. |
remove()
Removes the shopping excluded location. Returns nothing.