उपयोगकर्ता सूची बनाना

expression_rule_user_list के मामले में, ध्यान देने की ज़रूरत है. डिफ़ॉल्ट रूप से, Google Ads एक नियम आइटम समूह के सभी नियम आइटम को एक साथ AND करेगा. इसका मतलब है कि कम से कम एक नियम वाले आइटम ग्रुप में मौजूद हर नियम आइटम का मैच होना ज़रूरी है, ताकि नियम सूची में वेबसाइट पर आने वाले व्यक्ति को जोड़ सके. इसे "डिसजंक्टिव नॉर्मल फ़ॉर्म" या OR_OF_ANDS कहा जाता है.

इसके अलावा, किसी विज़िटर को सूची में सिर्फ़ तब जोड़ा जा सकता है, जब हर नियम के आइटम ग्रुप में कम से कम एक नियम वाला आइटम मेल खाता हो. इसे "कंजक्टिव नॉर्मल फ़ॉर्म" या AND_OF_ORS कहा जाता है. यह expression_rule_user_list के लिए, rule_type फ़ील्ड का इस्तेमाल करके उपलब्ध होता है. date_specific_rule_user_list के लिए AND_OF_ORS का इस्तेमाल करने की कोशिश करने पर गड़बड़ी हो सकती है.

बस ऊपर दिए गए नियम आइटम समूहों को एक नई उपयोगकर्ता सूची में जोड़ना है. इस मामले में, हम 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 के लिए की जाती है. अपने RuleBasedUserListInfo ऑब्जेक्ट के expression_rule_user_list फ़ील्ड को सेट करने के बजाय, date_specific_rule_user_list फ़ील्ड को DateSpecificRuleUserListInfo ऑब्जेक्ट के साथ सेट करें. इस ऑब्जेक्ट में 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 कर दिया जाएगा.