실적 최대화 캠페인의 애셋

실적 최대화 캠페인은 확장 소재와 관련된 몇 가지 고유한 특성이 있습니다.

  1. 다양한 유형의 애셋 수가 최소 필수 수량으로 규정되어 있습니다.
  2. 애셋은 실적 최대화 캠페인에 고유한 AssetGroup라는 컬렉션으로 그룹화됩니다.
  3. 일부 애셋은 머신러닝으로 자동으로 생성될 수 있습니다.

코드 예시

다음 코드 스니펫은 새 요청에서 필요한 반복 애셋을 만드는 방법을 보여줍니다.

Java

/** Creates multiple text assets and returns the list of resource names. */
private List<String> createMultipleTextAssets(
    GoogleAdsClient googleAdsClient, long customerId, List<String> texts) {
  List<MutateOperation> mutateOperations = new ArrayList<>();
  for (String text : texts) {
    Asset asset = Asset.newBuilder().setTextAsset(TextAsset.newBuilder().setText(text)).build();
    AssetOperation assetOperation = AssetOperation.newBuilder().setCreate(asset).build();
    mutateOperations.add(MutateOperation.newBuilder().setAssetOperation(assetOperation).build());
  }

  List<String> assetResourceNames = new ArrayList<>();
  // Creates the service client.
  try (GoogleAdsServiceClient googleAdsServiceClient =
      googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) {
    // Sends the operations in a single Mutate request.
    MutateGoogleAdsResponse response =
        googleAdsServiceClient.mutate(Long.toString(customerId), mutateOperations);
    for (MutateOperationResponse result : response.getMutateOperationResponsesList()) {
      if (result.hasAssetResult()) {
        assetResourceNames.add(result.getAssetResult().getResourceName());
      }
    }
    printResponseDetails(response);
  }
  return assetResourceNames;
}
      

C#

/// <summary>
/// Creates multiple text assets and returns the list of resource names.
/// </summary>
/// <param name="client">The Google Ads Client.</param>
/// <param name="customerId">The customer's ID.</param>
/// <param name="texts">The texts to add.</param>
/// <returns>A list of asset resource names.</returns>
private List<string> CreateMultipleTextAssets(
    GoogleAdsClient client,
    long customerId,
    string[] texts)
{
    // Get the GoogleAdsService.
    GoogleAdsServiceClient googleAdsServiceClient =
        client.GetService(Services.V17.GoogleAdsService);

    MutateGoogleAdsRequest request = new MutateGoogleAdsRequest()
    {
        CustomerId = customerId.ToString()
    };

    foreach (string text in texts)
    {
        request.MutateOperations.Add(
            new MutateOperation()
            {
                AssetOperation = new AssetOperation()
                {
                    Create = new Asset()
                    {
                        TextAsset = new TextAsset()
                        {
                            Text = text
                        }
                    }
                }
            }
        );
    }

    // Send the operations in a single Mutate request.
    MutateGoogleAdsResponse response = googleAdsServiceClient.Mutate(request);

    List<string> assetResourceNames = new List<string>();

    foreach (MutateOperationResponse operationResponse in response.MutateOperationResponses)
    {
        MutateAssetResult assetResult = operationResponse.AssetResult;
        assetResourceNames.Add(assetResult.ResourceName);
    }

    PrintResponseDetails(response);

    return assetResourceNames;
}

      

2,399필리핀

private static function createMultipleTextAssets(
    GoogleAdsClient $googleAdsClient,
    int $customerId,
    array $texts
): array {
    // Here again, we use the GoogleAdService to create multiple text assets in a single
    // request.
    $operations = [];
    foreach ($texts as $text) {
        // Creates a mutate operation for a text asset.
        $operations[] = new MutateOperation([
            'asset_operation' => new AssetOperation([
                'create' => new Asset(['text_asset' => new TextAsset(['text' => $text])])
            ])
        ]);
    }

    // Issues a mutate request to add all assets.
    $googleAdsService = $googleAdsClient->getGoogleAdsServiceClient();
    /** @var MutateGoogleAdsResponse $mutateGoogleAdsResponse */
    $mutateGoogleAdsResponse =
        $googleAdsService->mutate(MutateGoogleAdsRequest::build($customerId, $operations));

    $assetResourceNames = [];
    foreach ($mutateGoogleAdsResponse->getMutateOperationResponses() as $response) {
        /** @var MutateOperationResponse $response */
        $assetResourceNames[] = $response->getAssetResult()->getResourceName();
    }
    self::printResponseDetails($mutateGoogleAdsResponse);

    return $assetResourceNames;
}
      

Python

