「おすすめスポット」リスティング グループを作成する

「おすすめスポット」広告グループのリスティング グループを作成する際は、ホテル広告のリスティング グループと同じ構造階層とツリー構築プロセスを使用します。

おすすめスポットの在庫を分割するには、ListingDimensionInfo で利用可能な、アクティビティに特化したディメンションを使用します。

  • ActivityCountryInfo: 地域ターゲティング定数リソース名(geoTargetConstants/{criterion_id}、米国の場合は "geoTargetConstants/2840" など)を使用して、対象国(value)でフィルタします。
  • ActivityStateInfo: 地域ターゲット定数リソース名 (geoTargetConstants/{criterion_id})を使用して、配送先の州 または地域(value)でフィルタします。
  • ActivityCityInfo: 宛先の都市(value)でフィルタします。地域ターゲティング定数リソース名(geoTargetConstants/{criterion_id}、ニューヨーク市の場合は "geoTargetConstants/1023191" など)を使用します。
  • ActivityRatingInfo: アクティビティの星またはユーザーの評価(value、1 から 5 までの整数。5 が最高)でフィルタします。
  • ActivityIdInfo: おすすめスポット センター フィード(value)で定義されている特定のアクティビティ ID でフィルタします。

ディメンション階層ルール

おすすめスポットのリスティング グループ ツリーを作成する際は、次のルールに従ってください。

  1. ルートノード: すべてのリスティング グループ ツリーは、listing_group.type が SUBDIVISION(または、単一のキャッチオール ノードが必要な場合は UNIT)で、case_value が未設定の単一のルート AdGroupCriterion で始まる必要があります。
  2. 下位区分と単位: 中間ブランチでは type を SUBDIVISION に設定し、リーフノードでは type を UNIT に設定する必要があります。おすすめスポット キャンペーンでは、入札単価はキャンペーンの MaximizeConversionValue 戦略によって自動的に管理されるため、UNIT ノードで cpc_bid_micros を設定することは任意です。リーフユニットをサービスから除外するには、AdGroupCriterion に negative = true を設定します。
  3. フォールバック(「その他すべて」)ノード: すべてのサブディビジョンを完全にパーティショニングする必要があります。下位区分の直下の子ノードは、すべて同じ ListingDimensionInfo サブタイプを使用する必要があります。また、残りのすべての在庫を捕捉するために、1 つの子ノードはそのサブタイプの空のインスタンスである必要があります。

次のツリーは、国、都市、アクティビティ ID で分割された有効な階層を示しています。

Root (SUBDIVISION)
 ├── ActivityCountryInfo: "geoTargetConstants/2840" (US, SUBDIVISION)
 │    ├── ActivityCityInfo: "geoTargetConstants/1023191" (New York, SUBDIVISION)
 │    │    ├── ActivityIdInfo: "activity_123" (UNIT, biddable)
 │    │    └── ActivityIdInfo: <empty> (UNIT, "Everything else in New York")
 │    └── ActivityCityInfo: <empty> (UNIT, "Everything else in US")
 └── ActivityCountryInfo: <empty> (UNIT, negative=true, excluded)

サンプルコード

次の Python の例では、一時 ID(-1)を使用してルート SUBDIVISION を作成し、ActivityCountryInfo で分割して、米国("geoTargetConstants/2840")を対象とするユニットと、他のすべての国を対象とする除外された代替ユニットを作成します。

ad_group_service = client.get_service("AdGroupService")
ad_group_criterion_service = client.get_service("AdGroupCriterionService")
ad_group_resource_name = ad_group_service.ad_group_path(
    customer_id, ad_group_id
)
operations = []

# 1. Create the root SUBDIVISION node with temporary criterion ID -1.
root_op = client.get_type("AdGroupCriterionOperation")
root = root_op.create
root.resource_name = ad_group_criterion_service.ad_group_criterion_path(
    customer_id, ad_group_id, -1
)
root.status = client.enums.AdGroupCriterionStatusEnum.ENABLED
root.listing_group.type_ = client.enums.ListingGroupTypeEnum.SUBDIVISION
operations.append(root_op)

# 2. Create a child UNIT node targeting activities in the US.
us_op = client.get_type("AdGroupCriterionOperation")
us_unit = us_op.create
us_unit.ad_group = ad_group_resource_name
us_unit.status = client.enums.AdGroupCriterionStatusEnum.ENABLED
us_unit.listing_group.type_ = client.enums.ListingGroupTypeEnum.UNIT
us_unit.listing_group.parent_ad_group_criterion = root.resource_name
us_unit.listing_group.case_value.activity_country.value = "geoTargetConstants/2840"
operations.append(us_op)

# 3. Create the required fallback ("Everything else") UNIT node.
other_op = client.get_type("AdGroupCriterionOperation")
other_unit = other_op.create
other_unit.ad_group = ad_group_resource_name
other_unit.negative = True
other_unit.listing_group.type_ = client.enums.ListingGroupTypeEnum.UNIT
other_unit.listing_group.parent_ad_group_criterion = root.resource_name
client.copy_from(
    other_unit.listing_group.case_value.activity_country,
    client.get_type("ActivityCountryInfo"),
)
operations.append(other_op)

response = ad_group_criterion_service.mutate_ad_group_criteria(
    customer_id=customer_id, operations=operations
)

次のステップ