타겟팅 설정 구성

광고 그룹 또는 캠페인의 타겟팅 설정을 사용하여 광고를 특정 잠재고객 세그먼트 또는 선택한 특정 콘텐츠에만 게재하도록 범위를 좁힐지 여부를 지정합니다.

타겟팅 설정

`target_restrictions` 배열로 `TargetingSetting` 필드를 설정하거나 `target_restriction_operations`를 사용하여 증분 업데이트를 적용하여 타겟팅에 다양한 기준 유형이 사용되는 방식에 관한 세부정보를 설정할 수 있습니다. 각 `TargetRestriction`을 사용하면 `TargetingDimension` (AUDIENCE, TOPIC, GENDER, AGE_RANGE, PLACEMENT, PARENTAL_STATUS, 또는 INCOME_RANGE)이 `bid_only` 옵션을 사용하는지 여부를 제어할 수 있습니다.

bid_only를 true로 설정하면 타겟팅 설정이 '관찰'로 설정되고 기준은 트래픽을 제한하는 데 사용되지 않지만 목록에 있는 여러 사용자에 대해 다르게 입찰할 수 있습니다. bid_only를 false로 설정하면 타겟팅 설정이 '타겟팅'으로 설정되고 기준을 사용하여 광고 그룹 트래픽을 타겟팅된 목록의 사용자에게만 제한할 수 있습니다.

주요 차이점은 다음 표에 요약되어 있습니다.

설정 bid_only 도달범위에 미치는 영향 입찰 영향
타겟팅 false 선택한 기준만으로 도달범위를 좁힙니다. 기준에 특정 입찰가를 설정할 수 있습니다.
관찰 true 도달범위를 좁히지 않습니다. 광고가 정상적으로 게재됩니다. 기준에 대한 입찰가 조정 을 허용합니다.

실제 사례

다음은 관찰 모드와 타겟팅 모드를 사용해야 하는 경우 에 관한 간단한 예입니다.

관찰
검색 캠페인을 실행하고 광고를 특정 잠재고객으로만 제한하지 않고 일반 대중에 비해 특정 잠재고객 (예: '스포츠 팬')의 전환율을 알고 싶다면 관찰 모드를 사용하세요. bid_only = true(관찰)로 '스포츠 팬'을 잠재고객 기준으로 추가하고 +10% 입찰가 조정을 적용할 수 있습니다. 이렇게 하면 해당 잠재고객의 실적 데이터를 수집하고 해당 잠재고객 외부의 사용자의 트래픽을 잃지 않고도 실적이 좋은 경우 더 경쟁력 있게 입찰할 수 있습니다.
타겟팅
이전에 웹사이트를 방문했지만 전환하지 않은 사용자에게 리마케팅하기 위해 디스플레이 캠페인을 실행하고 '장바구니 이탈자' 사용자 목록에 있는 사용자만 이러한 특정 광고를 보도록 하려면 타겟팅 모드를 사용하세요. 이 경우 '장바구니 이탈자' 목록을 bid_only = false (타겟팅)로 UserList 기준으로 추가합니다. 이렇게 하면 광고 그룹의 예산이 의도가 높은 이 잠재고객 세그먼트에 도달하는 데만 사용됩니다.

권장사항

기본적으로 bid_only는 false로 설정됩니다. 즉, 타겟팅 설정이 '타겟팅'으로 설정됩니다. 특정 타겟팅 측정기준 (예: AUDIENCE)의 타겟 제한이 TargetingSetting의 target_restrictions 배열에서 생략되거나 없는 경우 시스템은 해당 측정기준에 대해 '타겟팅'의 기본 동작(bid_only는 암시적으로 false)을 채택합니다.

