コンバージョン アクションを作成する

このガイドでは、Google Ads API を使って作成できるさまざまなタイプのコンバージョン アクションの一覧、各アクションと Google 広告の管理画面へのマッピング方法、新しいコンバージョン アクションの作成方法を示す詳細なコードサンプルを紹介します。

コンバージョンを測定するには、トラッキングするコンバージョン アクションの typeConversionAction を設定します。たとえばオンライン購入と電話では 異なるコンバージョンアクションが必要です

API で新しいコンバージョン アクションを設定する際は、以下のコンバージョン アクションのコード例を追加することをおすすめします。このサンプルは、すべてのバックグラウンド認証タスクを処理し、ConversionAction を作成する手順を説明します。

また、ほとんどのコンバージョン アクションをトラッキングするには、ユーザー側で追加の手順が必要になります。たとえば、ウェブサイトのコンバージョンをトラッキングするには、タグと呼ばれるコード スニペットをウェブサイトのコンバージョン ページに追加する必要があります。その他のコンバージョン アクションの要件については、ヘルプセンターの記事をご覧ください。

ウェブサイト コンバージョン

ウェブサイト コンバージョンを使用すると、オンラインでの販売、リンクのクリック、ページビュー、登録などのウェブサイトのアクションをトラッキングできます。

ウェブサイトでコンバージョンをトラッキングするには、ConversionAction を作成して ConversionActionTypeWEBPAGE に設定し、タグと呼ばれるコード スニペットをウェブサイトのコンバージョン ページに追加する必要があります。

ConversionAction にはいくつかのタイプのウェブサイト コンバージョンが含まれます。これらのコンバージョンは、API 内では ConversionActiontag_snippets フィールドにリストされている各 TagSnippettype フィールドによって区別されます。

TagSnippet は、コンバージョン アクションをトラッキングするためにウェブサイトに含める必要があるトラッキング コードを提供します。ウェブサイト コンバージョンと電話番号クリック コンバージョンには、購入手続きの確認ページやリードフォームの送信ページなどのコンバージョン アクションを示すウェブページに配置する event_snippet と、ウェブサイトのすべてのページに配置する global_site_tag が必要です。これらの属性はいずれも、ConversionActionService で取得できます。ページにタグを設定する方法について詳しくは、ヘルプセンターをご覧ください。

次の表は、Google 広告管理画面の [参照元] にそれぞれ対応する API パラメータを示したものです。

トラッキング コードのタイプ Google 広告の参照元
WEBPAGE ウェブサイト、ウェブサイト(Google アナリティクス(GA4))
WEBPAGE_ONCLICK ウェブサイト、ウェブサイト(Google アナリティクス(GA4))
CLICK_TO_CALL 電話番号のクリック数
--- ウェブサイト(Google アナリティクス(UA))

アプリ コンバージョン

アプリ コンバージョンを使用すると、モバイルアプリのインストールや Google Play ストアでのアプリ内購入をトラッキングできます。

次の表は、Google 広告管理画面の [参照元] にそれぞれ対応する ConversionActionType API パラメータを示したものです。

コンバージョン アクションの種類 Google 広告の参照元
GOOGLE_PLAY_DOWNLOAD [Google Play] > [インストール]
GOOGLE_PLAY_IN_APP_PURCHASE Google Play > アプリ内購入

Google アナリティクス 4 プロパティまたは第三者アプリ分析を使って、その他のモバイルアプリ アクションをトラッキングする場合。その他のコンバージョン アクション タイプをご覧ください。

通話コンバージョン

通話コンバージョン トラッキングでは、広告経由の通話数、ウェブサイトに掲載された電話番号への通話数、モバイルサイトでの電話番号のクリック数をトラッキング可能。

次の表は、Google 広告管理画面の [参照元] にそれぞれ対応する ConversionActionType API パラメータを示したものです。

