إنشاء قائمة المستخدمين

في ما يخص expression_rule_user_list، هناك فرق إضافي يجب توضيحه. بشكل تلقائي، ستجمع "إعلانات Google" AND كل عناصر القاعدة في مجموعة عناصر قاعدة. وهذا يعني أنّه يجب أن يتطابق كل عنصر من عناصر القاعدة في مجموعة واحدة على الأقل من مجموعات عناصر القاعدة حتى تضيف القاعدة أحد الزوّار إلى القائمة. يُطلق على هذا الشكل اسم "الشكل العادي المنفصل" أو OR_OF_ANDS.

بدلاً من ذلك، يمكنك إعداد قائمتك بحيث لا تتم إضافة زائر إليها إلا إذا تطابق عنصر قاعدة واحد على الأقل في كل مجموعة من عناصر القواعد. يُطلق على ذلك اسم "الصيغة العادية الاقترانية" أو 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: 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::V21::Common::FlexibleRuleUserListInfo->new({
    inclusiveRuleOperator => AND,
    inclusiveOperands     => [
      Google::Ads::GoogleAds::V21::Common::FlexibleRuleOperandInfo->new({
          rule => Google::Ads::GoogleAds::V21::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 => []});
      

تضمين المستخدمين السابقين في القائمة

يمكنك أيضًا تضمين المستخدمين السابقين في قائمة مستخدمين مستندة إلى قواعد من خلال ضبط قيمة prepopulation_status لقائمة المستخدمين على REQUESTED، وتتبُّع تقدّم عملية التعبئة المسبقة غير المتزامنة من خلال التحقّق بشكل دوري من حالة هذا الحقل.

لن يؤدي ذلك إلا إلى إضافة المستخدمين السابقين من آخر 30 يومًا، وذلك حسب مدة العضوية في القائمة وتاريخ إضافة علامة تجديد النشاط التسويقي. سيتم تعديل الحالة إلى FINISHED بعد معالجة الطلب، أو إلى FAILED في حال تعذّر معالجة الطلب.