이 하위 수준 API 동작은 캠페인 또는 광고 그룹이 생성될 때 일부 타겟팅 측정기준(예: 검색 캠페인의 AUDIENCE)에 대해 기본적으로 '관찰'(bid_only는 true)을 자동으로 적용할 수 있는 Google Ads UI와 다를 수 있습니다. 예를 들어 UI를 통해 생성된 쇼핑 캠페인은 API 관점에서 기본적으로 AUDIENCE 측정기준 설정을 생략할 수 있습니다. 즉, '타겟팅'의 기본 API 동작(bid_only는 false)을 암시적으로 상속합니다.

검색 캠페인 또는 쇼핑 캠페인에 잠재고객 세그먼트를 추가하는 경우 bid_only의 타겟팅 설정을 true로 명시적으로 구성하여 '관찰'로 설정하는 것이 좋습니다.

검색 광고의 잠재고객 세그먼트에 대해 중복 캠페인을 설정하는 경우 bid_only의 타겟팅을 false로 설정된 상태로 유지하세요.

제한사항

상위 캠페인에 targeting_setting이 설정된 경우 AdGroup에 targeting_setting을 추가하거나 업데이트할 수 없습니다. 상위 Campaign에 targeting_setting이 설정된 경우 먼저 상위 Campaign에서 targeting_setting을 삭제해야 합니다. 마찬가지로 Campaign에 을 설정하려면 먼저 AdGroup에서 targeting_setting을 삭제해야 합니다.

Campaign 또는 AdGroup에서 targeting_setting을 삭제하려면 targeting_setting.target_restrictions가 삭제되고 (빈 목록으로 설정) update_mask에 targeting_setting.target_restrictions가 포함된 update 작업을 전송합니다.

타겟팅 설정 가져오기

타겟팅이 의도한 대로 설정되었는지 확인하려면 검색어에서 ad_group 리소스의 ad_group.targeting_setting.target_restrictions 필드 또는 campaign 리소스의 campaign.targeting_setting.target_restrictions 필드를 요청하여 광고 그룹 또는 캠페인의 targeting_setting을 확인합니다.

예

이 예에서는 광고 그룹의 targeting_setting을 업데이트하여 bid_only 이 trueTargetRestrictiontargeting_dimensionAUDIENCE이 되도록 합니다. 이렇게 하면 도달범위를 제한하지 않고 잠재고객 세그먼트의 사용자에 대한 실적을 관찰하고 입찰가 조정을 설정할 수 있습니다.

먼저 제공된 ID가 있는 광고 그룹에서 모든 ad_group.targeting_setting.target_restrictions를 가져옵니다.

자바

String searchQuery =
    "SELECT ad_group.id, ad_group.name, ad_group.targeting_setting.target_restrictions "
        + "FROM ad_group "
        + "WHERE ad_group.id = "
        + adGroupId;
      

C#

string query = $@"
    SELECT ad_group.id, ad_group.name, ad_group.targeting_setting.target_restrictions
    FROM ad_group
    WHERE ad_group.id = {adGroupId}";
      

PHP

$query = "SELECT ad_group.id, ad_group.name, " .
    "ad_group.targeting_setting.target_restrictions " .
    "FROM ad_group " .
    "WHERE ad_group.id = $adGroupId";
      

Python

query: str = f"""
    SELECT
      ad_group.id,
      ad_group.name,
      ad_group.targeting_setting.target_restrictions
    FROM ad_group
    WHERE ad_group.id = {ad_group_id}"""
      

Ruby

query = <<~QUERY
  SELECT ad_group.id, ad_group.name,
         ad_group.targeting_setting.target_restrictions
  FROM ad_group
  WHERE ad_group.id = #{ad_group_id}
QUERY
      

Perl

my $query =
  "SELECT ad_group.id, ad_group.name, " .
  "ad_group.targeting_setting.target_restrictions FROM ad_group " .
  "WHERE ad_group.id = $ad_group_id";
      

curl

다음으로 타겟 제한을 반복하고 TargetingSetting 객체를 재구성합니다. 코드가 targeting_dimension이 AUDIENCE이고 bid_only 값이 false인 TargetRestriction을 발견하면 TargetRestriction 객체의 bid_only 필드를 true (또는 '관찰')로 업데이트하고 TargetingSetting 객체에 추가합니다. 그렇지 않으면 서버에서 반환된 TargetRestriction 객체를 TargetingSetting에 추가합니다.