コンバージョン アクションの種類 Google 広告の参照元
AD_CALL 電話番号表示オプションを使用した広告や電話専用広告でのコール コンバージョン
WEBSITE_CALL ウェブサイトに掲載した電話番号への問い合わせ
CLICK_TO_CALL モバイルサイト上での電話番号のクリック数

CLICK_TO_CALL タイプは AD_CALL タイプと異なり、実際の通話をトラッキングしません。代わりに、CLICK_TO_CALL はモバイル デバイスでの電話番号のクリックのみをトラッキングします。これは、通話のトラッキングに Google 広告専用転送電話番号を使用できない場合に便利です。

AD_CALL

AD_CALL コンバージョン アクションは、Google 広告の管理画面に「広告経由の通話数」コンバージョンとして表示されます。AD_CALL コンバージョン アクションを作成したら、CallAsset の作成時に call_conversion_action フィールドにリソース名を指定します。電話番号アセットを使用すると、広告に直接電話番号を表示できます。

通話が指定した時間を超えるとコンバージョンとして報告されます。 カウントされます。

WEBSITE_CALL

WEBSITE_CALL コンバージョン アクションは、Google 広告の管理画面に「ウェブサイト経由の通話数」コンバージョンとして表示されます。

AD_CALL とは異なり、このトラッカーでは、ウェブサイトに記載されている電話番号の通話トラッキング用に動的な Google 広告専用転送電話番号を取得するために、event_snippetglobal_site_tag をウェブサイトに追加する必要があります。また、通話アセットを設定して、顧客単位、キャンペーン単位、または広告グループ単位でリンクする必要があります。

オフライン コンバージョンのインポート

次の表は、Google 広告管理画面の [発生元] にそれぞれ対応する ConversionActionType API パラメータと、各コンバージョン アクション タイプに関するドキュメントへのリンクを示しています。

コンバージョン アクションの種類 Google 広告の参照元 API 設定ガイド
UPLOAD_CLICKS クリック経由のコンバージョンとリードの拡張コンバージョンをトラッキングします アップロードのクリックに関するガイド
リードの拡張コンバージョンのガイド
UPLOAD_CALLS 電話での問い合わせによるコンバージョンをトラッキング API 設定ガイド
STORE_SALES 店舗での販売をコンバージョンとしてトラッキングする API 設定ガイド

拡張コンバージョン(ウェブ向け)

拡張コンバージョン(ウェブ向け)を使用すると、コンバージョン イベント発生から 24 時間以内に、WEBPAGE 件のコンバージョン アクションのファースト パーティ コンバージョン データを送信できます。これにより、顧客データベースや CRM システムなど、さまざまなソースから自社データを特定できるようになります。

その他のコンバージョン アクションの種類

Google Ads API では、他の種類のコンバージョン アクションをレポートで使用できますが、そうしたアクションの作成または変更が制限または禁止される場合があります。

SKAdNetwork コンバージョン

iOS アプリ キャンペーンを運用していて、SKAdNetwork を実装している場合は、次のリソースを使用して、Customer および Campaign レベルで Google に提供されている SKAdNetwork データにアクセスできます。

レポートのフィールド 説明
metrics.sk_ad_network_conversions Apple によってレポートされたコンバージョン数です。この指標は、segments.sk_ad_network_conversion_value セグメントと日付関連セグメントの任意の組み合わせでのみ分割可能です。
segments.sk_ad_network_conversion_value

Apple がレポートしたコンバージョン値です。このセグメントは metrics.sk_ad_network_conversions 以外の指標には適用できず、日付関連のセグメントとのみ組み合わせることができます。

Apple が値 0 を報告した場合、値 0 が返され、それ以外の場合は値が返されません。この 2 つのケースを区別するには、 フィールドの有無を確認します。

また、CustomerSkAdNetworkConversionValueSchema を使用して、iOS アプリを使用している特定のリンク済み顧客の SKAdNetwork コンバージョン値のマッピングを保存することもできます。

Python サンプルコード