def create_multiple_text_assets(client, customer_id, texts):
    """Creates multiple text assets and returns the list of resource names.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
        texts: a list of strings, each of which will be used to create a text
          asset.

    Returns:
        asset_resource_names: a list of asset resource names.
    """
    # Here again we use the GoogleAdService to create multiple text
    # assets in a single request.
    googleads_service = client.get_service("GoogleAdsService")

    operations = []
    for text in texts:
        mutate_operation = client.get_type("MutateOperation")
        asset = mutate_operation.asset_operation.create
        asset.text_asset.text = text
        operations.append(mutate_operation)

    # Send the operations in a single Mutate request.
    response = googleads_service.mutate(
        customer_id=customer_id,
        mutate_operations=operations,
    )
    asset_resource_names = []
    for result in response.mutate_operation_responses:
        if result._pb.HasField("asset_result"):
            asset_resource_names.append(result.asset_result.resource_name)
    print_response_details(response)
    return asset_resource_names
      

Ruby

# Creates multiple text assets and returns the list of resource names.
def create_multiple_text_assets(client, customer_id, texts)
  operations = texts.map do |text|
    client.operation.mutate do |m|
      m.asset_operation = client.operation.create_resource.asset do |asset|
        asset.text_asset = client.resource.text_asset do |text_asset|
          text_asset.text = text
        end
      end
    end
  end

  # Send the operations in a single Mutate request.
  response = client.service.google_ads.mutate(
    customer_id: customer_id,
    mutate_operations: operations,
  )

  asset_resource_names = []
  response.mutate_operation_responses.each do |result|
    if result.asset_result
      asset_resource_names.append(result.asset_result.resource_name)
    end
  end
  print_response_details(response)
  asset_resource_names
end
      

Perl

sub create_multiple_text_assets {
  my ($api_client, $customer_id, $texts) = @_;

  # Here again we use the GoogleAdService to create multiple text assets in a
  # single request.
  my $operations = [];
  foreach my $text (@$texts) {
    # Create a mutate operation for a text asset.
    push @$operations,
      Google::Ads::GoogleAds::V17::Services::GoogleAdsService::MutateOperation
      ->new({
        assetOperation =>
          Google::Ads::GoogleAds::V17::Services::AssetService::AssetOperation->
          new({
            create => Google::Ads::GoogleAds::V17::Resources::Asset->new({
                textAsset =>
                  Google::Ads::GoogleAds::V17::Common::TextAsset->new({
                    text => $text
                  })})})});
  }

  # Issue a mutate request to add all assets.
  my $mutate_google_ads_response = $api_client->GoogleAdsService()->mutate({
    customerId       => $customer_id,
    mutateOperations => $operations
  });

  my $asset_resource_names = [];
  foreach
    my $response (@{$mutate_google_ads_response->{mutateOperationResponses}})
  {
    push @$asset_resource_names, $response->{assetResult}{resourceName};
  }
  print_response_details($mutate_google_ads_response);

  return $asset_resource_names;
}
      

자동으로 생성된 애셋

머신러닝을 사용한 Google 자동화는 모든 관련 채널을 포함하는 데 필요한 추가 애셋을 생성합니다. 애셋은 광고가 게재되는 Google 광고 채널 (예: YouTube, Gmail, Google 검색)에 따라 자동으로 조합됩니다.

텍스트 애셋

계정의 페이지 피드를 실적 최대화 캠페인과 연결하여 확장 소재를 자동으로 생성할 수 있습니다.

페이지 피드를 캠페인에 연결하려면 동적 검색 광고와 동일한 프로세스를 사용합니다.

  1. 웹사이트의 각 페이지에 사용할 애셋 만들기
  2. 페이지 피드 애셋을 애셋 세트로 패키징
  3. AssetSet을 캠페인과 연결

페이지 피드를 연결한 후 TEXT_ASSET_AUTOMATION 유형의 AssetAutomationSettingOPTED_IN로 설정되었는지 확인합니다. 캠페인을 만들 때 AssetAutomationSetting를 설정하지 않은 경우의 기본 설정입니다.

이 설정을 사용하면 실적 개선이 예상되는 경우 캠페인에서 방문 페이지, 도메인, 제공된 애셋의 콘텐츠를 사용하여 광고를 맞춤설정할 수 있습니다. OPTED-IN 상태로 두는 것이 좋습니다.

동영상 애셋

실적 최대화 캠페인의 애셋 그룹에 동영상을 추가하지 않으면 애셋 그룹의 애셋에서 하나 이상의 동영상 애셋이 생성될 수 있습니다. 자동 생성 동영상을 더 이상 실적 최대화 캠페인에 게재하지 않으려면 맞춤 동영상을 직접 업로드하세요. 그러면 자동 생성된 동영상의 게재가 중단됩니다.