Reference documentation and code samples for the Google Ads Ad Manager V1 Client class SuggestedAdUnit.
A read-only suggestion for a new ad unit based on an ad tag that has served 10+ times in the past week for an undefined ad unit.
Generated from protobuf message google.ads.admanager.v1.SuggestedAdUnit
Namespace
Google \ Ads \ AdManager \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Identifier. Resource name of the |
↳ weekly_request_count |
int|string
Output only. Number of times the ad tag has been served in the past week. |
↳ new_code_path |
string[]
Output only. Path of suggested ad unit codes from the closest existing ancestor ad unit that will all be created as ad units when the suggestion is approved. Example: If a -> b -> c are existing ad units with parent-child relationships, and the suggested ad unit x is a child of c, the |
↳ existing_code_path |
array<AdUnitParent>
Output only. Code path of ad units leading up to and including the parent of the first suggested ad unit. Combined with the |
↳ target_window |
int
Output only. Target window of the underlying ad tag which will be used in the ad unit if the suggestion is approved. |
↳ target_platform |
int
Output only. Target platform for the browser that clicked the underlying ad tag. |
↳ ad_unit_sizes |
array<AdUnitSize>
Output only. Sizes associated with this suggested ad unit. |
getName
Identifier. Resource name of the SuggestedAdUnit.
Format: networks/{network_code}/suggestedAdUnits/{suggested_ad_unit_id}
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
Identifier. Resource name of the SuggestedAdUnit.
Format: networks/{network_code}/suggestedAdUnits/{suggested_ad_unit_id}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getWeeklyRequestCount
Output only. Number of times the ad tag has been served in the past week.
| Returns | |
|---|---|
| Type | Description |
int|string |
|
hasWeeklyRequestCount
clearWeeklyRequestCount
setWeeklyRequestCount
Output only. Number of times the ad tag has been served in the past week.
| Parameter | |
|---|---|
| Name | Description |
var |
int|string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getNewCodePath
Output only. Path of suggested ad unit codes from the closest existing ancestor ad unit that will all be created as ad units when the suggestion is approved.
Example:
If a -> b -> c are existing ad units with parent-child
relationships, and the suggested ad unit x is a child of c, the
new_code_path is (x).
If x is the grandchild of c, the new_code_path is (y, x)
where y is an ad unit that would be created as the parent ad unit of x (and
the child of c) if the suggestion is approved.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<string> |
|
setNewCodePath
Output only. Path of suggested ad unit codes from the closest existing ancestor ad unit that will all be created as ad units when the suggestion is approved.
Example:
If a -> b -> c are existing ad units with parent-child
relationships, and the suggested ad unit x is a child of c, the
new_code_path is (x).
If x is the grandchild of c, the new_code_path is (y, x)
where y is an ad unit that would be created as the parent ad unit of x (and
the child of c) if the suggestion is approved.
| Parameter | |
|---|---|
| Name | Description |
var |
string[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getExistingCodePath
Output only. Code path of ad units leading up to and including the parent
of the first suggested ad unit. Combined with the new_code_path field,
this represents the full path for the suggested ad unit if approved.
Example:
If a -> b -> c are existing ad units with parent-child relationships, and
the suggested ad unit x is a child of c, the existing_code_path is (a,
b, c). If x is the grandchild of c, the existing_code_path is also (a,
b, c).
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<AdUnitParent> |
|
setExistingCodePath
Output only. Code path of ad units leading up to and including the parent
of the first suggested ad unit. Combined with the new_code_path field,
this represents the full path for the suggested ad unit if approved.
Example:
If a -> b -> c are existing ad units with parent-child relationships, and
the suggested ad unit x is a child of c, the existing_code_path is (a,
b, c). If x is the grandchild of c, the existing_code_path is also (a,
b, c).
| Parameter | |
|---|---|
| Name | Description |
var |
array<AdUnitParent>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTargetWindow
Output only. Target window of the underlying ad tag which will be used in the ad unit if the suggestion is approved.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasTargetWindow
clearTargetWindow
setTargetWindow
Output only. Target window of the underlying ad tag which will be used in the ad unit if the suggestion is approved.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTargetPlatform
Output only. Target platform for the browser that clicked the underlying ad tag.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasTargetPlatform
clearTargetPlatform
setTargetPlatform
Output only. Target platform for the browser that clicked the underlying ad tag.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdUnitSizes
Output only. Sizes associated with this suggested ad unit.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<AdUnitSize> |
|
setAdUnitSizes
Output only. Sizes associated with this suggested ad unit.
| Parameter | |
|---|---|
| Name | Description |
var |
array<AdUnitSize>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|