리드 확보용 향상된 전환의 작동 방식
리드 확보용 향상된 전환을 사용하려면 사용자가 리드 양식을 제출할 때 GCLID를 Google Ads로 자동 전송하는 태그를 설정해야 합니다. Google Ads, Google 태그 관리자, Google 애널리틱스 또는 Campaign Manager 360을 통해 Google 태그를 설정할 수 있습니다. 사용자가 리드 양식을 제출하면 태그는 리드 양식 제출 데이터(예: 사용자의 이메일 주소)를 GCLID와 함께 Google Ads로 전송합니다. 나중에 사용자가 전환하면 고객센터에 설명된 대로 Google Ads UI를 통해 전환을 업로드하거나 Google Ads API를 통해 리드 양식 정보와 함께 전환을 업로드할 수 있습니다.
Google Ads API의 리드 확보용 향상된 전환은 다음 흐름의 5단계를 포착합니다.
기본 요건 구현
향상된 전환 설정을 사용하려면 몇 가지 기본 요건이 충족되어야 합니다. 구현을 진행하기 전에 모든 기본 요건이 충족되는지 확인하세요.
Google Ads 전환 고객에서 전환 추적을 사용 설정합니다.
고객 데이터 약관에 동의하고 리드 확보용 향상된 전환을 선택합니다.
태그 지정을 구성합니다.
1. Google Ads 전환 고객에서 전환 추적 사용 설정
전환 추적 설정에 대한 정보 검색
ConversionTrackingSetting
의 Customer
리소스를 쿼리하여 계정의 전환 추적 설정을 확인하고 전환 추적이 사용 설정되어 있는지 확인할 수 있습니다.
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 Ads 계정을 나타냅니다. 교차 계정 전환 추적을 사용하는 고객의 경우 관리자 계정의 ID입니다. Google Ads 전환 고객 ID는 전환을 생성하고 관리하기 위한 Google Ads API 요청에서 customer_id
로 제공되어야 합니다.
전환 추적이 사용 설정되지 않은 경우에도 이 필드는 채워집니다.
conversion_tracking_status
필드는 전환 추적이 사용 설정되어 있는지, 계정에서 교차 계정 전환 추적을 사용하고 있는지 나타냅니다.
Google Ads 전환 고객 아래에서 전환 액션 만들기
conversion_tracking_status
값이 NOT_CONVERSION_TRACKED
이면 계정에 전환 추적이 사용 설정되어 있지 않습니다. 다음 예와 같이 Google Ads 전환 계정에서 ConversionAction
를 하나 이상 만들어 전환 추적을 사용 설정합니다. 또는 사용 설정하려는 전환 유형에 관한 고객센터의 안내에 따라 UI에서 전환 액션을 만들 수도 있습니다.
향상된 전환은 Google Ads API를 통해 전송될 때 자동으로 사용 설정되지만 Google Ads UI를 통해 사용 중지할 수 있습니다.
코드 예
자바
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.V18.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::V18::Resources::ConversionAction->new({ name => $conversion_action_name, category => DEFAULT, type => WEBPAGE, status => ENABLED, viewThroughLookbackWindowDays => 15, valueSettings => Google::Ads::GoogleAds::V18::Resources::ValueSettings->new({ defaultValue => 23.41, alwaysUseDefaultValue => "true" })}); # Create a conversion action operation. my $conversion_action_operation = Google::Ads::GoogleAds::V18::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 Ads 전환 고객으로 설정되어 있고 전환 액션 유형이 올바른 ConversionActionType
값으로 설정되어 있는지 확인합니다.
SELECT
conversion_action.resource_name,
conversion_action.name,
conversion_action.status
FROM conversion_action
WHERE conversion_action.type = 'UPLOAD_CLICKS'
2. 고객 데이터 약관에 동의하고 리드 확보용 향상된 전환을 선택합니다.
리드 확보용 향상된 전환을 사용하려면 리드 확보용 향상된 전환을 선택하고 고객 데이터 약관에 동의해야 합니다. Google Ads 전환 고객에게 다음 쿼리를 실행하여 이러한 기본 요건이 이미 충족되었는지 확인할 수 있습니다.
SELECT
customer.id,
customer.conversion_tracking_setting.accepted_customer_data_terms,
customer.conversion_tracking_setting.enhanced_conversions_for_leads_enabled
FROM customer
accepted_customer_data_terms
또는 enhanced_conversions_for_leads_enabled
가 false
인 경우 고객센터의 안내에 따라 기본 요건을 완료하세요.
3. 태그 지정 구성
고객센터의 안내에 따라 Google 태그를 구성하여 리드 확보용 향상된 전환을 사용 설정할 수 있습니다. Google 태그 관리자를 사용하여 리드 확보용 향상된 전환을 설정하려면 다음 안내를 따르세요.
다음 단계
기본 요건을 충족하면 리드 확보용 향상된 전환을 구현할 수 있습니다.