#!/usr/bin/env python
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import argparse
import sys

from google.ads.googleads.client import GoogleAdsClient
from google.ads.googleads.errors import GoogleAdsException

def main(client, customer_id):
    """Adds a keyword plan, campaign, ad group, etc. to the customer account.

    Also handles errors from the API and prints them.

    Args:
        client: An initialized instance of GoogleAdsClient
        customer_id: A str of the customer_id to use in requests.
    """

    res = update_skan_cv_schema(
        client, customer_id, "my_app_id", "account_link_id"
    )
    print(res)

def update_skan_cv_schema(client, customer_id, app_id, account_link_id):
    skan_service = client.get_service(
        "CustomerSkAdNetworkConversionValueSchemaService"
    )

    req = client.get_type(
        "MutateCustomerSkAdNetworkConversionValueSchemaRequest"
    )
    operation = client.get_type(
        "CustomerSkAdNetworkConversionValueSchemaOperation"
    )
    schema_instance = client.get_type(
        "CustomerSkAdNetworkConversionValueSchema"
    )

    new_schema = operation.update
    new_schema.resource_name = (
        skan_service.customer_sk_ad_network_conversion_value_schema_path(
            "customer_id", "account_link_id"
        )
    )
    new_schema.schema.app_id = app_id
    new_schema.schema.measurement_window_hours = 48

    skan_cv_mapping = (
        schema_instance.SkAdNetworkConversionValueSchema.FineGrainedConversionValueMappings()
    )
    skan_cv_mapping.fine_grained_conversion_value = 0  # 0 - 63
    skan_cv_mapping.conversion_value_mapping.min_time_post_install_hours = 0
    skan_cv_mapping.conversion_value_mapping.max_time_post_install_hours = 48

    skan_cv_event = schema_instance.SkAdNetworkConversionValueSchema.Event()
    skan_cv_event.mapped_event_name = "TEST"
    skan_cv_event.event_revenue_value = 10

    skan_cv_mapping.conversion_value_mapping.mapped_events.append(skan_cv_event)
    new_schema.schema.fine_grained_conversion_value_mappings.append(
        skan_cv_mapping
    )

    req.operation = operation
    req.customer_id = customer_id

    res = skan_service.mutate_customer_sk_ad_network_conversion_value_schema(
        req
    )
    return res

if __name__ == "__main__":
    # GoogleAdsClient will read the google-ads.yaml configuration file in the
    # home directory if none is specified.
    googleads_client = GoogleAdsClient.load_from_storage(
        version="v16"
    )

    parser = argparse.ArgumentParser(
        description="Creates a keyword plan for specified customer."
    )
    # The following argument(s) should be provided to run the example.
    parser.add_argument(
        "-c",
        "--customer_id",
        type=str,
        required=True,
        help="The Google Ads customer ID.",
    )
    args = parser.parse_args()

    try:
        main(googleads_client, args.customer_id)
    except GoogleAdsException as ex:
        print(
            f'Request with ID "{ex.request_id}" failed with status '
            f'"{ex.error.code().name}" and includes the following errors:'
        )
        for error in ex.failure.errors:
            print(f'\tError with message "{error.message}".')
            if error.location:
                for field_path_element in error.location.field_path_elements:
                    print(f"\t\tOn field: {field_path_element.field_name}")
        sys.exit(1)
  

Google アナリティクス

リンクされた Google アナリティクス プロパティからのコンバージョンは、次のいずれかの type 値を持ちます。

  • GA4 プロパティの変換:

    • GOOGLE_ANALYTICS_4_CUSTOM
    • GOOGLE_ANALYTICS_4_PURCHASE

    GA4 プロパティ ID、プロパティ名、イベント名は、google_analytics_4_settings フィールドから取得することもできます。

  • ユニバーサル アナリティクス プロパティのコンバージョン:

    • UNIVERSAL_ANALYTICS_GOAL
    • UNIVERSAL_ANALYTICS_TRANSACTION

