expression_rule_user_list
:
還需要進行額外區別變更者:
在預設情況下,Google Ads 會將規則項目中的所有規則項目AND
合併
群組。也就是說,「至少一個規則項目群組」中的每個規則項目
都必須相符,規則才會將訪客加入名單。這種訓練方式稱為
「禁制令正規形式」或 OR_OF_ANDS
。
此外,您也可以設定名單,只將訪客加進名單,
每個規則項目群組中至少有一個規則項目相符。這個
稱為「導數正規形式」
AND_OF_ORS
、
適用於 expression_rule_user_list
方法是使用
rule_type
欄位擷取 ID。想要
使用 AND_OF_ORS
做為
date_specific_rule_user_list
就會發生錯誤。
接下來只要把上方的規則項目群組合併成一個新使用者
請參考閱讀清單,進一步瞭解
如何選擇 Kubeflow Pipelines SDK 或 TFX在這個範例中,我們會保留預設的 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)
小茹
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
符合您的需求但要是
來吸引符合名單規則的使用者並造訪網站
?使用 date_specific_rule_user_list
。
建立 date_specific_rule_user_list
的程序與您遵循的流程相同
適用於 expression_rule_user_list
。您不需要設定
您的 expression_rule_user_list
欄位
RuleBasedUserListInfo
物件,那麼請將
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
要求失敗