自動建立素材資源設定

Google Ads 提供多種素材資源最佳化功能,可自動執行,提升廣告的廣告優異度。

包括自動建立圖片素材資源並預覽廣告到達網頁,以及針對不同格式和長度最佳化影片素材資源。

每項素材資源自動化設定都有 asset_automation_type,可定義代表的素材資源自動化類型,以及 asset_automation_status,代表自動化功能是否啟用。

部分素材資源自動化功能是在廣告活動層級設定,其他則是在廣告群組廣告層級設定。

廣告活動層級素材資源自動化設定

這些設定會為整個廣告活動設定素材資源自動化功能。 並非所有欄位都適用於每種廣告活動類型,詳情請參閱參考文件

自動建立素材資源類型 支援的廣告活動類型 預設
FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION 最高成效廣告活動、搜尋廣告活動 最高成效廣告活動已啟用,搜尋廣告活動已停用
GENERATE_ENHANCED_YOUTUBE_VIDEOS 最高成效廣告活動 Enabled
GENERATE_IMAGE_ENHANCEMENT 最高成效廣告活動 最高成效廣告活動已啟用,搜尋廣告活動已停用
GENERATE_IMAGE_EXTRACTION 最高成效廣告活動 帳戶層級的動態圖片額外資訊控制值。
TEXT_ASSET_AUTOMATION 最高成效廣告活動、搜尋廣告活動 最高成效廣告活動已啟用,搜尋廣告活動已停用

下列程式碼片段說明如何將素材資源自動化設定設為最高成效廣告活動的 OPT_IN

Java

// Configures the optional opt-in/out status for asset automation settings.
.addAllAssetAutomationSettings(ImmutableList.of(
    AssetAutomationSetting.newBuilder()
        .setAssetAutomationType(AssetAutomationType.GENERATE_IMAGE_EXTRACTION)
        .setAssetAutomationStatus(AssetAutomationStatus.OPTED_IN).build(),
    AssetAutomationSetting.newBuilder()
        .setAssetAutomationType(
            AssetAutomationType.FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION)
        .setAssetAutomationStatus(AssetAutomationStatus.OPTED_IN).build(),
    AssetAutomationSetting.newBuilder()
        .setAssetAutomationType(AssetAutomationType.TEXT_ASSET_AUTOMATION)
        .setAssetAutomationStatus(AssetAutomationStatus.OPTED_IN).build(),
    AssetAutomationSetting.newBuilder()
        .setAssetAutomationType(AssetAutomationType.GENERATE_ENHANCED_YOUTUBE_VIDEOS)
        .setAssetAutomationStatus(AssetAutomationStatus.OPTED_IN).build(),
    AssetAutomationSetting.newBuilder()
        .setAssetAutomationType(AssetAutomationType.GENERATE_IMAGE_ENHANCEMENT)
        .setAssetAutomationStatus(AssetAutomationStatus.OPTED_IN).build()))
      

C#

campaign.AssetAutomationSettings.AddRange(new[]{
    new Campaign.Types.AssetAutomationSetting
    {
        AssetAutomationType = AssetAutomationType.GenerateImageExtraction,
        AssetAutomationStatus = AssetAutomationStatus.OptedIn
    },
    new Campaign.Types.AssetAutomationSetting
    {
        AssetAutomationType = AssetAutomationType.FinalUrlExpansionTextAssetAutomation,
        AssetAutomationStatus = AssetAutomationStatus.OptedIn
    },
    new Campaign.Types.AssetAutomationSetting
    {
        AssetAutomationType = AssetAutomationType.TextAssetAutomation,
        AssetAutomationStatus = AssetAutomationStatus.OptedIn
    },
    new Campaign.Types.AssetAutomationSetting
    {
        AssetAutomationType = AssetAutomationType.GenerateEnhancedYoutubeVideos,
        AssetAutomationStatus = AssetAutomationStatus.OptedIn
    },
    new Campaign.Types.AssetAutomationSetting
    {
        AssetAutomationType = AssetAutomationType.GenerateImageEnhancement,
        AssetAutomationStatus = AssetAutomationStatus.OptedIn
    },
});
      