GA4 プロパティのコンバージョンには、次の変更を加えることができます。

  • GA4 プロパティから Google 広告アカウントにコンバージョンをインポートするには、status フィールドを HIDDEN から ENABLED に変更します。
  • primary_for_goal フィールドと category フィールドを変更して、Google 広告の入札とレポートに与える影響を指定します
  • name または value_settings を更新します。
  • remove オペレーションを使用して、Google 広告アカウントからコンバージョンを削除します。

インポートされた GA4 コンバージョンの他の属性、またはインポートされたユニバーサル アナリティクス コンバージョンのいずれかの属性を変更しようとすると、MUTATE_NOT_ALLOWED エラーが発生します。これらの変更は、Google 広告の管理画面からのみ行うことができます。

Firebase と第三者のアプリ分析

第三者アプリ分析または Firebase のコンバージョンをインポートするには、ConversionActionServicemutate メソッドを使用して ConversionActionstatusHIDDEN から ENABLED に変更します。これらのコンバージョン アクションでは、app_id の更新はサポートされていません。

  • FIREBASE_ANDROID_FIRST_OPEN
  • FIREBASE_ANDROID_IN_APP_PURCHASE
  • FIREBASE_ANDROID_CUSTOM
  • FIREBASE_IOS_FIRST_OPEN
  • FIREBASE_IOS_IN_APP_PURCHASE
  • FIREBASE_IOS_CUSTOM
  • THIRD_PARTY_APP_ANALYTICS_ANDROID_FIRST_OPEN
  • THIRD_PARTY_APP_ANALYTICS_ANDROID_IN_APP_PURCHASE
  • THIRD_PARTY_APP_ANALYTICS_ANDROID_CUSTOM
  • THIRD_PARTY_APP_ANALYTICS_IOS_FIRST_OPEN
  • THIRD_PARTY_APP_ANALYTICS_IOS_IN_APP_PURCHASE
  • THIRD_PARTY_APP_ANALYTICS_IOS_CUSTOM

店舗販売

Google Ads API を使って STORE_SALES または STORE_SALES_DIRECT_UPLOAD のコンバージョン アクションを作成することはできませんが、API では店舗販売取引のアップロードはサポートされています。

  • STORE_SALES
  • STORE_SALES_DIRECT_UPLOAD

その他

次のコンバージョン アクション タイプは、Google Ads API では読み取り専用で、レポート作成用に提供されます。

  • ANDROID_APP_PRE_REGISTRATION
  • ANDROID_INSTALLS_ALL_OTHER_APPS
  • FLOODLIGHT_ACTION
  • FLOODLIGHT_TRANSACTION
  • GOOGLE_HOSTED
  • LEAD_FORM_SUBMIT
  • SALESFORCE
  • SEARCH_ADS_360
  • SMART_CAMPAIGN_AD_CLICKS_TO_CALL
  • SMART_CAMPAIGN_MAP_CLICKS_TO_CALL
  • SMART_CAMPAIGN_MAP_DIRECTIONS
  • SMART_CAMPAIGN_TRACKED_CALLS
  • STORE_VISITS
  • WEBPAGE_CODELESS

不明

Google 広告アカウントに他のタイプのコンバージョン アクションが含まれている場合、クエリとレポートでは、ConversionAction.typeUNKNOWN のコンバージョン アクションが返されることがあります。API では、このようなコンバージョン アクションの管理はサポートされていませんが、主要なコンバージョン指標(metrics.conversionsmetrics.conversions_value など)で完全な結果が得られるよう、これらのコンバージョン アクションをレポートに返します。

サンプルコード

次のサンプルコードは、新しいコンバージョン アクションを作成する方法を示しています。具体的には、typeUPLOAD_CLICKS に設定したコンバージョン アクションを作成します。これは、Google 広告で新しいコンバージョン アクションを作成する場合のフローと同じです。[インポート] > [API またはアップロードを使用して手動でインポート] > [クリック経由のコンバージョンをトラッキング] をクリックします。また、categoryDEFAULT に設定します。

