在此示例中,您有一个零售网站,该网站会将商品详情上传到 Google Merchant Center,并且您希望向访问过该零售网站的用户再营销一组商品。这些用户可能访问过产品页面,或将商品放入购物车或结账,而这些行为会触发再营销标记。然后,您可以制作一个广告系列,仅定位此群组,也可以定位类似受众群体,以扩大覆盖面。
详细了解受众群体名单生成最佳实践。
您需要具备以下条件才能设置此类广告系列:
- 再营销名单。
- Merchant Center 账号。
- 来自 Merchant Center 的商品 Feed。
- 自适应展示广告所需的媒体资源。
以下是支持 Merchant Center 商品 Feed 的广告素材列表:
第 1 步 - 制作与 Merchant Center 产品 Feed 相关联的广告系列
如需对零售商品进行再营销,您需要制作以展示广告网络为定位目标的广告系列。这需要满足以下条件:
- 一个
CampaignBudget,用于指定广告系列能够支出的金额。 - 一个
UserList,其中包含要通过相应广告系列定位的用户名单。 ShoppingSetting用于指定商品 Feed 将用于哪个 Merchant Center 账号的广告系列。
配置广告系列的基本步骤如下:
制作新的广告系列,并将
AdvertisingChannelType设置为DISPLAY。为广告系列设置
CampaignBudget。可以是新创建的预算,也可以是共享预算。为广告系列设置
ShoppingSetting。请注意,此处使用的是CampaignService,而不是AdGroupService,因为 Feed 必须附加到广告系列一级。- 首先,将
merchant_id设置为与 Google Ads 账号关联的 Merchant Center 账号的merchant_id。此 Merchant Center 账号必须已与 Google Ads 相关联,如这篇文章中所述。 - 然后,按照这篇文章中的说明设置
campaign_priority。 - 将
enable_local设置为true将包含本地商品目录广告。
- 首先,将
应用 mutate 操作,将新广告系列添加到账号中。
代码示例
Java
private String createCampaign( GoogleAdsClient googleAdsClient, long customerId, long merchantCenterAccountId, long campaignBudgetId) { String budgetResourceName = ResourceNames.campaignBudget(customerId, campaignBudgetId); // Creates the campaign. Campaign campaign = Campaign.newBuilder() .setName("Shopping campaign #" + getPrintableDateTime()) // Dynamic remarketing campaigns are only available on the Google Display Network. .setAdvertisingChannelType(AdvertisingChannelType.DISPLAY) .setStatus(CampaignStatus.PAUSED) .setCampaignBudget(budgetResourceName) .setManualCpc(ManualCpc.newBuilder().build()) // The settings for the shopping campaign. // This connects the campaign to the merchant center account. .setShoppingSetting( ShoppingSetting.newBuilder() .setCampaignPriority(0) .setMerchantId(merchantCenterAccountId) .setEnableLocal(true) .build()) // Declares whether this campaign serves political ads targeting the EU. .setContainsEuPoliticalAdvertising(DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING) .build(); // Creates the campaign operation. CampaignOperation operation = CampaignOperation.newBuilder().setCreate(campaign).build(); // Creates the campaign service client. try (CampaignServiceClient campaignServiceClient = googleAdsClient.getLatestVersion().createCampaignServiceClient()) { // Adds the campaign. MutateCampaignsResponse response = campaignServiceClient.mutateCampaigns( Long.toString(customerId), ImmutableList.of(operation)); String campaignResourceName = response.getResults(0).getResourceName(); System.out.printf("Created campaign with resource name '%s'.%n", campaignResourceName); return campaignResourceName; } }
C#
private string CreateCampaign(GoogleAdsClient client, long customerId, long merchantCenterAccountId, long campaignBudgetId) { // Creates the Campaign Service client. CampaignServiceClient campaignServiceClient = client.GetService(Services.V25.CampaignService); string budgetResourceName = ResourceNames.CampaignBudget(customerId, campaignBudgetId); // Creates the campaign. Campaign campaign = new Campaign() { Name = "Shopping campaign #" + ExampleUtilities.GetRandomString(), // Dynamic remarketing campaigns are only available on the Google Display Network. AdvertisingChannelType = AdvertisingChannelType.Display, Status = CampaignStatus.Paused, CampaignBudget = budgetResourceName, ManualCpc = new ManualCpc(), // The settings for the shopping campaign. // This connects the campaign to the Merchant Center account. ShoppingSetting = new Campaign.Types.ShoppingSetting() { CampaignPriority = 0, MerchantId = merchantCenterAccountId, EnableLocal = true }, // Declare whether or not this campaign contains political ads targeting the EU. ContainsEuPoliticalAdvertising = EuPoliticalAdvertisingStatus.DoesNotContainEuPoliticalAdvertising, }; // Creates the campaign operation. CampaignOperation operation = new CampaignOperation() { Create = campaign }; // Adds the campaign. MutateCampaignsResponse response = campaignServiceClient.MutateCampaigns(customerId .ToString(), new[] { operation }); string campaignResourceName = response.Results.First().ResourceName; Console.WriteLine($"Created campaign with resource name '{campaignResourceName}'."); return campaignResourceName; }
PHP
private static function createCampaign( GoogleAdsClient $googleAdsClient, int $customerId, int $merchantCenterAccountId, int $campaignBudgetId ): string { // Configures the settings for the shopping campaign. $shoppingSettings = new ShoppingSetting([ 'campaign_priority' => 0, 'merchant_id' => $merchantCenterAccountId, 'enable_local' => true ]); // Creates the campaign. $campaign = new Campaign([ 'name' => 'Shopping campaign #' . Helper::getPrintableDatetime(), // Dynamic remarketing campaigns are only available on the Google Display Network. 'advertising_channel_type' => AdvertisingChannelType::DISPLAY, 'status' => CampaignStatus::PAUSED, 'campaign_budget' => ResourceNames::forCampaignBudget($customerId, $campaignBudgetId), 'manual_cpc' => new ManualCpc(), // Declare whether or not this campaign serves political ads targeting the EU. 'contains_eu_political_advertising' => EuPoliticalAdvertisingStatus::DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING // This connects the campaign to the merchant center account. 'shopping_setting' => $shoppingSettings ]); // Creates a campaign operation. $campaignOperation = new CampaignOperation(); $campaignOperation->setCreate($campaign); // Issues a mutate request to add the campaign. $campaignServiceClient = $googleAdsClient->getCampaignServiceClient(); $response = $campaignServiceClient->mutateCampaigns( MutateCampaignsRequest::build($customerId, [$campaignOperation]) ); /** @var Campaign $addedCampaign */ $addedCampaign = $response->getResults()[0]; $addedCampaignResourceName = $addedCampaign->getResourceName(); printf("Created campaign with resource name '%s'.%s", $addedCampaignResourceName, PHP_EOL); return $addedCampaignResourceName; }