结构化摘要

结构化摘要可让您的广告突出产品和服务的具体特点。借助这些广告附加信息,访问者在点击访问您的网站之前就能看到您产品和服务的特性和种类信息。

每个摘要包含一个标题和您要突出的特性列表。您的广告中一次可以最多展示两个标题。我们会通过算法确定最适合展示的标题组合,因此建议您尽可能多地添加与您业务相关的标题。

以下示例展示了使用摘要的广告可能呈现的外观。该摘要用一个红色矩形圈起,其中有一个“Styles”标题,带有四个值(Chukka、Combat、Cowboy、Chelsea)。

标题

标题设定摘要的类别。您的文字必须与此列表中的类别之一完全一致(有关翻译内容,请参阅此列表)。标题的示例有:Amenities、Brands、Destinations、Models 和 Styles。

值是您想要突出的特色产品/服务的列表。需要记住的几个要点是:

  • 最少需要 3 个值,推荐提供 4 个。
  • 每个摘要值最多 25 个字符。
  • 针对移动设备,摘要文字最好少于 12 个字符。
  • 摘要值必须符合我们的政策,且内容健康。

向您的广告添加结构化摘要

可以使用附加信息设置服务客户广告系列广告组级别添加结构化摘要。

与其他广告附加信息类似,您可以创建 Feed 项,并将其添加到相关的附加信息设置中。以下代码段显示了如何创建一个新的 StructuredSnippetFeedItem 并将其与某个广告系列相关联。

package adwords.axis.v201609.extensions;

import com.google.api.ads.adwords.axis.factory.AdWordsServices;
import com.google.api.ads.adwords.axis.v201609.cm.ApiException;
import com.google.api.ads.adwords.axis.v201609.cm.CampaignExtensionSetting;
import com.google.api.ads.adwords.axis.v201609.cm.CampaignExtensionSettingOperation;
import com.google.api.ads.adwords.axis.v201609.cm.CampaignExtensionSettingReturnValue;
import com.google.api.ads.adwords.axis.v201609.cm.CampaignExtensionSettingServiceInterface;
import com.google.api.ads.adwords.axis.v201609.cm.ExtensionFeedItem;
import com.google.api.ads.adwords.axis.v201609.cm.ExtensionSetting;
import com.google.api.ads.adwords.axis.v201609.cm.FeedType;
import com.google.api.ads.adwords.axis.v201609.cm.Operator;
import com.google.api.ads.adwords.axis.v201609.cm.StructuredSnippetFeedItem;
import com.google.api.ads.adwords.lib.client.AdWordsSession;
import com.google.api.ads.common.lib.auth.OfflineCredentials;
import com.google.api.ads.common.lib.auth.OfflineCredentials.Api;
import com.google.api.client.auth.oauth2.Credential;
import java.rmi.RemoteException;

/**
 * This example adds structured snippets to a campaign. To create a campaign,
 * run {@code AddCampaigns}.
 *
 * <p>Credentials and properties in {@code fromFile()} are pulled from the
 * "ads.properties" file. See README for more info.
 */
public class AddStructuredSnippets {

  public static void main(String[] args) throws Exception {
    // Generate a refreshable OAuth2 credential.
    Credential oAuth2Credential = new OfflineCredentials.Builder()
        .forApi(Api.ADWORDS)
        .fromFile()
        .build()
        .generateCredential();

    // Construct an AdWordsSession.
    AdWordsSession session = new AdWordsSession.Builder()
        .fromFile()
        .withOAuth2Credential(oAuth2Credential)
        .build();

    AdWordsServices adWordsServices = new AdWordsServices();

    Long campaignId = Long.valueOf("INSERT_CAMPAIGN_ID");
    runExample(adWordsServices, session, campaignId);
  }

  public static void runExample(AdWordsServices adWordsServices, AdWordsSession session,
      Long campaignId) throws ApiException, RemoteException {

    StructuredSnippetFeedItem amenitiesStructuredSnippetFeedItem =
        createStructuredSnippetsFeedItem(
        "Amenities", new String[] {"Free Wi-Fi", "Breakfast", "Swimming Pool", "Fitness Center",
        "Restaurant"});

    StructuredSnippetFeedItem destinationsStructuredSnippetFeedItem =
        createStructuredSnippetsFeedItem(
        "Destinations", new String[] {"Paris", "London", "Berlin"});

    // Get the CampaignExtensionSettingService.
    CampaignExtensionSettingServiceInterface campaignExtensionSettingService =
        adWordsServices.get(session, CampaignExtensionSettingServiceInterface.class);

    CampaignExtensionSetting campaignExtensionSetting = new CampaignExtensionSetting();
    campaignExtensionSetting.setExtensionType(FeedType.STRUCTURED_SNIPPET);
    ExtensionSetting extensionSetting = new ExtensionSetting();
    extensionSetting.setExtensions(
        new ExtensionFeedItem[] {amenitiesStructuredSnippetFeedItem, 
            destinationsStructuredSnippetFeedItem});
    campaignExtensionSetting.setExtensionSetting(extensionSetting);

    CampaignExtensionSettingOperation operation = new CampaignExtensionSettingOperation();
    operation.setOperand(campaignExtensionSetting);
    operation.setOperator(Operator.ADD);

    // Create your campaign extension settings. This associates the structured snippet
    // with your campaign.
    campaignExtensionSetting.setCampaignId(campaignId);

    // Add the extensions.
    CampaignExtensionSettingReturnValue returnValue =
        campaignExtensionSettingService.mutate(new CampaignExtensionSettingOperation[] {operation});
    if (returnValue.getValue() != null && returnValue.getValue().length > 0) {
      CampaignExtensionSetting newExtensionSetting = returnValue.getValue(0);
      System.out.printf("Extension setting with type %s was added to campaign ID %d.%n",
          newExtensionSetting.getExtensionType(), newExtensionSetting.getCampaignId());
    } else {
      System.out.println("No extension settings were created.");
    }
  }

  private static StructuredSnippetFeedItem createStructuredSnippetsFeedItem(String header,
      String[] values){
    StructuredSnippetFeedItem structuredSnippetFeedItem = new StructuredSnippetFeedItem();
    structuredSnippetFeedItem.setHeader(header);
    structuredSnippetFeedItem.setValues(values);
    return structuredSnippetFeedItem;
  }
}

结构化摘要报告

占位符 Feed 项报告显示 Feed 项的效果,并可用于报告每个结构化摘要的统计信息。此外,占位符报告显示了基于 Feed 的广告附加信息的效果,并可用于报告所有结构化摘要的统计信息。对占位符类型 ID 为 24 的 ExtensionPlaceHolderType 进行过滤,可以仅获取结构化摘要广告附加信息。

发送以下问题的反馈:

此网页
AdWords API
AdWords API
需要帮助?请访问我们的支持页面