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:

MemberTypeDescription
addAsset AdsApp.AssetOperation Adds an asset to this asset group.
enable void Enables the asset group.
getEntityType String Returns the type of this entity as a String, in this case, "AssetGroup".
getId String Returns the ID of the asset group.
getName String Returns the name of this asset group.
getPerformanceMaxCampaign 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.
getResourceName String Returns the resource name of the asset group.
isEnabled boolean Returns true if the asset group is enabled.
isPaused boolean Returns true if the asset group is paused.
isRemoved boolean Returns true if the asset group is removed.
pause void Pauses the asset group.
removeAsset void Removes an asset from this asset group.
setName void Sets the name of the asset group.
urls AdsApp.AssetGroupUrls Provides access to this asset group's URL fields.

addAsset(asset, fieldType)

Adds an asset to this asset group.

Arguments:

NameTypeDescription
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:

TypeDescription
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:

TypeDescription
String Type of this entity: "AssetGroup".

getId()

Returns the ID of the asset group.

Return values:

TypeDescription
String The ID of the asset group.

getName()

Returns the name of this asset group.

Return values:

TypeDescription
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:

TypeDescription
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:

TypeDescription
String The resource name of the asset group.

isEnabled()

Returns true if the asset group is enabled.

Return values:

TypeDescription
boolean true if the asset group is enabled.

isPaused()

Returns true if the asset group is paused.

Return values:

TypeDescription
boolean true if the asset group is paused.

isRemoved()

Returns true if the asset group is removed.

Return values:

TypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
name String The new name for the asset group.

urls()

Provides access to this asset group's URL fields.

Return values:

TypeDescription
AdsApp.AssetGroupUrls Access to this asset group's URL fields.