次のデフォルト設定が適用されます。

Java

private void runExample(GoogleAdsClient googleAdsClient, long customerId) {

  // Creates a ConversionAction.
  ConversionAction conversionAction =
      ConversionAction.newBuilder()
          // Note that conversion action names must be unique. If a conversion action already
          // exists with the specified conversion_action_name the create operation will fail with
          // a ConversionActionError.DUPLICATE_NAME error.
          .setName("Earth to Mars Cruises Conversion #" + getPrintableDateTime())
          .setCategory(ConversionActionCategory.DEFAULT)
          .setType(ConversionActionType.WEBPAGE)
          .setStatus(ConversionActionStatus.ENABLED)
          .setViewThroughLookbackWindowDays(15L)
          .setValueSettings(
              ValueSettings.newBuilder()
                  .setDefaultValue(23.41)
                  .setAlwaysUseDefaultValue(true)
                  .build())
          .build();

  // Creates the operation.
  ConversionActionOperation operation =
      ConversionActionOperation.newBuilder().setCreate(conversionAction).build();

  try (ConversionActionServiceClient conversionActionServiceClient =
      googleAdsClient.getLatestVersion().createConversionActionServiceClient()) {
    MutateConversionActionsResponse response =
        conversionActionServiceClient.mutateConversionActions(
            Long.toString(customerId), Collections.singletonList(operation));
    System.out.printf("Added %d conversion actions:%n", response.getResultsCount());
    for (MutateConversionActionResult result : response.getResultsList()) {
      System.out.printf(
          "New conversion action added with resource name: '%s'%n", result.getResourceName());
    }
  }
}
      

C#

public void Run(GoogleAdsClient client, long customerId)
{
    // Get the ConversionActionService.
    ConversionActionServiceClient conversionActionService =
        client.GetService(Services.V16.ConversionActionService);

    // Note that conversion action names must be unique.
    // If a conversion action already exists with the specified name the create operation
    // will fail with a ConversionAction.DUPLICATE_NAME error.
    string ConversionActionName = "Earth to Mars Cruises Conversion #"
        + ExampleUtilities.GetRandomString();

    // Add a conversion action.
    ConversionAction conversionAction = new ConversionAction()
    {
        Name = ConversionActionName,
        Category = ConversionActionCategory.Default,
        Type = ConversionActionType.Webpage,
        Status = ConversionActionStatus.Enabled,
        ViewThroughLookbackWindowDays = 15,
        ValueSettings = new ConversionAction.Types.ValueSettings()
        {
            DefaultValue = 23.41,
            AlwaysUseDefaultValue = true
        }
    };

    // Create the operation.
    ConversionActionOperation operation = new ConversionActionOperation()
    {
        Create = conversionAction
    };

    try
    {
        // Create the conversion action.
        MutateConversionActionsResponse response =
            conversionActionService.MutateConversionActions(customerId.ToString(),
                    new ConversionActionOperation[] { operation });

        // Display the results.
        foreach (MutateConversionActionResult newConversionAction in response.Results)
        {
            Console.WriteLine($"New conversion action with resource name = " +
                $"'{newConversionAction.ResourceName}' was added.");
        }
    }
    catch (GoogleAdsException e)
    {
        Console.WriteLine("Failure:");
        Console.WriteLine($"Message: {e.Message}");
        Console.WriteLine($"Failure: {e.Failure}");
        Console.WriteLine($"Request ID: {e.RequestId}");
        throw;
    }
}
      

PHP

