สำหรับ expression_rule_user_list
มีความแตกต่างเพิ่มเติม โดยค่าเริ่มต้น Google Ads จะAND
รายการกฎทั้งหมดในกลุ่มรายการกฎรวมกัน ซึ่งหมายความว่ารายการกฎทุกรายการในกลุ่มรายการกฎอย่างน้อย 1 กลุ่ม
จะต้องตรงกัน เพื่อให้กฎเพิ่มผู้เข้าชมลงในรายการได้ ซึ่งเรียกว่า "รูปแบบปกติที่แยกออกจากกัน" หรือ OR_OF_ANDS
อีกวิธีหนึ่งคือ คุณสามารถสร้างรายการให้เพิ่มผู้เข้าชมลงในรายการเฉพาะเมื่อรายการกฎอย่างน้อย 1 รายการในกลุ่มรายการกฎแต่ละกลุ่มตรงกัน วิธีนี้เรียกว่า "conjunctive regular form" หรือ AND_OF_ORS
และพร้อมใช้งานสำหรับ expression_rule_user_list
โดยใช้ช่อง rule_type
การพยายามใช้ AND_OF_ORS
สำหรับ date_specific_rule_user_list
จะทำให้เกิดข้อผิดพลาด
ที่เหลือก็แค่รวมกลุ่มรายการกฎด้านบนเข้ากับรายชื่อผู้ใช้ใหม่ ในกรณีนี้ เราคงฟังก์ชัน OR_OF_ANDS
เริ่มต้นไว้ตามเดิม เนื่องจากเป็นสิ่งที่เราสร้างกฎเหล่านี้ขึ้นมา
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 = ( 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 = 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::V17::Common::FlexibleRuleUserListInfo->new({ inclusiveRuleOperator => AND, inclusiveOperands => [ Google::Ads::GoogleAds::V17::Common::FlexibleRuleOperandInfo->new({ rule => Google::Ads::GoogleAds::V17::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 => []});
จำกัดตามช่วงวันที่เข้าชมเว็บไซต์
expression_rule_user_list
ข้างต้นตรงตามความต้องการของคุณ แต่จะเกิดอะไรขึ้นหากคุณต้องการรวมเฉพาะผู้ใช้ที่เป็นไปตามกฎในรายการดังกล่าวและเข้าชมเว็บไซต์ระหว่างวันที่ 1 ตุลาคมถึง 31 ธันวาคม ใช้date_specific_rule_user_list
การสร้าง date_specific_rule_user_list
จะใช้กระบวนการเดียวกับที่คุณทำสำหรับ expression_rule_user_list
ตั้งค่าช่อง date_specific_rule_user_list
ด้วยออบเจ็กต์ DateSpecificRuleUserListInfo
แทนการตั้งค่าช่อง expression_rule_user_list
ของออบเจ็กต์ RuleBasedUserListInfo
ออบเจ็กต์นี้จะมีช่องสำหรับ start_date
และ end_date
DateSpecificRuleUserListInfo dateSpecificRuleUserListInfo =
DateSpecificRuleUserListInfo.newBuilder()
.setRule(
UserListRuleInfo.newBuilder()
.addAllRuleItemGroups(
ImmutableList.of(checkoutAndCartSizeRuleGroup, checkoutDateRuleGroup)))
.setStartDate(StringValue.of("2019-10-01"))
.setEndDate(StringValue.of("2019-12-31"))
.build();
รายการใหม่จะมีผู้ใช้ทั้งหมดที่มีคุณสมบัติเหมือนกับรายการก่อนหน้า แต่เฉพาะในกรณีที่ผู้ใช้เข้าชมเว็บไซต์ของคุณในระหว่าง start_date
(รวม) และ end_date
(รวมด้วย)
รวมผู้ใช้ที่ผ่านมาในรายการ
นอกจากนี้ คุณยังรวมผู้ใช้ในอดีตไว้ในรายชื่อผู้ใช้ตามกฎได้โดยการตั้งค่า prepopulation_status
ของรายชื่อผู้ใช้เป็น REQUESTED
และตรวจสอบความคืบหน้าของกระบวนการป้อนข้อมูลล่วงหน้าแบบไม่พร้อมกันโดยการตรวจสอบสถานะของช่องนี้เป็นระยะๆ
การดำเนินการนี้จะเพิ่มเฉพาะผู้ใช้ที่ผ่านมาภายในช่วง 30 วันที่ผ่านมาเท่านั้น โดยขึ้นอยู่กับระยะเวลาการเป็นสมาชิกของรายการและวันที่เพิ่มแท็กรีมาร์เก็ตติ้ง เมื่อดำเนินการตามคำขอแล้ว สถานะจะอัปเดตเป็น FINISHED
หรือ FAILED
หากคำขอไม่สำเร็จ