자바

for (TargetRestriction targetRestriction : targetRestrictions) {
  TargetingDimension targetingDimension = targetRestriction.getTargetingDimension();
  boolean bidOnly = targetRestriction.getBidOnly();
  System.out.printf(
      "- Targeting restriction with targeting dimension '%s' and bid only set to '%b'.%n",
      targetingDimension, bidOnly);
  // Adds the target restriction to the TargetingSetting object as is if the targeting
  // dimension has a value other than AUDIENCE because those should not change.
  if (!targetingDimension.equals(TargetingDimension.AUDIENCE)) {
    targetingSettingBuilder.addTargetRestrictions(targetRestriction);
  } else if (!bidOnly) {
    shouldUpdateTargetingSetting = true;
    // Adds an AUDIENCE target restriction with bid_only set to true to the targeting
    // setting object. This has the effect of setting the AUDIENCE target restriction to
    // "Observation". For more details about the targeting setting, visit
    // https://support.google.com/google-ads/answer/7365594.
    targetingSettingBuilder.addTargetRestrictions(
        TargetRestriction.newBuilder()
            .setTargetingDimensionValue(TargetingDimension.AUDIENCE_VALUE)
            .setBidOnly(true));
  }
}
      

C#

foreach (TargetRestriction targetRestriction in targetRestrictions)
{
    TargetingDimension targetingDimension =
        targetRestriction.TargetingDimension;
    bool bidOnly = targetRestriction.BidOnly;

    Console.WriteLine("\tTargeting restriction with targeting dimension " +
        $"'{targetingDimension}' and bid only set to '{bidOnly}'.");

    // Add the target restriction to the TargetingSetting object as is if the
    // targeting dimension has a value other than AUDIENCE because those should
    // not change.
    if (targetingDimension != TargetingDimension.Audience)
    {
        targetingSetting.TargetRestrictions.Add(targetRestriction);
    }
    else if (!bidOnly)
    {
        shouldUpdateTargetingSetting = true;

        // Add an AUDIENCE target restriction with bid_only set to true to the
        // targeting setting object. This has the effect of setting the AUDIENCE
        // target restriction to "Observation". For more details about the
        // targeting setting, visit
        // https://support.google.com/google-ads/answer/7365594.
        targetingSetting.TargetRestrictions.Add(new TargetRestriction
        {
            TargetingDimension = TargetingDimension.Audience,
            BidOnly = true
        });
    }
}
      

PHP

foreach (
    $adGroup->getTargetingSetting()->getTargetRestrictions() as $targetRestriction
) {
    // Prints the results.
    $targetingDimension = $targetRestriction->getTargetingDimension();
    $bidOnly = $targetRestriction->getBidOnly();
    printf(
        "- Targeting restriction with targeting dimension '%s' and bid only set to " .
        "'%s'.%s",
        TargetingDimension::name($targetingDimension),
        $bidOnly ? 'true' : 'false',
        PHP_EOL
    );

    // Adds the target restriction to the TargetingSetting object as is if the targeting
    // dimension has a value other than AUDIENCE because those should not change.
    if ($targetingDimension !== TargetingDimension::AUDIENCE) {
        $targetRestrictions[] = $targetRestriction;
    } elseif (!$bidOnly) {
        $shouldUpdateTargetingSetting = true;

        // Adds an AUDIENCE target restriction with bid_only set to true to the
        // targeting setting object. This has the effect of setting the AUDIENCE
        // target restriction to "Observation".
        // For more details about the targeting setting, visit
        // https://support.google.com/google-ads/answer/7365594.
        $targetRestrictions[] = new TargetRestriction(
            [
            'targeting_dimension' => TargetingDimension::AUDIENCE,
            'bid_only' => true
            ]
        );
    }
}
      

Python