public static function runExample(GoogleAdsClient $googleAdsClient, int $customerId)
{
    // Creates a conversion action.
    $conversionAction = new ConversionAction([
        // Note that conversion action names must be unique.
        // If a conversion action already exists with the specified conversion_action_name
        // the create operation will fail with a ConversionActionError.DUPLICATE_NAME error.
        'name' => 'Earth to Mars Cruises Conversion #' . Helper::getPrintableDatetime(),
        'category' => ConversionActionCategory::PBDEFAULT,
        'type' => ConversionActionType::WEBPAGE,
        'status' => ConversionActionStatus::ENABLED,
        'view_through_lookback_window_days' => 15,
        'value_settings' => new ValueSettings([
            'default_value' => 23.41,
            'always_use_default_value' => true
        ])
    ]);

    // Creates a conversion action operation.
    $conversionActionOperation = new ConversionActionOperation();
    $conversionActionOperation->setCreate($conversionAction);

    // Issues a mutate request to add the conversion action.
    $conversionActionServiceClient = $googleAdsClient->getConversionActionServiceClient();
    $response = $conversionActionServiceClient->mutateConversionActions(
        MutateConversionActionsRequest::build($customerId, [$conversionActionOperation])
    );

    printf("Added %d conversion actions:%s", $response->getResults()->count(), PHP_EOL);

    foreach ($response->getResults() as $addedConversionAction) {
        /** @var ConversionAction $addedConversionAction */
        printf(
            "New conversion action added with resource name: '%s'%s",
            $addedConversionAction->getResourceName(),
            PHP_EOL
        );
    }
}
      

Python

def main(client, customer_id):
    conversion_action_service = client.get_service("ConversionActionService")

    # Create the operation.
    conversion_action_operation = client.get_type("ConversionActionOperation")

    # Create conversion action.
    conversion_action = conversion_action_operation.create

    # Note that conversion action names must be unique. If a conversion action
    # already exists with the specified conversion_action_name, the create
    # operation will fail with a ConversionActionError.DUPLICATE_NAME error.
    conversion_action.name = f"Earth to Mars Cruises Conversion {uuid.uuid4()}"
    conversion_action.type_ = (
        client.enums.ConversionActionTypeEnum.UPLOAD_CLICKS
    )
    conversion_action.category = (
        client.enums.ConversionActionCategoryEnum.DEFAULT
    )
    conversion_action.status = client.enums.ConversionActionStatusEnum.ENABLED
    conversion_action.view_through_lookback_window_days = 15

    # Create a value settings object.
    value_settings = conversion_action.value_settings
    value_settings.default_value = 15.0
    value_settings.always_use_default_value = True

    # Add the conversion action.
    conversion_action_response = (
        conversion_action_service.mutate_conversion_actions(
            customer_id=customer_id,
            operations=[conversion_action_operation],
        )
    )

    print(
        "Created conversion action "
        f'"{conversion_action_response.results[0].resource_name}".'
    )
      

Ruby

def add_conversion_action(customer_id)
  # GoogleAdsClient will read a config file from
  # ENV['HOME']/google_ads_config.rb when called without parameters
  client = Google::Ads::GoogleAds::GoogleAdsClient.new


  # Add a conversion action.
  conversion_action = client.resource.conversion_action do |ca|
    ca.name = "Earth to Mars Cruises Conversion #{(Time.new.to_f * 100).to_i}"
    ca.type = :UPLOAD_CLICKS
    ca.category = :DEFAULT
    ca.status = :ENABLED
    ca.view_through_lookback_window_days = 15

    # Create a value settings object.
    ca.value_settings = client.resource.value_settings do |vs|
      vs.default_value = 15
      vs.always_use_default_value = true
    end
  end

  # Create the operation.
  conversion_action_operation = client.operation.create_resource.conversion_action(conversion_action)

  # Add the ad group ad.
  response = client.service.conversion_action.mutate_conversion_actions(
    customer_id: customer_id,
    operations: [conversion_action_operation],
  )

  puts "New conversion action with resource name = #{response.results.first.resource_name}."
end
      

Perl

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

  # Note that conversion action names must be unique.
  # If a conversion action already exists with the specified conversion_action_name,
  # the create operation fails with error ConversionActionError.DUPLICATE_NAME.
  my $conversion_action_name = "Earth to Mars Cruises Conversion #" . uniqid();

  # Create a conversion action.
  my $conversion_action =
    Google::Ads::GoogleAds::V16::Resources::ConversionAction->new({
      name                          => $conversion_action_name,
      category                      => DEFAULT,
      type                          => WEBPAGE,
      status                        => ENABLED,
      viewThroughLookbackWindowDays => 15,
      valueSettings                 =>
        Google::Ads::GoogleAds::V16::Resources::ValueSettings->new({
          defaultValue          => 23.41,
          alwaysUseDefaultValue => "true"
        })});

  # Create a conversion action operation.
  my $conversion_action_operation =
    Google::Ads::GoogleAds::V16::Services::ConversionActionService::ConversionActionOperation
    ->new({create => $conversion_action});

  # Add the conversion action.
  my $conversion_actions_response =
    $api_client->ConversionActionService()->mutate({
      customerId => $customer_id,
      operations => [$conversion_action_operation]});

  printf "New conversion action added with resource name: '%s'.\n",
    $conversion_actions_response->{results}[0]{resourceName};

  return 1;
}
      

このサンプルは、クライアント ライブラリのリマーケティング フォルダと、コンバージョン アクションのコードサンプルを追加するコードサンプル コレクションからも入手できます。

確認事項

Google 広告と Google Ads API はさまざまなコンバージョン アクションをサポートしているため、一部の検証ルールはアクションの type によって異なります。

コンバージョン アクションの作成時に最もよくあるエラーは DUPLICATE_NAME です。コンバージョン アクションごとに一意の名前を使用してください。

ConversionAction フィールドの設定に関するヒントをいくつか紹介します。

すべての列挙型フィールド
列挙型フィールドを UNKNOWN に設定しようとすると、RequestError.INVALID_ENUM_VALUE エラーが発生します。
app_id
app_id 属性は不変で、新しいアプリ コンバージョンを作成する場合にのみ設定できます。
attribution_model_settings
このオプションを非推奨のオプションに設定すると、CANNOT_SET_RULE_BASED_ATTRIBUTION_MODELS エラーが発生します。Google 広告では、GOOGLE_ADS_LAST_CLICKGOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN のみがサポートされています。
click_through_lookback_window_days

この属性に許可された範囲外の値を設定すると、RangeError.TOO_LOW または RangeError.TOO_HIGH エラーが発生します。

この属性は、AD_CALL または WEBSITE_CALL のコンバージョン アクションに対して、[1,60] の範囲内になければなりません。他のほとんどのコンバージョン アクションでは、指定できる範囲は [1,30] です。

include_in_conversions_metric

create または update オペレーションでこの値を設定すると、FieldError.IMMUTABLE_FIELD エラーで失敗します。代わりに、コンバージョン目標ガイドの説明に沿って primary_for_goal を設定します。

phone_call_duration_seconds

通話用ではないコンバージョン アクションでこの属性を設定しようとすると、FieldError.VALUE_MUST_BE_UNSET エラーが発生します。

type

type 属性は不変で、新しいコンバージョンを作成するときにのみ設定できます。

typeUNKNOWN と等しいコンバージョン アクションを更新すると、MutateError.MUTATE_NOT_ALLOWED エラーが発生します。

value_settings

WEBSITE_CALL または AD_CALL のコンバージョン アクションの value_settings では、always_use_default_valuetrue に設定する必要があります。この値を作成または更新するときに false の値を指定すると、INVALID_VALUE エラーが発生します。

view_through_lookback_window_days

この属性に許可された範囲外の値を設定すると、RangeError.TOO_LOW または RangeError.TOO_HIGH エラーが発生します。ほとんどのコンバージョン アクションで指定できる範囲は [1,30] です。

この属性は、AD_CALL または WEBSITE_CALL のコンバージョン アクションでは設定できません。値を指定すると、VALUE_MUST_BE_UNSET エラーが発生します。