リマーケティング キャンペーンでユーザーリストを使用すると、ウェブサイトやアプリで特定のアクションを行ったユーザーに再アプローチできます。Google Ads API は、いくつかのタイプのユーザーリストをサポートしています。このガイドでは、ルールアイテム グループを作成するで定義したルールアイテム グループを使用して、ルールベースのユーザーリストを作成する方法について説明します。
ルールベースのユーザーリスト
flexible_rule_user_list で作成されたルールベースのユーザーリストには、複数のルール(inclusive_rule と exclusive_rule、inclusive_rule_operator で結合)を含めることができます。各ルールは UserListRuleInfo メッセージで表され、商品アイテム グループ内のルールアイテムを結合する方法を指定する rule_type フィールドがあります。
UserListRuleTypeEnum では OR_OF_ANDS(分離句の通常の形式)と AND_OF_ORS(結合句の通常の形式)の両方が定義されていますが、OR_OF_ANDS は FlexibleRuleUserListInfo でサポートされている唯一の rule_type です(AND_OF_ORS を設定すると UserListError.RULE_TYPE_IS_NOT_SUPPORTED が返されます)。OR_OF_ANDS を使用すると、Google 広告はルールアイテム グループ内のすべてのルールアイテムを AND します。つまり、特定のルールでは、ルールが満たされるには、少なくとも 1 つのルールアイテム グループ内のすべてのルールアイテムが一致する必要があります。
ルール項目グループを作成するで 2 つの UserListRuleItemGroupInfo オブジェクトを定義したら、それらを組み合わせて新しいユーザーリストを作成します。次のコード例では、デフォルトの OR_OF_ANDS ルールタイプをそのまま残し、両方のルール項目グループを FlexibleRuleUserListInfo の FlexibleRuleOperandInfo に追加し、ユーザーリストを変更します。
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::V26::Common::FlexibleRuleUserListInfo->new({ inclusiveRuleOperator => AND, inclusiveOperands => [ Google::Ads::GoogleAds::V26::Common::FlexibleRuleOperandInfo->new({ rule => Google::Ads::GoogleAds::V26::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 => []});
curl
ルールベースのリストに過去のユーザーを含める
また、ユーザーリストの prepopulation_status を REQUESTED に設定することで、過去のウェブサイト訪問者またはアプリユーザーをルールベースのユーザーリスト(ディスプレイ ネットワークのみでサポート)に含めることもできます。このフィールドのステータスを定期的に確認することで、非同期の事前入力プロセスの進行状況をモニタリングできます。
事前入力では、リストの membership_life_span(1 ~ 540 日)とリマーケティング タグが追加された日付に応じて、過去 30 日間のユーザーのみが追加されます。リクエストが処理されると、ステータスが FINISHED に更新されます。リクエストが失敗した場合は、FAILED に更新されます。
ユーザーリストをターゲットに設定して入札単価を調整する
UserList を作成したら、そのリソース名を AdGroupCriterion または CampaignCriterion に追加し、bid_modifier を設定します(たとえば、入札単価を 25% 引き上げる場合は 1.25)。ユーザーリストをターゲットに設定して入札単価を変更する方法を示すコード例については、リストをターゲットに設定するをご覧ください。