target_restriction: TargetRestriction
for target_restriction in target_restrictions:
    targeting_dimension: TargetingDimensionEnum.TargetingDimension = (
        target_restriction.targeting_dimension
    )
    bid_only: bool = target_restriction.bid_only

    print(
        "\tTargeting restriction with targeting dimension "
        f"'{targeting_dimension.name}' "
        f"and bid only set to '{bid_only}'."
    )

    # Add the target restriction to the TargetingSetting object as
    # is if the targeting dimension has a value other than audience
    # because those should not change.
    if targeting_dimension != targeting_dimension_enum.AUDIENCE:
        targeting_setting.target_restrictions.append(target_restriction)
    elif not bid_only:
        should_update_targeting_setting: bool = True

        # Add an audience target restriction with bid_only set to
        # true to the targeting setting object. This has the effect
        # of setting the audience target restriction to
        # "Observation". For more details about the targeting
        # setting, visit
        # https://support.google.com/google-ads/answer/7365594.
        new_target_restriction: TargetRestriction = (
            targeting_setting.target_restrictions.add()
        )
        new_target_restriction.targeting_dimension = (
            targeting_dimension_enum.AUDIENCE
        )
        new_target_restriction.bid_only = True
      

Ruby

ad_group.targeting_setting.target_restrictions.each do |r|
  # Prints the results.
  targeting_dimension = r.targeting_dimension
  bid_only = r.bid_only
  puts "- Targeting restriction with targeting dimension " \
    "#{targeting_dimension} and bid only set to #{bid_only}."

  # Adds the target restriction to the TargetingSetting object as is if the
  # targeting dimension has a value other than AUDIENCE because those should
  # not change.
  if targeting_dimension != :AUDIENCE
    target_restrictions << r
  elsif !bid_only
    should_update_targeting_setting = true

    # Adds an AUDIENCE target restriction with bid_only set to true to the
    # targeting setting object. This has the effect of setting the AUDIENCE
    # target restriction to "Observation".
    # For more details about the targeting setting, visit
    # https://support.google.com/google-ads/answer/7365594.
    target_restrictions << client.resource.target_restriction do |tr|
      tr.targeting_dimension = :AUDIENCE
      tr.bid_only = true
    end
  end
end
      

Perl

foreach my $target_restriction (@target_restrictions) {
  my $targeting_dimension = $target_restriction->{targetingDimension};

  printf
    "\tTargeting restriction with targeting dimension '%s' and bid " .
    "only set to '%s'.\n",
    $targeting_dimension,
    $target_restriction->{bidOnly} ? "TRUE" : "FALSE";

  # Add the target restriction to the TargetingSetting object as is if the
  # targeting dimension has a value other than AUDIENCE because those
  # should not change.
  if ($targeting_dimension ne AUDIENCE) {
    $target_restriction->{bidOnly} =
      $target_restriction->{bidOnly} ? "true" : "false";
    push @{$targeting_setting->{targetRestrictions}}, $target_restriction;
  } elsif (!$target_restriction->{bidOnly}) {
    $should_update_target_setting = 1;

    # Add an AUDIENCE target restriction with bid_only set to true to the
    # targeting setting object. This has the effect of setting the
    # AUDIENCE target restriction to "Observation". For more details about
    # the targeting setting, visit
    # https://support.google.com/google-ads/answer/7365594.
    my $new_restriction =
      Google::Ads::GoogleAds::V25::Common::TargetRestriction->new({
        targetingDimension => AUDIENCE,
        bidOnly            => "true"
      });
    push @{$targeting_setting->{targetRestrictions}}, $new_restriction;
  }
}
      

curl

마지막으로 코드가 업데이트가 필요한 타겟 제한을 발견하면 새 타겟팅 설정으로 광고 그룹을 업데이트합니다.

자바

