יצירת רשימת המשתמשים
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
במקרה של expression_rule_user_list
, צריך להבחין בין שני סוגים של תוספים. כברירת מחדל, מערכת Google Ads 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
אם הבקשה תיכשל.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-31 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-31 (שעון UTC)."],[[["\u003cp\u003eGoogle Ads uses "disjunctive normal form" (OR of ANDs) by default, requiring every rule item in at least one rule item group to match for a visitor to be added to the list.\u003c/p\u003e\n"],["\u003cp\u003eYou can configure the list to use "conjunctive normal form" (AND of ORs) where at least one rule item in each rule item group must match, but this is not applicable to date-specific rule user lists.\u003c/p\u003e\n"],["\u003cp\u003ePast users (within the last 30 days) can be included in the list by setting the \u003ccode\u003eprepopulation_status\u003c/code\u003e to \u003ccode\u003eREQUESTED\u003c/code\u003e and monitoring its progress.\u003c/p\u003e\n"]]],[],null,["# Creating the User List\n\nFor [`expression_rule_user_list`](/google-ads/api/reference/rpc/v21/RuleBasedUserListInfo#expression_rule_user_list),\nthere's an additional distinction to make. By\ndefault, Google Ads will `AND` together all rule items in a rule item\ngroup. This means that **every rule item** in **at least one rule item group**\nmust match in order for the rule to add a visitor to the list. This is called\n\"disjunctive normal form\", or [`OR_OF_ANDS`](/google-ads/api/reference/rpc/v21/UserListRuleTypeEnum.UserListRuleType#or_of_ands).\n\nAlternatively, you could set up your list to only add a visitor to the list if\n**at least one rule item** in **each rule item group** matches. This\nis called \"conjunctive normal form\", or\n[`AND_OF_ORS`](/google-ads/api/reference/rpc/v21/UserListRuleTypeEnum.UserListRuleType#and_of_ors),\nand is available for [`expression_rule_user_list`](/google-ads/api/reference/rpc/v21/RuleBasedUserListInfo#expression_rule_user_list)\nby using the\n[`rule_type`](/google-ads/api/reference/rpc/v21/UserListRuleInfo#rule_type) field. Trying to\nuse `AND_OF_ORS` for a\n[`date_specific_rule_user_list`](/google-ads/api/reference/rpc/v21/RuleBasedUserListInfo#date_specific_rule_user_list)\nwill result in an error.\n\nAll that's left is to combine the rule item groups above into a new user\nlist. In this case, we'll leave the default `OR_OF_ANDS` functionality in place,\nsince that's what we built these rules for.\n\n\n### Java\n\n```java\nFlexibleRuleUserListInfo flexibleRuleUserListInfo =\n FlexibleRuleUserListInfo.newBuilder()\n .setInclusiveRuleOperator(UserListFlexibleRuleOperator.AND)\n .addInclusiveOperands(\n FlexibleRuleOperandInfo.newBuilder()\n .setRule(\n // The default rule_type for a UserListRuleInfo object is OR of ANDs\n // (disjunctive normal form). That is, rule items will be ANDed together\n // within rule item groups and the groups themselves will be ORed together.\n UserListRuleInfo.newBuilder()\n .addRuleItemGroups(checkoutDateRuleGroup)\n .addRuleItemGroups(checkoutAndCartSizeRuleGroup))\n // Optional: includes a lookback window for this rule, in days.\n .setLookbackWindowDays(7L))\n .build();https://github.com/googleads/google-ads-java/blob/3c3c1041c2a0ab81553e3b2a79876256649397ed/google-ads-examples/src/main/java/com/google/ads/googleads/examples/remarketing/SetUpAdvancedRemarketing.java#L196-L210\n \n```\n\n### C#\n\n```c#\nFlexibleRuleUserListInfo flexibleRuleUserListInfo = new FlexibleRuleUserListInfo();\nFlexibleRuleOperandInfo flexibleRuleOperandInfo = new FlexibleRuleOperandInfo() {\n Rule = new UserListRuleInfo()\n};\nflexibleRuleOperandInfo.Rule.RuleItemGroups.Add(checkoutAndCartSizeRuleGroup);\nflexibleRuleOperandInfo.Rule.RuleItemGroups.Add(checkoutDateRuleGroup);\nflexibleRuleUserListInfo.InclusiveOperands.Add(flexibleRuleOperandInfo);https://github.com/googleads/google-ads-dotnet/blob/ada966e1983b655e82172b6c3e7d9b091b522377/Google.Ads.GoogleAds/examples/Remarketing/SetUpAdvancedRemarketing.cs#L179-L185\n \n```\n\n### PHP\n\n```php\n$flexibleRuleUserListInfo = new FlexibleRuleUserListInfo([\n 'inclusive_rule_operator' =\u003e UserListFlexibleRuleOperator::PBAND,\n 'inclusive_operands' =\u003e [\n new FlexibleRuleOperandInfo([\n 'rule' =\u003e new UserListRuleInfo([\n // The default rule_type for a UserListRuleInfo object is OR of ANDs\n // (disjunctive normal form). That is, rule items will be ANDed together\n // within rule item groups and the groups themselves will be ORed together.\n 'rule_item_groups' =\u003e [\n $checkoutAndCartSizeRuleGroup,\n $checkoutDateRuleGroup\n ]\n ]),\n // Optionally add a lookback window for this rule, in days.\n 'lookback_window_days' =\u003e 7\n ])\n ],\n 'exclusive_operands' =\u003e []\n]); \nhttps://github.com/googleads/google-ads-php/blob/be0249c30c27b4760387bec6682b82c9f4167761/examples/Remarketing/SetUpAdvancedRemarketing.php#L198-L216\n\n \n```\n\n### Python\n\n```python\n# Create a FlexibleRuleUserListInfo object, or a flexible rule\n# representation of visitors with one or multiple actions.\n# FlexibleRuleUserListInfo wraps UserListRuleInfo in a\n# FlexibleRuleOperandInfo object that represents which user lists to\n# include or exclude.\nflexible_rule_user_list_info: FlexibleRuleUserListInfo = (\n rule_based_user_list_info.flexible_rule_user_list\n)\nflexible_rule_user_list_info.inclusive_rule_operator = (\n client.enums.UserListFlexibleRuleOperatorEnum.AND\n)\n# The default rule_type for a UserListRuleInfo object is OR of\n# ANDs (disjunctive normal form). That is, rule items will be\n# ANDed together within rule item groups and the groups\n# themselves will be ORed together.\nrule_operand: FlexibleRuleOperandInfo = client.get_type(\n \"FlexibleRuleOperandInfo\"\n)\nrule_operand.rule.rule_item_groups.extend(\n [\n checkout_and_cart_size_rule_group,\n checkout_date_rule_group,\n ]\n)\nrule_operand.lookback_window_days = 7\nflexible_rule_user_list_info.inclusive_operands.append(rule_operand)https://github.com/googleads/google-ads-python/blob/d0595698b8a7de6cc00684b467462601037c9db9/examples/remarketing/set_up_advanced_remarketing.py#L191-L216\n \n```\n\n### Ruby\n\n```ruby\nr.flexible_rule_user_list = client.resource.flexible_rule_user_list_info do |frul|\n frul.inclusive_rule_operator = :AND\n frul.inclusive_operands \u003c\u003c client.resource.flexible_rule_operand_info do |froi|\n froi.rule = client.resource.user_list_rule_info do |info|\n info.rule_item_groups += [checkout_date_rule_group, checkout_and_cart_size_rule_group]\n end\n # Optionally include a lookback window for this rule, in days.\n froi.lookback_window_days = 7\n end\nend \nhttps://github.com/googleads/google-ads-ruby/blob/2752563c7ffd15a4d2238116869f64aea3011cc3/examples/remarketing/set_up_advanced_remarketing.rb#L126-L135\n\n \n```\n\n### Perl\n\n```perl\nmy $flexible_rule_user_list_info =\n Google::Ads::GoogleAds::V21::Common::FlexibleRuleUserListInfo-\u003enew({\n inclusiveRuleOperator =\u003e AND,\n inclusiveOperands =\u003e [\n Google::Ads::GoogleAds::V21::Common::FlexibleRuleOperandInfo-\u003enew({\n rule =\u003e Google::Ads::GoogleAds::V21::Common::UserListRuleInfo-\u003enew({\n # The default rule_type for a UserListRuleInfo object is OR of\n # ANDs (disjunctive normal form). That is, rule items will be\n # ANDed together within rule item groups and the groups\n # themselves will be ORed together.\n ruleItemGroups =\u003e [\n $checkout_date_rule_group, $checkout_and_cart_size_rule_group\n ]}\n ),\n # Optionally include a lookback window for this rule, in days.\n lookback_window_days =\u003e 7\n })\n ],\n exclusiveOperands =\u003e []});https://github.com/googleads/google-ads-perl/blob/9abffd69cd856633dfdcee5c636fe9cd0eb4b5ed/examples/remarketing/set_up_advanced_remarketing.pl#L151-L169\n \n```\n\n\u003cbr /\u003e\n\nInclude past users in the list\n------------------------------\n\nYou can also include past users in a rule-based user list by setting the\n[`prepopulation_status`](/google-ads/api/reference/rpc/v21/RuleBasedUserListInfo#prepopulation_status)\nof the user list to\n[`REQUESTED`](/google-ads/api/reference/rpc/v21/UserListPrepopulationStatusEnum.UserListPrepopulationStatus#requested),\nand monitor the progress of the asynchronous prepopulation process by\nperiodically checking the status of this field.\n\nThis will only add past users from within the last 30 days, depending on the\nlist's membership duration and the date when the remarketing tag is added. The\nstatus will be updated to\n[`FINISHED`](/google-ads/api/reference/rpc/v21/UserListPrepopulationStatusEnum.UserListPrepopulationStatus#finished)\nonce the request is processed, or\n[`FAILED`](/google-ads/api/reference/rpc/v21/UserListPrepopulationStatusEnum.UserListPrepopulationStatus#failed)\nif the request fails."]]