액티비티 광고 그룹의 등록정보 그룹을 만드는 것은 호텔 광고 등록정보 그룹과 동일한 구조적 계층 및 트리 구축 프로세스를 따릅니다.
할 일 인벤토리를 파티셔닝하려면 ListingDimensionInfo에서 사용할 수 있는 전문 활동 측정기준을 사용하세요.
ActivityCountryInfo: 지역 타겟팅 상수 리소스 이름 (geoTargetConstants/{criterion_id}, 미국은"geoTargetConstants/2840")을 사용하여 대상 국가(value)를 기준으로 필터링합니다.ActivityStateInfo: 지역 타겟팅 상수 리소스 이름 (geoTargetConstants/{criterion_id})을 사용하여 대상 상태 또는 지역(value)을 기준으로 필터링합니다.ActivityCityInfo: 지리적 타겟팅 상수 리소스 이름(geoTargetConstants/{criterion_id}, 예: 뉴욕시의 경우"geoTargetConstants/1023191")을 사용하여 대상 도시(value)를 기준으로 필터링합니다.ActivityRatingInfo: 활동 별점 또는 사용자 평점 (value,1~5의 정수,5이 가장 좋음)으로 필터링합니다.ActivityIdInfo: 할 일 센터 피드 (value)에 정의된 특정 활동 ID로 필터링합니다.
측정기준 계층 구조 규칙
할 일 목록 그룹 트리를 빌드할 때는 다음 규칙을 따르세요.
- 루트 노드: 모든 등록정보 그룹 트리는
listing_group.type이SUBDIVISION(또는 단일 캐치올 노드를 원하는 경우UNIT)이고case_value이 설정되지 않은 단일 루트AdGroupCriterion로 시작해야 합니다. - 세부사항 및 단위: 중간 브랜치는
type을SUBDIVISION로 설정해야 하고 리프 노드는type을UNIT로 설정해야 합니다. 할 일 캠페인에서는 입찰이 캠페인의MaximizeConversionValue전략에 의해 자동으로 관리되므로UNIT노드에서cpc_bid_micros을 설정하지 않아도 됩니다. 리프 단위가 게재되지 않도록 하려면AdGroupCriterion에서negative = true를 설정합니다. - 대체 ('그 외 모두') 노드: 모든 하위 그룹이 완전히 파티셔닝되어야 합니다. 하위 분류의 모든 직계 하위 요소는 동일한
ListingDimensionInfo하위 유형을 사용해야 하며, 하나의 하위 요소는 나머지 모든 인벤토리를 캡처하기 위해 해당 하위 유형의 빈 인스턴스여야 합니다.
다음 트리는 국가, 도시, 활동 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
)
다음 단계
- 할 일 보고의 쿼리 활동 실적 측정항목