private void updateTargetingSetting(
    GoogleAdsClient googleAdsClient,
    long customerId,
    long adGroupId,
    TargetingSetting targetingSetting) {
  // Creates the ad group service client.
  try (AdGroupServiceClient adGroupServiceClient =
      googleAdsClient.getLatestVersion().createAdGroupServiceClient()) {
    // Creates an ad group object with the proper resource name and updated targeting setting.
    AdGroup adGroup =
        AdGroup.newBuilder()
            .setResourceName(ResourceNames.adGroup(customerId, adGroupId))
            .setTargetingSetting(targetingSetting)
            .build();
    // Constructs an operation that will update the ad group, using the FieldMasks utility to
    // derive the update mask. This mask tells the Google Ads API which attributes of the
    // ad group you want to change.
    AdGroupOperation operation =
        AdGroupOperation.newBuilder()
            .setUpdate(adGroup)
            .setUpdateMask(FieldMasks.allSetFieldsOf(adGroup))
            .build();
    // Sends the operation in a mutate request.
    MutateAdGroupsResponse response =
        adGroupServiceClient.mutateAdGroups(
            Long.toString(customerId), ImmutableList.of(operation));
    // Prints the resource name of the updated object.
    System.out.printf(
        "Updated targeting setting of ad group with resource name '%s'; set the AUDIENCE "
            + "target restriction to 'Observation'.%n",
        response.getResults(0).getResourceName());
  }
}
      

C#

private void UpdateTargetingSetting(GoogleAdsClient client, long customerId, long
    adGroupId, TargetingSetting targetingSetting)
{
    // Get the AdGroupService client.
    AdGroupServiceClient adGroupServiceClient =
        client.GetService(Services.V25.AdGroupService);

    // Create an ad group object with the updated targeting setting.
    AdGroup adGroup = new AdGroup
    {
        ResourceName = ResourceNames.AdGroup(customerId, adGroupId),
        TargetingSetting = targetingSetting
    };

    // Construct an operation that will update the ad group, using the FieldMasks utility
    // to derive the update mask. This mask tells the Google Ads API which attributes of the
    // ad group you want to change.
    AdGroupOperation operation = new AdGroupOperation
    {
        Update = adGroup,
        UpdateMask = FieldMasks.AllSetFieldsOf(adGroup)
    };

    // Send the operation in a mutate request.
    MutateAdGroupsResponse response =
        adGroupServiceClient.MutateAdGroups(customerId.ToString(), new[] { operation });
    // Print the resource name of the updated object.
    Console.WriteLine("Updated targeting setting of ad group with resource name " +
        $"'{response.Results.First().ResourceName}'; set the AUDIENCE target restriction " +
        "to 'Observation'.");
}
      

PHP

private static function updateTargetingSetting(
    GoogleAdsClient $googleAdsClient,
    int $customerId,
    int $adGroupId,
    TargetingSetting $targetingSetting
) {
    // Creates an ad group object with the proper resource name and updated targeting setting.
    $adGroup = new AdGroup(
        [
        'resource_name' => ResourceNames::forAdGroup($customerId, $adGroupId),
        'targeting_setting' => $targetingSetting
        ]
    );

    // Constructs an operation that will update the ad group with the specified resource name,
    // using the FieldMasks utility to derive the update mask. This mask tells the Google Ads
    // API which attributes of the ad group you want to change.
    $adGroupOperation = new AdGroupOperation();
    $adGroupOperation->setUpdate($adGroup);
    $adGroupOperation->setUpdateMask(FieldMasks::allSetFieldsOf($adGroup));

    // Issues a mutate request to update the ad group.
    $adGroupServiceClient = $googleAdsClient->getAdGroupServiceClient();
    $response = $adGroupServiceClient->mutateAdGroups(
        MutateAdGroupsRequest::build($customerId, [$adGroupOperation])
    );

    // Prints the resource name of the updated ad group.
    printf(
        "Updated targeting setting of ad group with resource name '%s'; set the AUDIENCE " .
        "target restriction to 'Observation'.%s",
        $response->getResults()[0]->getResourceName(),
        PHP_EOL
    );
}
      