PHP

This example is not yet available in PHP; you can take a look at the other languages.
    

Python

# Configures the optional opt-in/out status for asset automation settings.
for asset_automation_type_enum in [
    client.enums.AssetAutomationTypeEnum.GENERATE_IMAGE_EXTRACTION,
    client.enums.AssetAutomationTypeEnum.FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION,
    client.enums.AssetAutomationTypeEnum.TEXT_ASSET_AUTOMATION,
    client.enums.AssetAutomationTypeEnum.GENERATE_ENHANCED_YOUTUBE_VIDEOS,
    client.enums.AssetAutomationTypeEnum.GENERATE_IMAGE_ENHANCEMENT
]:
    asset_automattion_setting: Campaign.AssetAutomationSetting = client.get_type("Campaign").AssetAutomationSetting()
    asset_automattion_setting.asset_automation_type = asset_automation_type_enum
    asset_automattion_setting.asset_automation_status = client.enums.AssetAutomationStatusEnum.OPTED_IN
    campaign.asset_automation_settings.append(asset_automattion_setting)
      

Ruby

# Configures the optional opt-in/out status for asset automation settings.
c.asset_automation_settings << client.resource.asset_automation_setting do |aas|
  aas.asset_automation_type = :GENERATE_IMAGE_EXTRACTION
  aas.asset_automation_status = :OPTED_IN
end
c.asset_automation_settings << client.resource.asset_automation_setting do |aas|
  aas.asset_automation_type = :FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION
  aas.asset_automation_status = :OPTED_IN
end
c.asset_automation_settings << client.resource.asset_automation_setting do |aas|
  aas.asset_automation_type = :TEXT_ASSET_AUTOMATION
  aas.asset_automation_status = :OPTED_IN
end
c.asset_automation_settings << client.resource.asset_automation_setting do |aas|
  aas.asset_automation_type = :GENERATE_ENHANCED_YOUTUBE_VIDEOS
  aas.asset_automation_status = :OPTED_IN
end
c.asset_automation_settings << client.resource.asset_automation_setting do |aas|
  aas.asset_automation_type = :GENERATE_IMAGE_ENHANCEMENT
  aas.asset_automation_status = :OPTED_IN
end
      

Perl

# Configures the optional opt-in/out status for asset automation settings.
# When we create the campaign object, we set campaign->{assetAutomationSettings}
# equal to $asset_automation_settings.
my $asset_automation_settings = [];
my $asset_automation_types    = [
  GENERATE_IMAGE_EXTRACTION, FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION,
  TEXT_ASSET_AUTOMATION,     GENERATE_ENHANCED_YOUTUBE_VIDEOS,
  GENERATE_IMAGE_ENHANCEMENT
];
foreach my $asset_automation_type (@$asset_automation_types) {
  push @$asset_automation_settings,
    Google::Ads::GoogleAds::V22::Resources::AssetAutomationSetting->new({
      assetAutomationStatus => OPTED_IN,
      assetAutomationType   => $asset_automation_type
    });
}
      

廣告層級素材資源自動化設定

這些設定會為單一廣告設定素材資源自動化功能。 並非所有廣告類型都適用這些欄位,詳情請參閱參考文件

自動建立素材資源類型 支援的廣告類型 預設
GENERATE_DESIGN_VERSIONS_FOR_IMAGES DemandGenMultiAssetAd Enabled
GENERATE_LANDING_PAGE_PREVIEW DemandgenVideoResponsiveAd Disabled
GENERATE_SHORTER_YOUTUBE_VIDEOS DemandGenVideoResponsiveAd Enabled
GENERATE_VERTICAL_YOUTUBE_VIDEOS DemandGenVideoResponsiveAd Enabled
GENERATE_VIDEOS_FROM_OTHER_ASSETS DemandGenMultiAssetAds Enabled