• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.ads.googleads.v14.common;
18
19import "google/ads/googleads/v14/enums/customer_match_upload_key_type.proto";
20import "google/ads/googleads/v14/enums/user_list_crm_data_source_type.proto";
21import "google/ads/googleads/v14/enums/user_list_date_rule_item_operator.proto";
22import "google/ads/googleads/v14/enums/user_list_flexible_rule_operator.proto";
23import "google/ads/googleads/v14/enums/user_list_logical_rule_operator.proto";
24import "google/ads/googleads/v14/enums/user_list_number_rule_item_operator.proto";
25import "google/ads/googleads/v14/enums/user_list_prepopulation_status.proto";
26import "google/ads/googleads/v14/enums/user_list_rule_type.proto";
27import "google/ads/googleads/v14/enums/user_list_string_rule_item_operator.proto";
28
29option csharp_namespace = "Google.Ads.GoogleAds.V14.Common";
30option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/common;common";
31option java_multiple_files = true;
32option java_outer_classname = "UserListsProto";
33option java_package = "com.google.ads.googleads.v14.common";
34option objc_class_prefix = "GAA";
35option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Common";
36option ruby_package = "Google::Ads::GoogleAds::V14::Common";
37
38// Proto file describing user list types.
39
40// SimilarUserList is a list of users which are similar to users from another
41// UserList. These lists are read-only and automatically created by Google.
42message SimilarUserListInfo {
43  // Seed UserList from which this list is derived.
44  optional string seed_user_list = 2;
45}
46
47// UserList of CRM users provided by the advertiser.
48message CrmBasedUserListInfo {
49  // A string that uniquely identifies a mobile application from which the data
50  // was collected.
51  // For iOS, the ID string is the 9 digit string that appears at the end of an
52  // App Store URL (for example, "476943146" for "Flood-It! 2" whose App Store
53  // link is http://itunes.apple.com/us/app/flood-it!-2/id476943146). For
54  // Android, the ID string is the application's package name (for example,
55  // "com.labpixies.colordrips" for "Color Drips" given Google Play link
56  // https://play.google.com/store/apps/details?id=com.labpixies.colordrips).
57  // Required when creating CrmBasedUserList for uploading mobile advertising
58  // IDs.
59  optional string app_id = 4;
60
61  // Matching key type of the list.
62  // Mixed data types are not allowed on the same list.
63  // This field is required for an ADD operation.
64  google.ads.googleads.v14.enums.CustomerMatchUploadKeyTypeEnum
65      .CustomerMatchUploadKeyType upload_key_type = 2;
66
67  // Data source of the list. Default value is FIRST_PARTY.
68  // Only customers on the allow-list can create third-party sourced CRM lists.
69  google.ads.googleads.v14.enums.UserListCrmDataSourceTypeEnum
70      .UserListCrmDataSourceType data_source_type = 3;
71}
72
73// A client defined rule based on custom parameters sent by web sites or
74// uploaded by the advertiser.
75message UserListRuleInfo {
76  // Rule type is used to determine how to group rule items.
77  //
78  // The default is OR of ANDs (disjunctive normal form).
79  // That is, rule items will be ANDed together within rule item groups and the
80  // groups themselves will be ORed together.
81  //
82  // OR of ANDs is the only supported type for FlexibleRuleUserList.
83  google.ads.googleads.v14.enums.UserListRuleTypeEnum.UserListRuleType
84      rule_type = 1;
85
86  // List of rule item groups that defines this rule.
87  // Rule item groups are grouped together based on rule_type.
88  repeated UserListRuleItemGroupInfo rule_item_groups = 2;
89}
90
91// A group of rule items.
92message UserListRuleItemGroupInfo {
93  // Rule items that will be grouped together based on rule_type.
94  repeated UserListRuleItemInfo rule_items = 1;
95}
96
97// An atomic rule item.
98message UserListRuleItemInfo {
99  // Rule variable name. It should match the corresponding key name fired
100  // by the pixel.
101  // A name must begin with US-ascii letters or underscore or UTF8 code that is
102  // greater than 127 and consist of US-ascii letters or digits or underscore or
103  // UTF8 code that is greater than 127.
104  // For websites, there are two built-in variable URL (name = 'url__') and
105  // referrer URL (name = 'ref_url__').
106  // This field must be populated when creating a new rule item.
107  optional string name = 5;
108
109  // An atomic rule item.
110  oneof rule_item {
111    // An atomic rule item composed of a number operation.
112    UserListNumberRuleItemInfo number_rule_item = 2;
113
114    // An atomic rule item composed of a string operation.
115    UserListStringRuleItemInfo string_rule_item = 3;
116
117    // An atomic rule item composed of a date operation.
118    UserListDateRuleItemInfo date_rule_item = 4;
119  }
120}
121
122// A rule item composed of a date operation.
123message UserListDateRuleItemInfo {
124  // Date comparison operator.
125  // This field is required and must be populated when creating new date
126  // rule item.
127  google.ads.googleads.v14.enums.UserListDateRuleItemOperatorEnum
128      .UserListDateRuleItemOperator
129      operator = 1;
130
131  // String representing date value to be compared with the rule variable.
132  // Supported date format is YYYY-MM-DD.
133  // Times are reported in the customer's time zone.
134  optional string value = 4;
135
136  // The relative date value of the right hand side denoted by number of days
137  // offset from now. The value field will override this field when both are
138  // present.
139  optional int64 offset_in_days = 5;
140}
141
142// A rule item composed of a number operation.
143message UserListNumberRuleItemInfo {
144  // Number comparison operator.
145  // This field is required and must be populated when creating a new number
146  // rule item.
147  google.ads.googleads.v14.enums.UserListNumberRuleItemOperatorEnum
148      .UserListNumberRuleItemOperator
149      operator = 1;
150
151  // Number value to be compared with the variable.
152  // This field is required and must be populated when creating a new number
153  // rule item.
154  optional double value = 3;
155}
156
157// A rule item composed of a string operation.
158message UserListStringRuleItemInfo {
159  // String comparison operator.
160  // This field is required and must be populated when creating a new string
161  // rule item.
162  google.ads.googleads.v14.enums.UserListStringRuleItemOperatorEnum
163      .UserListStringRuleItemOperator
164      operator = 1;
165
166  // The right hand side of the string rule item. For URLs or referrer URLs,
167  // the value can not contain illegal URL chars such as newlines, quotes,
168  // tabs, or parentheses. This field is required and must be populated when
169  // creating a new string rule item.
170  optional string value = 3;
171}
172
173// Flexible rule that wraps the common rule and a lookback window.
174message FlexibleRuleOperandInfo {
175  // List of rule item groups that defines this rule.
176  // Rule item groups are grouped together.
177  UserListRuleInfo rule = 1;
178
179  // Lookback window for this rule in days. From now until X days ago.
180  optional int64 lookback_window_days = 2;
181}
182
183// Flexible rule representation of visitors with one or multiple actions. The
184// flexible user list is defined by two lists of operands – inclusive_operands
185// and exclusive_operands; each operand represents a set of users based on
186// actions they took in a given timeframe. These lists of operands are combined
187// with the AND_NOT operator, so that users represented by the inclusive
188// operands are included in the user list, minus the users represented by the
189// exclusive operands.
190message FlexibleRuleUserListInfo {
191  // Operator that defines how the inclusive operands are combined.
192  google.ads.googleads.v14.enums.UserListFlexibleRuleOperatorEnum
193      .UserListFlexibleRuleOperator inclusive_rule_operator = 1;
194
195  // Rules representing users that should be included in the user list. These
196  // are located on the left side of the AND_NOT operator, and joined together
197  // by either AND/OR as specified by the inclusive_rule_operator.
198  repeated FlexibleRuleOperandInfo inclusive_operands = 2;
199
200  // Rules representing users that should be excluded from the user list. These
201  // are located on the right side of the AND_NOT operator, and joined together
202  // by OR.
203  repeated FlexibleRuleOperandInfo exclusive_operands = 3;
204}
205
206// Representation of a userlist that is generated by a rule.
207message RuleBasedUserListInfo {
208  // The status of pre-population. The field is default to NONE if not set which
209  // means the previous users will not be considered. If set to REQUESTED, past
210  // site visitors or app users who match the list definition will be included
211  // in the list (works on the Display Network only). This will only
212  // add past users from within the last 30 days, depending on the
213  // list's membership duration and the date when the remarketing tag is added.
214  // The status will be updated to FINISHED once request is processed, or FAILED
215  // if the request fails.
216  google.ads.googleads.v14.enums.UserListPrepopulationStatusEnum
217      .UserListPrepopulationStatus prepopulation_status = 1;
218
219  // Flexible rule representation of visitors with one or multiple actions. The
220  // flexible user list is defined by two lists of operands – inclusive_operands
221  // and exclusive_operands; each operand represents a set of users based on
222  // actions they took in a given timeframe. These lists of operands are
223  // combined with the AND_NOT operator, so that users represented by the
224  // inclusive operands are included in the user list, minus the users
225  // represented by the exclusive operands.
226  FlexibleRuleUserListInfo flexible_rule_user_list = 5;
227}
228
229// Represents a user list that is a custom combination of user lists.
230message LogicalUserListInfo {
231  // Logical list rules that define this user list. The rules are defined as a
232  // logical operator (ALL/ANY/NONE) and a list of user lists. All the rules are
233  // ANDed when they are evaluated.
234  //
235  // Required for creating a logical user list.
236  repeated UserListLogicalRuleInfo rules = 1;
237}
238
239// A user list logical rule. A rule has a logical operator (and/or/not) and a
240// list of user lists as operands.
241message UserListLogicalRuleInfo {
242  // The logical operator of the rule.
243  google.ads.googleads.v14.enums.UserListLogicalRuleOperatorEnum
244      .UserListLogicalRuleOperator
245      operator = 1;
246
247  // The list of operands of the rule.
248  repeated LogicalUserListOperandInfo rule_operands = 2;
249}
250
251// Operand of logical user list that consists of a user list.
252message LogicalUserListOperandInfo {
253  // Resource name of a user list as an operand.
254  optional string user_list = 2;
255}
256
257// User list targeting as a collection of conversions or remarketing actions.
258message BasicUserListInfo {
259  // Actions associated with this user list.
260  repeated UserListActionInfo actions = 1;
261}
262
263// Represents an action type used for building remarketing user lists.
264message UserListActionInfo {
265  // Subtypes of user list action.
266  oneof user_list_action {
267    // A conversion action that's not generated from remarketing.
268    string conversion_action = 3;
269
270    // A remarketing action.
271    string remarketing_action = 4;
272  }
273}
274