Python

def update_targeting_setting(
    client: GoogleAdsClient,
    customer_id: str,
    ad_group_id: str,
    targeting_setting: TargetingSetting,
) -> None:
    """Updates the given TargetingSetting of an ad group.

    Args:
        client: The Google Ads client.
        customer_id: The Google Ads customer ID.
        ad_group_id: The ad group ID for which to update the audience targeting
            restriction.
        targeting_setting: The updated targeting setting.
    """
    # Get the AdGroupService client.
    ad_group_service: AdGroupServiceClient = client.get_service(
        "AdGroupService"
    )

    # Construct an operation that will update the ad group.
    ad_group_operation: AdGroupOperation = client.get_type("AdGroupOperation")

    # Populate the ad group object with the updated targeting setting.
    ad_group: AdGroup = ad_group_operation.update
    ad_group.resource_name = ad_group_service.ad_group_path(
        customer_id, ad_group_id
    )
    ad_group.targeting_setting.target_restrictions.extend(
        targeting_setting.target_restrictions
    )
    # Use the field_mask utility to derive the update mask. This mask tells the
    # Google Ads API which attributes of the ad group you want to change.
    client.copy_from(
        ad_group_operation.update_mask,
        protobuf_helpers.field_mask(None, ad_group._pb),
    )

    # Send the operation in a mutate request and print the resource name of the
    # updated object.
    mutate_ad_groups_response: MutateAdGroupsResponse = (
        ad_group_service.mutate_ad_groups(
            customer_id=customer_id, operations=[ad_group_operation]
        )
    )
    print(
        "Updated targeting setting of ad group with resource name "
        f"'{mutate_ad_groups_response.results[0].resource_name}'; set the "
        "audience target restriction to 'Observation'."
    )
      

Ruby

def update_targeting_setting(
  client,
  customer_id,
  ad_group_id,
  targeting_setting)
  # Constructs an operation that will update the ad group with the specified
  # resource name.
  ad_group_resource_name = client.path.ad_group(customer_id, ad_group_id)
  operation = client.operation.update_resource.ad_group(ad_group_resource_name) do |ag|
    ag.targeting_setting = targeting_setting
  end

  # Issues a mutate request to update the ad group.
  response = client.service.ad_group.mutate_ad_groups(
    customer_id: customer_id,
    operations: [operation],
  )

  # Prints the resource name of the updated ad group.
  puts "Updated targeting setting of ad group with resource name " \
    "#{response.results.first.resource_name}; set the AUDIENCE target " \
    "restriction to 'Observation'."
end
      

Perl

sub update_targeting_setting {
  my ($api_client, $customer_id, $ad_group_id, $targeting_setting) = @_;

  # Construct an ad group object with the updated targeting setting.
  my $ad_group = Google::Ads::GoogleAds::V25::Resources::AdGroup->new({
      resourceName =>
        Google::Ads::GoogleAds::V25::Utils::ResourceNames::ad_group(
        $customer_id, $ad_group_id
        ),
      targetingSetting => $targeting_setting
    });

  # Create an operation that will update the ad group, using the FieldMasks
  # utility to derive the update mask. This mask tells the Google Ads API which
  # attributes of the ad group you want to change.
  my $ad_group_operation =
    Google::Ads::GoogleAds::V25::Services::AdGroupService::AdGroupOperation->
    new({
      update     => $ad_group,
      updateMask => all_set_fields_of($ad_group)});

  # Send the operation in a mutate request and print the resource name of the
  # updated resource.
  my $ad_groups_response = $api_client->AdGroupService()->mutate({
      customerId => $customer_id,
      operations => [$ad_group_operation]});

  printf "Updated targeting setting of ad group with resourceName " .
    "'%s'; set the AUDIENCE target restriction to 'Observation'.\n",
    $ad_groups_response->{results}[0]{resourceName};
}
      

curl

캠페인의 bid_only 필드를 설정하는 프로세스는 거의 동일합니다.

다음 단계