คุณสามารถใช้รายชื่อผู้ใช้ในแคมเปญรีมาร์เก็ตติ้งเพื่อดึงดูดผู้ใช้ที่เคยดำเนินการบางอย่างในเว็บไซต์หรือแอปให้กลับมามีส่วนร่วมอีกครั้ง 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::V26::Common::FlexibleRuleUserListInfo->new({ inclusiveRuleOperator => AND, inclusiveOperands => [ Google::Ads::GoogleAds::V26::Common::FlexibleRuleOperandInfo->new({ rule => Google::Ads::GoogleAds::V26::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%) ดูตัวอย่างโค้ดที่แสดงวิธีกำหนดเป้าหมายรายการผู้ใช้และแก้ไขราคาเสนอได้ที่กำหนดเป้าหมายรายการ