คุณสามารถใช้รายชื่อผู้ใช้ในแคมเปญรีมาร์เก็ตติ้งเพื่อดึงดูดผู้ใช้ที่ ดำเนินการที่เฉพาะเจาะจงในเว็บไซต์หรือแอปให้กลับมามีส่วนร่วมอีกครั้งได้ Google Ads API รองรับรายชื่อผู้ใช้หลายประเภท คู่มือนี้มุ่งเน้นการสร้างรายการผู้ใช้ตามกฎโดยใช้กลุ่มรายการกฎที่กำหนดไว้ในสร้างกลุ่มรายการกฎ
กลุ่มเป้าหมายตามกฎ
กลุ่มเป้าหมายตามกฎที่สร้างด้วย
flexible_rule_user_list อาจมีหลายกฎ
(inclusive_rule และ exclusive_rule ซึ่งรวมกันด้วย
inclusive_rule_operator) แต่ละกฎจะแสดงด้วยข้อความ UserListRuleInfo ซึ่งมีฟิลด์ rule_type ที่กำหนดวิธีรวมรายการกฎภายในกลุ่มรายการกฎ
แม้ว่า UserListRuleTypeEnum จะกำหนดทั้ง
OR_OF_ANDS (รูปแบบปกติแบบแยก) และ
AND_OF_ORS (รูปแบบปกติแบบร่วม) แต่ OR_OF_ANDS เป็นrule_type เดียวที่รองรับสำหรับ FlexibleRuleUserListInfo
(การตั้งค่า AND_OF_ORS จะแสดงผลเป็น
UserListError.RULE_TYPE_IS_NOT_SUPPORTED) เมื่อใช้ OR_OF_ANDS Google Ads จะANDรายการกฎทั้งหมดในกลุ่มรายการกฎเข้าด้วยกัน ซึ่งหมายความว่าสำหรับกฎที่กำหนด รายการกฎทุกรายการในกลุ่มรายการกฎอย่างน้อย 1 กลุ่มต้องตรงกันเพื่อให้กฎเป็นไปตามเงื่อนไข
หลังจากกำหนดออบเจ็กต์ UserListRuleItemGroupInfo ทั้ง 2 รายการใน
สร้างกลุ่มรายการกฎแล้ว ให้รวมออบเจ็กต์เหล่านั้นเป็นกลุ่มผู้ใช้ใหม่
ตัวอย่างโค้ดต่อไปนี้จะคงOR_OF_ANDSประเภทกฎเริ่มต้นไว้
เพิ่มกลุ่มรายการกฎทั้ง 2 กลุ่มลงใน FlexibleRuleOperandInfo ใน
FlexibleRuleUserListInfo และเปลี่ยนรายชื่อผู้ใช้
Java
FlexibleRuleUserListInfo flexibleRuleUserListInfo = FlexibleRuleUserListInfo.newBuilder() .setInclusiveRuleOperator(UserListFlexibleRuleOperator.AND) .addInclusiveOperands( FlexibleRuleOperandInfo.newBuilder() .setRule( // The default rule_type for a UserListRuleInfo object is OR of ANDs // (disjunctive normal form). That is, rule items will be ANDed together // within rule item groups and the groups themselves will be ORed together. UserListRuleInfo.newBuilder() .addRuleItemGroups(checkoutDateRuleGroup) .addRuleItemGroups(checkoutAndCartSizeRuleGroup)) // Optional: includes a lookback window for this rule, in days. .setLookbackWindowDays(7L)) .build();
C#
FlexibleRuleUserListInfo flexibleRuleUserListInfo = new FlexibleRuleUserListInfo(); FlexibleRuleOperandInfo flexibleRuleOperandInfo = new FlexibleRuleOperandInfo() { Rule = new UserListRuleInfo() }; flexibleRuleOperandInfo.Rule.RuleItemGroups.Add(checkoutAndCartSizeRuleGroup); flexibleRuleOperandInfo.Rule.RuleItemGroups.Add(checkoutDateRuleGroup); flexibleRuleUserListInfo.InclusiveOperands.Add(flexibleRuleOperandInfo);
PHP
$flexibleRuleUserListInfo = new FlexibleRuleUserListInfo( [ 'inclusive_rule_operator' => UserListFlexibleRuleOperator::PBAND, 'inclusive_operands' => [ new FlexibleRuleOperandInfo( [ 'rule' => new UserListRuleInfo( [ // The default rule_type for a UserListRuleInfo object is OR of ANDs // (disjunctive normal form). That is, rule items will be ANDed together // within rule item groups and the groups themselves will be ORed together. 'rule_item_groups' => [ $checkoutAndCartSizeRuleGroup, $checkoutDateRuleGroup ] ] ), // Optionally add a lookback window for this rule, in days. 'lookback_window_days' => 7 ] ) ], 'exclusive_operands' => [] ] );
Python
# Create a FlexibleRuleUserListInfo object, or a flexible rule # representation of visitors with one or multiple actions. # FlexibleRuleUserListInfo wraps UserListRuleInfo in a # FlexibleRuleOperandInfo object that represents which user lists to # include or exclude. flexible_rule_user_list_info: FlexibleRuleUserListInfo = ( rule_based_user_list_info.flexible_rule_user_list ) flexible_rule_user_list_info.inclusive_rule_operator = ( client.enums.UserListFlexibleRuleOperatorEnum.AND ) # The default rule_type for a UserListRuleInfo object is OR of # ANDs (disjunctive normal form). That is, rule items will be # ANDed together within rule item groups and the groups # themselves will be ORed together. rule_operand: FlexibleRuleOperandInfo = client.get_type( "FlexibleRuleOperandInfo" ) rule_operand.rule.rule_item_groups.extend( [ checkout_and_cart_size_rule_group, checkout_date_rule_group, ] ) rule_operand.lookback_window_days = 7 flexible_rule_user_list_info.inclusive_operands.append(rule_operand)
Ruby
r.flexible_rule_user_list = client.resource.flexible_rule_user_list_info do |frul| frul.inclusive_rule_operator = :AND frul.inclusive_operands << client.resource.flexible_rule_operand_info do |froi| froi.rule = client.resource.user_list_rule_info do |info| info.rule_item_groups += [checkout_date_rule_group, checkout_and_cart_size_rule_group] end # Optionally include a lookback window for this rule, in days. froi.lookback_window_days = 7 end end
Perl
my $flexible_rule_user_list_info = Google::Ads::GoogleAds::V25::Common::FlexibleRuleUserListInfo->new({ inclusiveRuleOperator => AND, inclusiveOperands => [ Google::Ads::GoogleAds::V25::Common::FlexibleRuleOperandInfo->new({ rule => Google::Ads::GoogleAds::V25::Common::UserListRuleInfo->new({ # The default rule_type for a UserListRuleInfo object is OR of # ANDs (disjunctive normal form). That is, rule items will be # ANDed together within rule item groups and the groups # themselves will be ORed together. ruleItemGroups => [ $checkout_date_rule_group, $checkout_and_cart_size_rule_group ]} ), # Optionally include a lookback window for this rule, in days. lookback_window_days => 7 }) ], exclusiveOperands => []});
curl
รวมผู้ใช้ที่ผ่านมาไว้ในรายการตามกฎ
นอกจากนี้ คุณยังรวมผู้เข้าชมเว็บไซต์หรือผู้ใช้แอปที่ผ่านมาไว้ในกลุ่มเป้าหมายตามกฎ (รองรับในเครือข่าย Display เท่านั้น) ได้ด้วยการตั้งค่าprepopulation_statusของกลุ่มเป้าหมายเป็นREQUESTED และตรวจสอบความคืบหน้าของกระบวนการสร้างกลุ่มเป้าหมายล่วงหน้าแบบไม่พร้อมกันโดยตรวจสอบสถานะของช่องนี้เป็นระยะๆ
การป้อนข้อมูลล่วงหน้าจะเพิ่มเฉพาะผู้ใช้ที่ผ่านมาในช่วง 30 วันที่ผ่านมา โดยขึ้นอยู่กับmembership_life_spanของรายการ (ตั้งแต่ 1 ถึง 540 วัน)
และวันที่เพิ่มแท็กรีมาร์เก็ตติ้ง สถานะจะอัปเดตเป็น
FINISHED เมื่อคำขอได้รับการประมวลผล หรือ
FAILED หากคำขอไม่สำเร็จ
กำหนดเป้าหมายรายการผู้ใช้และปรับราคาเสนอ
เมื่อสร้าง UserList แล้ว ให้แนบชื่อทรัพยากรของ กับ
AdGroupCriterion หรือ
CampaignCriterion แล้วตั้งค่า bid_modifier (เช่น
1.25 สำหรับการเพิ่มราคาเสนอ 25%) ดูตัวอย่างโค้ดที่แสดงวิธีกำหนดเป้าหมาย
กลุ่มเป้าหมายผู้ใช้และแก้ไขราคาเสนอได้ที่
กำหนดเป้าหมายกลุ่ม