AdsApp.​AssetGroup

Represents a Google Ads asset group. An asset can be an image, text, or video. Asset groups are collections of assets primarily used by Performance Max campaigns.

Methods:

Member Type Description
AdsApp.AssetOperation Adds an asset to this asset group.
void Enables the asset group.
String Returns the type of this entity as a String , in this case, "AssetGroup" .
String Returns the ID of the asset group.
String Returns the name of this asset group.
AdsApp.PerformanceMaxCampaign Returns the performance max campaign to which this asset group belongs or null if it does not belong to a performance max campaign.
String Returns the resource name of the asset group.
boolean Returns true if the asset group is enabled.
boolean Returns true if the asset group is paused.
boolean Returns true if the asset group is removed.
void Pauses the asset group.
void Removes an asset from this asset group.
void Sets the name of the asset group.
AdsApp.AssetGroupUrls Provides access to this asset group's URL fields.

addAsset(asset, fieldType)

Adds an asset to this asset group.

Arguments:

Name Type Description
asset
AdsApp.Asset The asset to add to this asset group.
fieldType
String The placement of the asset within the asset group. See the API documentation for a complete list.

Return values:

Type Description
AdsApp.AssetOperation The associated asset operation.

enable()

Enables the asset group.

Returns nothing.

getEntityType()

Returns the type of this entity as a String , in this case, "AssetGroup" .

Return values:

Type Description
String Type of this entity: "AssetGroup" .

getId()

Returns the ID of the asset group.

Return values:

Type Description
String The ID of the asset group.

getName()

Returns the name of this asset group.

Return values:

Type Description
String The name of this asset group.

getPerformanceMaxCampaign()

Returns the performance max campaign to which this asset group belongs or null if it does not belong to a performance max campaign.

Return values:

Type Description
AdsApp.PerformanceMaxCampaign The performance max campaign to which this asset group belongs or null if it does not belong to a performance max campaign.

getResourceName()

Returns the resource name of the asset group.

Return values:

Type Description
String The resource name of the asset group.

isEnabled()

Returns true if the asset group is enabled.

Return values:

Type Description
boolean true if the asset group is enabled.

isPaused()

Returns true if the asset group is paused.

Return values:

Type Description
boolean true if the asset group is paused.

isRemoved()

Returns true if the asset group is removed.

Return values:

Type Description
boolean true if the asset group is removed.

pause()

Pauses the asset group.

Returns nothing.

removeAsset(asset, fieldType)

Removes an asset from this asset group.

Returns nothing.

Arguments:

Name Type Description
asset
AdsApp.Asset The asset to remove from this asset group.
fieldType
String The placement of the asset within the asset group. See the API documentation for a complete list.

setName(name)

Sets the name of the asset group.

Returns nothing.

Arguments:

Name Type Description
name
String The new name for the asset group.

urls()

Provides access to this asset group's URL fields.

Return values:

Type Description
AdsApp.AssetGroupUrls Access to this asset group's URL fields.
Create a Mobile Website
View Site in Mobile | Classic
Share by: