コンバージョン数

Google 広告 における「コンバージョン」とは、ユーザーが広告をクリックした後やディスプレイ ネットワーク広告を目にした後に、特定のアクション(商品の購入、モバイルアプリのインストール、メール配信の登録など)を完了することを指します。

広告を見たりクリックしたりしてからのユーザーの行動を分析するのに役立つのが「コンバージョン トラッキング」です。電話での問い合わせ、商品の購入、モバイルアプリのインストールなどを行うユーザーをトラッキングできます。

コンバージョン アクション

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

また、ほとんどのコンバージョン アクションをトラッキングするには、ユーザー側で追加の手順が必要になります。たとえば、ウェブサイトのコンバージョンをトラッキングするには、ConversionAction を作成して ConversionActionTypeWEBPAGE に設定し、タグと呼ばれるコード スニペットをウェブサイトのコンバージョン ページに追加する必要があります。

オフライン コンバージョンとリードの拡張コンバージョン

コンバージョンのアップロードには、オフライン コンバージョン アクションの種類を使用します。

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

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

通話コンバージョン

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

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

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

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

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

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

ConversionAction には、複数のタイプのウェブサイト コンバージョンが含まれます。これらのコンバージョンは、API 内で TagSnippettype フィールドによって区別されます。

次の表は、Google 広告管理画面の [ソース] にそれぞれ使用する同等の API パラメータを示したものです。

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

ウェブサイト コンバージョンと電話番号クリックのコンバージョンには、event_snippet が必要です。これは、購入手続きの確認ページや見込み顧客の送信ページなどのコンバージョン アクションを示すウェブページに配置する必要があります。global_site_tag は、ウェブサイトのすべてのページに設置する必要があります。これらの属性はいずれも、ConversionActionService で取得できます。

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

アプリ コンバージョン

ConversionActionType は、モバイルアプリのインストールと Android のアプリ内コンバージョンの両方に対応します。次の表は、Google 広告管理画面の [発生元] にそれぞれ使用する同等の API パラメータを示したものです。

コンバージョン アクションの種類 Google 広告のソース
GOOGLE_PLAY_DOWNLOAD Android アプリのインストール(初回起動)
GOOGLE_PLAY_IN_APP_PURCHASE Android アプリ内のユーザー行動

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="v15"
    )

    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 Ads API を使って作成できないコンバージョン アクションには数種類ありますが、レポートでパフォーマンス指標を取得したり、場合によっては一部の属性を変更したりすることは可能です。

コンバージョン目標

コンバージョン目標を使用すると、コンバージョン アクションを整理して、広告掲載の目標に向けて最適化を簡単に行うことができます。詳しくは目標に関するガイドをご覧ください。

コンバージョン値のルール

コンバージョン値のルールを使用すると、さまざまなディメンションに基づいてコンバージョン値を調整するルールを定義できます。

Google 広告のコンバージョン アカウントでコンバージョン トラッキングを有効にする

コンバージョン トラッキングの設定に関する情報を取得する

ConversionTrackingSettingCustomer リソースをクエリすると、アカウントのコンバージョン トラッキングの設定をチェックし、コンバージョン トラッキングが有効になっているかどうかを確認できます。GoogleAdsService.searchStream を使用して次のクエリを発行します。

SELECT
  customer.conversion_tracking_setting.google_ads_conversion_customer,
  customer.conversion_tracking_setting.conversion_tracking_status,
  customer.conversion_tracking_setting.conversion_tracking_id,
  customer.conversion_tracking_setting.cross_account_conversion_tracking_id
FROM customer

google_ads_conversion_customer フィールドは、この顧客のコンバージョンを作成および管理する Google 広告アカウントを示します。お客様がクロスアカウント コンバージョン トラッキングを使用している場合は、クライアント センター(MCC)アカウントの ID です。コンバージョンを作成して管理するには、Google 広告コンバージョンのお客様 ID を Google Ads API リクエストで customer_id として指定します。このフィールドは、コンバージョン トラッキングが有効になっていない場合でも入力されます。

conversion_tracking_status フィールドは、コンバージョン トラッキングが有効かどうか、およびアカウントでクロスアカウント コンバージョン トラッキングを使用しているかどうかを示します。

Google 広告のコンバージョンの顧客に関するコンバージョン アクションを作成する

conversion_tracking_status の値が NOT_CONVERSION_TRACKED の場合、アカウントでコンバージョン トラッキングは有効になりません。次の例のように、Google 広告のコンバージョン アカウントで ConversionAction を 1 つ以上作成して、コンバージョン トラッキングを有効にします。または、有効にするコンバージョンの種類のヘルプセンターの手順に沿って、管理画面でコンバージョン アクションを作成することもできます。

拡張コンバージョンは、Google Ads API を介して送信すると自動的に有効になりますが、Google 広告の管理画面から無効にすることもできます。

サンプルコード

Java

private void runExample(GoogleAdsClient googleAdsClient, long customerId) {

  // Creates a ConversionAction.
  ConversionAction conversionAction =
      ConversionAction.newBuilder()
          .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.V15.ConversionActionService);

    // Add a conversion action.
    ConversionAction conversionAction = new ConversionAction()
    {
        Name = "Earth to Mars Cruises Conversion #" + ExampleUtilities.GetRandomString(),
        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([
        '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
    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) = @_;

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

  # Create a conversion action operation.
  my $conversion_action_operation =
    Google::Ads::GoogleAds::V15::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;
}
      

conversion_action_type が正しい ConversionActionType 値に設定されていることを確認します。Google Ads API でコンバージョン アクションを作成する方法について詳しくは、コンバージョン アクションを作成するをご覧ください。

既存のコンバージョン アクションを取得する

既存のコンバージョン アクションの詳細を取得するには、次のクエリを実行します。リクエストのお客様 ID が上で特定した Google 広告コンバージョンのお客様に設定されていることと、コンバージョン アクションの種類が適切な ConversionActionType 値に設定されていることを確認します。

SELECT
  conversion_action.resource_name,
  conversion_action.name,
  conversion_action.status
FROM conversion_action
WHERE conversion_action.type = 'INSERT_CONVERSION_ACTION_TYPE'

クロスアカウント コンバージョン トラッキング

クロスアカウント コンバージョン トラッキングを使用している場合、ConversionActionService は次のコンバージョン アクションを返します。

  • クライアント センター(MCC)アカウントによって定義された、クロスアカウント コンバージョン トラッキング用のすべてのコンバージョン アクション
  • データが発生したすべてのコンバージョン アクション(システム定義のアクションや、MCC が担当するアクションを含む。後でリンクが解除された場合も含む)
  • リンクされた Google アナリティクス プロファイルで作成したアナリティクスの目標やトランザクションなど、ユーザーが自身のアカウントで定義したすべてのアクション。これには、Google 広告にインポートされていないアクション(ステータスが HIDDEN で、Google 広告のウェブ インターフェースからのみインポート可能)も含まれます。

API を使用してクロスアカウント コンバージョン アクションの設定とクエリを行うことはできますが、MCC アカウントからクロスアカウント コンバージョン トラッキングを有効にする必要があります。