@pipedream/google_ads 0.7.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/actions/add-contact-to-list-by-email/add-contact-to-list-by-email.mjs +1 -1
- package/actions/common/bidding.mjs +196 -0
- package/actions/common/conversion-upload.mjs +131 -0
- package/actions/common/props.mjs +1 -1
- package/actions/create-ad-group-report/create-ad-group-report.mjs +2 -2
- package/actions/create-ad-report/create-ad-report.mjs +2 -2
- package/actions/create-campaign-report/create-campaign-report.mjs +2 -2
- package/actions/create-customer-list/common-constants.mjs +10 -10
- package/actions/create-customer-list/create-customer-list.mjs +3 -3
- package/actions/create-customer-report/create-customer-report.mjs +2 -2
- package/actions/create-or-remove-campaign-criteria/create-or-remove-campaign-criteria.mjs +214 -0
- package/actions/create-or-remove-campaign-shared-set/create-or-remove-campaign-shared-set.mjs +155 -0
- package/actions/create-or-remove-shared-criteria/create-or-remove-shared-criteria.mjs +180 -0
- package/actions/create-or-update-ad-group/create-or-update-ad-group.mjs +315 -0
- package/actions/create-or-update-ad-group-ad/create-or-update-ad-group-ad.mjs +203 -0
- package/actions/create-or-update-bidding-strategy/create-or-update-bidding-strategy.mjs +185 -0
- package/actions/create-or-update-campaign/create-or-update-campaign.mjs +300 -0
- package/actions/create-or-update-campaign-budget/create-or-update-campaign-budget.mjs +212 -0
- package/actions/create-or-update-keywords/create-or-update-keywords.mjs +275 -0
- package/actions/create-or-update-shared-sets/create-or-update-shared-sets.mjs +180 -0
- package/actions/create-report/create-report.mjs +5 -7
- package/actions/create-responsive-search-ad/create-responsive-search-ad.mjs +202 -0
- package/actions/generate-keyword-ideas/generate-keyword-ideas.mjs +3 -3
- package/actions/get-keyword-quality-scores/get-keyword-quality-scores.mjs +107 -0
- package/actions/list-account-id-options/list-account-id-options.mjs +1 -1
- package/actions/list-ad-group-ads/list-ad-group-ads.mjs +55 -0
- package/actions/list-ad-group-criteria/list-ad-group-criteria.mjs +55 -0
- package/actions/list-ad-groups/list-ad-groups.mjs +55 -0
- package/actions/list-bidding-strategies/list-bidding-strategies.mjs +55 -0
- package/actions/list-campaign-budgets/list-campaign-budgets.mjs +55 -0
- package/actions/list-campaign-criteria/list-campaign-criteria.mjs +55 -0
- package/actions/list-campaign-shared-sets/list-campaign-shared-sets.mjs +55 -0
- package/actions/list-campaigns/list-campaigns.mjs +55 -0
- package/actions/list-customer-clients/list-customer-clients.mjs +2 -2
- package/actions/list-keywords/list-keywords.mjs +55 -0
- package/actions/list-shared-criteria/list-shared-criteria.mjs +55 -0
- package/actions/list-shared-sets/list-shared-sets.mjs +55 -0
- package/actions/send-offline-conversion/send-offline-conversion.mjs +4 -4
- package/actions/update-campaign-ai-max-settings/update-campaign-ai-max-settings.mjs +167 -0
- package/actions/upload-call-conversion/upload-call-conversion.mjs +65 -0
- package/actions/upload-click-conversion/upload-click-conversion.mjs +121 -0
- package/common/common-report.mjs +5 -7
- package/common/constants.mjs +369 -0
- package/common/queries.mjs +4 -2
- package/common/resources/ad.mjs +25 -70
- package/common/resources/adGroup.mjs +2 -3
- package/common/resources/campaign.mjs +7 -10
- package/common/resources/customer.mjs +3 -4
- package/common/utils.mjs +4 -0
- package/google_ads.app.mjs +657 -19
- package/package.json +1 -1
- package/sources/new-campaign-created/new-campaign-created.mjs +3 -3
- package/sources/new-lead-form-entry/new-lead-form-entry.mjs +3 -3
package/common/constants.mjs
CHANGED
|
@@ -1,3 +1,372 @@
|
|
|
1
|
+
export const API_VERSION = "v25";
|
|
2
|
+
|
|
3
|
+
// Conversion payload fields the upload actions set and validate themselves. Includes the
|
|
4
|
+
// click and call identifiers: injecting those here would bypass the exactly-one-identifier
|
|
5
|
+
// check, which runs against the props before the payload is assembled.
|
|
6
|
+
export const RESERVED_CONVERSION_FIELDS = [
|
|
7
|
+
"callStartDateTime",
|
|
8
|
+
"callerId",
|
|
9
|
+
"conversionAction",
|
|
10
|
+
"conversionDateTime",
|
|
11
|
+
"conversionEnvironment",
|
|
12
|
+
"conversionValue",
|
|
13
|
+
"currencyCode",
|
|
14
|
+
"gbraid",
|
|
15
|
+
"gclid",
|
|
16
|
+
"orderId",
|
|
17
|
+
"wbraid",
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
export const SHARED_SET_TYPES = [
|
|
21
|
+
{
|
|
22
|
+
label: "Negative Keywords",
|
|
23
|
+
value: "NEGATIVE_KEYWORDS",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: "Negative Placements",
|
|
27
|
+
value: "NEGATIVE_PLACEMENTS",
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
export const CREATE_REMOVE_OPERATION_TYPES = [
|
|
32
|
+
{
|
|
33
|
+
label: "Create",
|
|
34
|
+
value: "create",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: "Remove",
|
|
38
|
+
value: "remove",
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
export const CAMPAIGN_OPERATION_TYPES = [
|
|
43
|
+
{
|
|
44
|
+
label: "Create",
|
|
45
|
+
value: "create",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: "Update",
|
|
49
|
+
value: "update",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: "Remove",
|
|
53
|
+
value: "remove",
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
export const CAMPAIGN_STATUSES = [
|
|
58
|
+
"ENABLED",
|
|
59
|
+
"PAUSED",
|
|
60
|
+
"REMOVED",
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
export const ADVERTISING_CHANNEL_TYPES = [
|
|
64
|
+
{
|
|
65
|
+
label: "Search",
|
|
66
|
+
value: "SEARCH",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: "Display",
|
|
70
|
+
value: "DISPLAY",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: "Shopping",
|
|
74
|
+
value: "SHOPPING",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: "Hotel",
|
|
78
|
+
value: "HOTEL",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: "Video",
|
|
82
|
+
value: "VIDEO",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: "Multi-Channel (App)",
|
|
86
|
+
value: "MULTI_CHANNEL",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: "Local",
|
|
90
|
+
value: "LOCAL",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: "Smart",
|
|
94
|
+
value: "SMART",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: "Performance Max",
|
|
98
|
+
value: "PERFORMANCE_MAX",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: "Local Services",
|
|
102
|
+
value: "LOCAL_SERVICES",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
label: "Travel",
|
|
106
|
+
value: "TRAVEL",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
label: "Demand Gen",
|
|
110
|
+
value: "DEMAND_GEN",
|
|
111
|
+
},
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
export const KEYWORD_MATCH_TYPES = [
|
|
115
|
+
{
|
|
116
|
+
label: "Exact",
|
|
117
|
+
value: "EXACT",
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: "Phrase",
|
|
121
|
+
value: "PHRASE",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: "Broad",
|
|
125
|
+
value: "BROAD",
|
|
126
|
+
},
|
|
127
|
+
];
|
|
128
|
+
|
|
129
|
+
export const AD_GROUP_STATUSES = [
|
|
130
|
+
"ENABLED",
|
|
131
|
+
"PAUSED",
|
|
132
|
+
"REMOVED",
|
|
133
|
+
];
|
|
134
|
+
|
|
135
|
+
export const AD_GROUP_TYPES = [
|
|
136
|
+
{
|
|
137
|
+
label: "Search Standard",
|
|
138
|
+
value: "SEARCH_STANDARD",
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
label: "Display Standard",
|
|
142
|
+
value: "DISPLAY_STANDARD",
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
label: "Shopping Product Ads",
|
|
146
|
+
value: "SHOPPING_PRODUCT_ADS",
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
label: "Hotel Ads",
|
|
150
|
+
value: "HOTEL_ADS",
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
label: "Shopping Smart Ads",
|
|
154
|
+
value: "SHOPPING_SMART_ADS",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
label: "Video Bumper",
|
|
158
|
+
value: "VIDEO_BUMPER",
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
label: "Video TrueView In-Stream",
|
|
162
|
+
value: "VIDEO_TRUE_VIEW_IN_STREAM",
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
label: "Video TrueView In-Display",
|
|
166
|
+
value: "VIDEO_TRUE_VIEW_IN_DISPLAY",
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
label: "Video Non-Skippable In-Stream",
|
|
170
|
+
value: "VIDEO_NON_SKIPPABLE_IN_STREAM",
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
label: "Search Dynamic Ads",
|
|
174
|
+
value: "SEARCH_DYNAMIC_ADS",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
label: "Shopping Comparison Listing Ads",
|
|
178
|
+
value: "SHOPPING_COMPARISON_LISTING_ADS",
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
label: "Promoted Hotel Ads",
|
|
182
|
+
value: "PROMOTED_HOTEL_ADS",
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
label: "Video Responsive",
|
|
186
|
+
value: "VIDEO_RESPONSIVE",
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: "Video Efficient Reach",
|
|
190
|
+
value: "VIDEO_EFFICIENT_REACH",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
label: "Smart Campaign Ads",
|
|
194
|
+
value: "SMART_CAMPAIGN_ADS",
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
label: "Travel Ads",
|
|
198
|
+
value: "TRAVEL_ADS",
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
label: "YouTube Audio",
|
|
202
|
+
value: "YOUTUBE_AUDIO",
|
|
203
|
+
},
|
|
204
|
+
];
|
|
205
|
+
|
|
206
|
+
export const AD_ROTATION_MODES = [
|
|
207
|
+
{
|
|
208
|
+
label: "Optimize",
|
|
209
|
+
value: "OPTIMIZE",
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
label: "Rotate Forever",
|
|
213
|
+
value: "ROTATE_FOREVER",
|
|
214
|
+
},
|
|
215
|
+
];
|
|
216
|
+
|
|
217
|
+
export const BUDGET_DELIVERY_METHODS = [
|
|
218
|
+
{
|
|
219
|
+
label: "Standard",
|
|
220
|
+
value: "STANDARD",
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
label: "Accelerated",
|
|
224
|
+
value: "ACCELERATED",
|
|
225
|
+
},
|
|
226
|
+
];
|
|
227
|
+
|
|
228
|
+
export const BUDGET_PERIODS = [
|
|
229
|
+
{
|
|
230
|
+
label: "Daily",
|
|
231
|
+
value: "DAILY",
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
label: "Custom Period",
|
|
235
|
+
value: "CUSTOM_PERIOD",
|
|
236
|
+
},
|
|
237
|
+
];
|
|
238
|
+
|
|
239
|
+
export const ASSET_AUTOMATION_STATUSES = [
|
|
240
|
+
{
|
|
241
|
+
label: "Opted In",
|
|
242
|
+
value: "OPTED_IN",
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
label: "Opted Out",
|
|
246
|
+
value: "OPTED_OUT",
|
|
247
|
+
},
|
|
248
|
+
];
|
|
249
|
+
|
|
250
|
+
// `PERCENT_CPC` is deliberately absent: v25 exposes no `bidding_strategy.percent_cpc`
|
|
251
|
+
// scheme, so a portfolio strategy cannot be created with that type.
|
|
252
|
+
export const PORTFOLIO_BIDDING_STRATEGY_TYPES = [
|
|
253
|
+
{
|
|
254
|
+
label: "Target CPA",
|
|
255
|
+
value: "TARGET_CPA",
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
label: "Target ROAS",
|
|
259
|
+
value: "TARGET_ROAS",
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
label: "Target Spend",
|
|
263
|
+
value: "TARGET_SPEND",
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
label: "Maximize Conversions",
|
|
267
|
+
value: "MAXIMIZE_CONVERSIONS",
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
label: "Maximize Conversion Value",
|
|
271
|
+
value: "MAXIMIZE_CONVERSION_VALUE",
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
label: "Target Impression Share",
|
|
275
|
+
value: "TARGET_IMPRESSION_SHARE",
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
label: "Enhanced CPC",
|
|
279
|
+
value: "ENHANCED_CPC",
|
|
280
|
+
},
|
|
281
|
+
];
|
|
282
|
+
|
|
283
|
+
export const CAMPAIGN_BIDDING_STRATEGY_TYPES = [
|
|
284
|
+
{
|
|
285
|
+
label: "Manual CPC",
|
|
286
|
+
value: "MANUAL_CPC",
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
label: "Manual CPM",
|
|
290
|
+
value: "MANUAL_CPM",
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
label: "Target CPA",
|
|
294
|
+
value: "TARGET_CPA",
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
label: "Target ROAS",
|
|
298
|
+
value: "TARGET_ROAS",
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
label: "Target Spend",
|
|
302
|
+
value: "TARGET_SPEND",
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
label: "Maximize Conversions",
|
|
306
|
+
value: "MAXIMIZE_CONVERSIONS",
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
label: "Maximize Conversion Value",
|
|
310
|
+
value: "MAXIMIZE_CONVERSION_VALUE",
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
label: "Target Impression Share",
|
|
314
|
+
value: "TARGET_IMPRESSION_SHARE",
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
label: "Percent CPC",
|
|
318
|
+
value: "PERCENT_CPC",
|
|
319
|
+
},
|
|
320
|
+
];
|
|
321
|
+
|
|
322
|
+
export const TARGET_IMPRESSION_SHARE_LOCATIONS = [
|
|
323
|
+
{
|
|
324
|
+
label: "Anywhere on page",
|
|
325
|
+
value: "ANYWHERE_ON_PAGE",
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
label: "Top of page",
|
|
329
|
+
value: "TOP_OF_PAGE",
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
label: "Absolute top of page",
|
|
333
|
+
value: "ABSOLUTE_TOP_OF_PAGE",
|
|
334
|
+
},
|
|
335
|
+
];
|
|
336
|
+
|
|
337
|
+
export const UPLOAD_CONVERSION_TYPES = [
|
|
338
|
+
{
|
|
339
|
+
label: "Click conversion (attributed to an ad click via GCLID)",
|
|
340
|
+
value: "CLICK",
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
label: "Call conversion (attributed to a phone call)",
|
|
344
|
+
value: "CALL",
|
|
345
|
+
},
|
|
346
|
+
];
|
|
347
|
+
|
|
348
|
+
export const CONVERSION_ENVIRONMENTS = [
|
|
349
|
+
{
|
|
350
|
+
label: "Web",
|
|
351
|
+
value: "WEB",
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
label: "App",
|
|
355
|
+
value: "APP",
|
|
356
|
+
},
|
|
357
|
+
];
|
|
358
|
+
|
|
359
|
+
export const EU_POLITICAL_ADVERTISING_STATUSES = [
|
|
360
|
+
{
|
|
361
|
+
label: "Does not contain EU political advertising",
|
|
362
|
+
value: "DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING",
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
label: "Contains EU political advertising",
|
|
366
|
+
value: "CONTAINS_EU_POLITICAL_ADVERTISING",
|
|
367
|
+
},
|
|
368
|
+
];
|
|
369
|
+
|
|
1
370
|
export const CORE_DATE_SEGMENTS = [
|
|
2
371
|
"segments.date",
|
|
3
372
|
"segments.week",
|
package/common/queries.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { sanitizeGaqlString } from "./utils.mjs";
|
|
2
|
+
|
|
1
3
|
function listCustomerClients(query) {
|
|
2
4
|
const fields = [
|
|
3
5
|
"client_customer",
|
|
@@ -10,7 +12,7 @@ function listCustomerClients(query) {
|
|
|
10
12
|
.join(", ");
|
|
11
13
|
|
|
12
14
|
const condition = query
|
|
13
|
-
? `customer_client.descriptive_name LIKE '%${query}%'`
|
|
15
|
+
? `customer_client.descriptive_name LIKE '%${sanitizeGaqlString(query)}%'`
|
|
14
16
|
: "customer_client.level <= 3";
|
|
15
17
|
|
|
16
18
|
return `SELECT ${fields} FROM customer_client WHERE ${condition}`;
|
|
@@ -105,7 +107,7 @@ function listResources(resource, query) {
|
|
|
105
107
|
|
|
106
108
|
let result = `SELECT ${fieldResource}.id, ${fieldResource}.${name} FROM ${resource}`;
|
|
107
109
|
if (query) {
|
|
108
|
-
result += ` WHERE ${fieldResource}.${name} LIKE '%${query}%'`;
|
|
110
|
+
result += ` WHERE ${fieldResource}.${name} LIKE '%${sanitizeGaqlString(query)}%'`;
|
|
109
111
|
}
|
|
110
112
|
return result;
|
|
111
113
|
}
|
package/common/resources/ad.mjs
CHANGED
|
@@ -6,84 +6,50 @@ const fields = [
|
|
|
6
6
|
"ad.app_ad.descriptions",
|
|
7
7
|
"ad.app_ad.headlines",
|
|
8
8
|
"ad.app_ad.html5_media_bundles",
|
|
9
|
-
"ad.app_ad.html5_media_bundles.asset",
|
|
10
9
|
"ad.app_ad.images",
|
|
11
|
-
"ad.app_ad.images.asset",
|
|
12
10
|
"ad.app_ad.mandatory_ad_text",
|
|
13
11
|
"ad.app_ad.youtube_videos",
|
|
14
|
-
"ad.app_ad.youtube_videos.asset",
|
|
15
12
|
"ad.app_engagement_ad.descriptions",
|
|
16
13
|
"ad.app_engagement_ad.headlines",
|
|
17
14
|
"ad.app_engagement_ad.images",
|
|
18
|
-
"ad.app_engagement_ad.images.asset",
|
|
19
15
|
"ad.app_engagement_ad.videos",
|
|
20
|
-
"ad.app_engagement_ad.videos.asset",
|
|
21
16
|
"ad.app_pre_registration_ad.descriptions",
|
|
22
17
|
"ad.app_pre_registration_ad.headlines",
|
|
23
18
|
"ad.app_pre_registration_ad.images",
|
|
24
|
-
"ad.app_pre_registration_ad.images.asset",
|
|
25
19
|
"ad.app_pre_registration_ad.youtube_videos",
|
|
26
|
-
"ad.
|
|
27
|
-
"ad.
|
|
28
|
-
"ad.
|
|
29
|
-
"ad.
|
|
30
|
-
"ad.
|
|
31
|
-
"ad.
|
|
32
|
-
"ad.
|
|
33
|
-
"ad.
|
|
34
|
-
"ad.
|
|
35
|
-
"ad.
|
|
36
|
-
"ad.
|
|
37
|
-
"ad.
|
|
38
|
-
"ad.
|
|
39
|
-
"ad.
|
|
40
|
-
"ad.call_ad.phone_number_verification_url",
|
|
20
|
+
"ad.demand_gen_carousel_ad.business_name",
|
|
21
|
+
"ad.demand_gen_carousel_ad.call_to_action_text",
|
|
22
|
+
"ad.demand_gen_carousel_ad.carousel_cards",
|
|
23
|
+
"ad.demand_gen_carousel_ad.description",
|
|
24
|
+
"ad.demand_gen_carousel_ad.headline",
|
|
25
|
+
"ad.demand_gen_carousel_ad.logo_image",
|
|
26
|
+
"ad.demand_gen_multi_asset_ad.business_name",
|
|
27
|
+
"ad.demand_gen_multi_asset_ad.call_to_action_text",
|
|
28
|
+
"ad.demand_gen_multi_asset_ad.descriptions",
|
|
29
|
+
"ad.demand_gen_multi_asset_ad.headlines",
|
|
30
|
+
"ad.demand_gen_multi_asset_ad.logo_images",
|
|
31
|
+
"ad.demand_gen_multi_asset_ad.marketing_images",
|
|
32
|
+
"ad.demand_gen_multi_asset_ad.portrait_marketing_images",
|
|
33
|
+
"ad.demand_gen_multi_asset_ad.square_marketing_images",
|
|
41
34
|
"ad.demand_gen_product_ad.breadcrumb1",
|
|
42
35
|
"ad.demand_gen_product_ad.breadcrumb2",
|
|
43
36
|
"ad.demand_gen_product_ad.business_name",
|
|
44
37
|
"ad.demand_gen_product_ad.call_to_action",
|
|
45
|
-
"ad.demand_gen_product_ad.call_to_action.asset",
|
|
46
38
|
"ad.demand_gen_product_ad.description",
|
|
47
39
|
"ad.demand_gen_product_ad.headline",
|
|
48
40
|
"ad.demand_gen_product_ad.logo_image",
|
|
49
|
-
"ad.
|
|
41
|
+
"ad.demand_gen_video_responsive_ad.breadcrumb1",
|
|
42
|
+
"ad.demand_gen_video_responsive_ad.breadcrumb2",
|
|
43
|
+
"ad.demand_gen_video_responsive_ad.business_name",
|
|
44
|
+
"ad.demand_gen_video_responsive_ad.call_to_actions",
|
|
45
|
+
"ad.demand_gen_video_responsive_ad.descriptions",
|
|
46
|
+
"ad.demand_gen_video_responsive_ad.headlines",
|
|
47
|
+
"ad.demand_gen_video_responsive_ad.logo_images",
|
|
48
|
+
"ad.demand_gen_video_responsive_ad.long_headlines",
|
|
49
|
+
"ad.demand_gen_video_responsive_ad.videos",
|
|
50
50
|
"ad.device_preference",
|
|
51
|
-
"ad.discovery_carousel_ad.business_name",
|
|
52
|
-
"ad.discovery_carousel_ad.call_to_action_text",
|
|
53
|
-
"ad.discovery_carousel_ad.carousel_cards",
|
|
54
|
-
"ad.discovery_carousel_ad.carousel_cards.asset",
|
|
55
|
-
"ad.discovery_carousel_ad.description",
|
|
56
|
-
"ad.discovery_carousel_ad.headline",
|
|
57
|
-
"ad.discovery_carousel_ad.logo_image",
|
|
58
|
-
"ad.discovery_carousel_ad.logo_image.asset",
|
|
59
|
-
"ad.discovery_multi_asset_ad.business_name",
|
|
60
|
-
"ad.discovery_multi_asset_ad.call_to_action_text",
|
|
61
|
-
"ad.discovery_multi_asset_ad.descriptions",
|
|
62
|
-
"ad.discovery_multi_asset_ad.headlines",
|
|
63
|
-
"ad.discovery_multi_asset_ad.lead_form_only",
|
|
64
|
-
"ad.discovery_multi_asset_ad.logo_images",
|
|
65
|
-
"ad.discovery_multi_asset_ad.logo_images.asset",
|
|
66
|
-
"ad.discovery_multi_asset_ad.marketing_images",
|
|
67
|
-
"ad.discovery_multi_asset_ad.marketing_images.asset",
|
|
68
|
-
"ad.discovery_multi_asset_ad.portrait_marketing_images",
|
|
69
|
-
"ad.discovery_multi_asset_ad.portrait_marketing_images.asset",
|
|
70
|
-
"ad.discovery_multi_asset_ad.square_marketing_images",
|
|
71
|
-
"ad.discovery_multi_asset_ad.square_marketing_images.asset",
|
|
72
|
-
"ad.discovery_video_responsive_ad.breadcrumb1",
|
|
73
|
-
"ad.discovery_video_responsive_ad.breadcrumb2",
|
|
74
|
-
"ad.discovery_video_responsive_ad.business_name",
|
|
75
|
-
"ad.discovery_video_responsive_ad.call_to_actions",
|
|
76
|
-
"ad.discovery_video_responsive_ad.call_to_actions.asset",
|
|
77
|
-
"ad.discovery_video_responsive_ad.descriptions",
|
|
78
|
-
"ad.discovery_video_responsive_ad.headlines",
|
|
79
|
-
"ad.discovery_video_responsive_ad.logo_images",
|
|
80
|
-
"ad.discovery_video_responsive_ad.logo_images.asset",
|
|
81
|
-
"ad.discovery_video_responsive_ad.long_headlines",
|
|
82
|
-
"ad.discovery_video_responsive_ad.videos",
|
|
83
|
-
"ad.discovery_video_responsive_ad.videos.asset",
|
|
84
51
|
"ad.display_upload_ad.display_upload_product_type",
|
|
85
52
|
"ad.display_upload_ad.media_bundle",
|
|
86
|
-
"ad.display_upload_ad.media_bundle.asset",
|
|
87
53
|
"ad.display_url",
|
|
88
54
|
"ad.expanded_dynamic_search_ad.description",
|
|
89
55
|
"ad.expanded_dynamic_search_ad.description2",
|
|
@@ -129,13 +95,10 @@ const fields = [
|
|
|
129
95
|
"ad.local_ad.descriptions",
|
|
130
96
|
"ad.local_ad.headlines",
|
|
131
97
|
"ad.local_ad.logo_images",
|
|
132
|
-
"ad.local_ad.logo_images.asset",
|
|
133
98
|
"ad.local_ad.marketing_images",
|
|
134
|
-
"ad.local_ad.marketing_images.asset",
|
|
135
99
|
"ad.local_ad.path1",
|
|
136
100
|
"ad.local_ad.path2",
|
|
137
101
|
"ad.local_ad.videos",
|
|
138
|
-
"ad.local_ad.videos.asset",
|
|
139
102
|
"ad.name",
|
|
140
103
|
"ad.resource_name",
|
|
141
104
|
"ad.responsive_display_ad.accent_color",
|
|
@@ -148,19 +111,14 @@ const fields = [
|
|
|
148
111
|
"ad.responsive_display_ad.format_setting",
|
|
149
112
|
"ad.responsive_display_ad.headlines",
|
|
150
113
|
"ad.responsive_display_ad.logo_images",
|
|
151
|
-
"ad.responsive_display_ad.logo_images.asset",
|
|
152
114
|
"ad.responsive_display_ad.long_headline",
|
|
153
115
|
"ad.responsive_display_ad.main_color",
|
|
154
116
|
"ad.responsive_display_ad.marketing_images",
|
|
155
|
-
"ad.responsive_display_ad.marketing_images.asset",
|
|
156
117
|
"ad.responsive_display_ad.price_prefix",
|
|
157
118
|
"ad.responsive_display_ad.promo_text",
|
|
158
119
|
"ad.responsive_display_ad.square_logo_images",
|
|
159
|
-
"ad.responsive_display_ad.square_logo_images.asset",
|
|
160
120
|
"ad.responsive_display_ad.square_marketing_images",
|
|
161
|
-
"ad.responsive_display_ad.square_marketing_images.asset",
|
|
162
121
|
"ad.responsive_display_ad.youtube_videos",
|
|
163
|
-
"ad.responsive_display_ad.youtube_videos.asset",
|
|
164
122
|
"ad.responsive_search_ad.descriptions",
|
|
165
123
|
"ad.responsive_search_ad.headlines",
|
|
166
124
|
"ad.responsive_search_ad.path1",
|
|
@@ -199,12 +157,10 @@ const fields = [
|
|
|
199
157
|
"ad.video_responsive_ad.breadcrumb2",
|
|
200
158
|
"ad.video_responsive_ad.call_to_actions",
|
|
201
159
|
"ad.video_responsive_ad.companion_banners",
|
|
202
|
-
"ad.video_responsive_ad.companion_banners.asset",
|
|
203
160
|
"ad.video_responsive_ad.descriptions",
|
|
204
161
|
"ad.video_responsive_ad.headlines",
|
|
205
162
|
"ad.video_responsive_ad.long_headlines",
|
|
206
163
|
"ad.video_responsive_ad.videos",
|
|
207
|
-
"ad.video_responsive_ad.videos.asset",
|
|
208
164
|
"ad_group",
|
|
209
165
|
"ad_strength",
|
|
210
166
|
"labels",
|
|
@@ -257,7 +213,6 @@ const metrics = [
|
|
|
257
213
|
"average_cpc",
|
|
258
214
|
"average_cpe",
|
|
259
215
|
"average_cpm",
|
|
260
|
-
"average_cpv",
|
|
261
216
|
"average_order_value_micros",
|
|
262
217
|
"average_page_views",
|
|
263
218
|
"average_time_on_site",
|
|
@@ -312,8 +267,8 @@ const metrics = [
|
|
|
312
267
|
"video_quartile_p25_rate",
|
|
313
268
|
"video_quartile_p50_rate",
|
|
314
269
|
"video_quartile_p75_rate",
|
|
315
|
-
"
|
|
316
|
-
"
|
|
270
|
+
"video_trueview_view_rate",
|
|
271
|
+
"video_trueview_views",
|
|
317
272
|
"view_through_conversions",
|
|
318
273
|
].map((f) => getOption(f, "metrics"));
|
|
319
274
|
|
|
@@ -82,7 +82,6 @@ const metrics = [
|
|
|
82
82
|
"average_cpc",
|
|
83
83
|
"average_cpe",
|
|
84
84
|
"average_cpm",
|
|
85
|
-
"average_cpv",
|
|
86
85
|
"average_order_value_micros",
|
|
87
86
|
"average_page_views",
|
|
88
87
|
"average_time_on_site",
|
|
@@ -152,8 +151,8 @@ const metrics = [
|
|
|
152
151
|
"video_quartile_p25_rate",
|
|
153
152
|
"video_quartile_p50_rate",
|
|
154
153
|
"video_quartile_p75_rate",
|
|
155
|
-
"
|
|
156
|
-
"
|
|
154
|
+
"video_trueview_view_rate",
|
|
155
|
+
"video_trueview_views",
|
|
157
156
|
"view_through_conversions",
|
|
158
157
|
].map((f) => getOption(f, "metrics"));
|
|
159
158
|
|
|
@@ -17,12 +17,12 @@ const fields = [
|
|
|
17
17
|
"campaign_budget",
|
|
18
18
|
"campaign_group",
|
|
19
19
|
"commission.commission_rate_micros",
|
|
20
|
-
"
|
|
20
|
+
"contains_eu_political_advertising",
|
|
21
|
+
"demand_gen_campaign_settings.upgraded_targeting",
|
|
21
22
|
"dynamic_search_ads_setting.domain_name",
|
|
22
|
-
"dynamic_search_ads_setting.feeds",
|
|
23
23
|
"dynamic_search_ads_setting.language_code",
|
|
24
24
|
"dynamic_search_ads_setting.use_supplied_urls_only",
|
|
25
|
-
"
|
|
25
|
+
"end_date_time",
|
|
26
26
|
"excluded_parent_asset_field_types",
|
|
27
27
|
"excluded_parent_asset_set_types",
|
|
28
28
|
"experiment_type",
|
|
@@ -71,7 +71,7 @@ const fields = [
|
|
|
71
71
|
"shopping_setting.feed_label",
|
|
72
72
|
"shopping_setting.merchant_id",
|
|
73
73
|
"shopping_setting.use_vehicle_inventory",
|
|
74
|
-
"
|
|
74
|
+
"start_date_time",
|
|
75
75
|
"status",
|
|
76
76
|
"target_cpa.cpc_bid_ceiling_micros",
|
|
77
77
|
"target_cpa.cpc_bid_floor_micros",
|
|
@@ -91,10 +91,8 @@ const fields = [
|
|
|
91
91
|
"tracking_url_template",
|
|
92
92
|
"travel_campaign_settings.travel_account_id",
|
|
93
93
|
"url_custom_parameters",
|
|
94
|
-
"url_expansion_opt_out",
|
|
95
94
|
"vanity_pharma.vanity_pharma_display_url_mode",
|
|
96
95
|
"vanity_pharma.vanity_pharma_text",
|
|
97
|
-
"video_brand_safety_suitability",
|
|
98
96
|
].map((f) => getOption(f, "campaign"));
|
|
99
97
|
|
|
100
98
|
const segments = [
|
|
@@ -121,7 +119,7 @@ const segments = [
|
|
|
121
119
|
"sk_ad_network_ad_event_type",
|
|
122
120
|
"sk_ad_network_attribution_credit",
|
|
123
121
|
"sk_ad_network_coarse_conversion_value",
|
|
124
|
-
"
|
|
122
|
+
"sk_ad_network_fine_conversion_value",
|
|
125
123
|
"sk_ad_network_postback_sequence_index",
|
|
126
124
|
"sk_ad_network_source_app.sk_ad_network_source_app_id",
|
|
127
125
|
"sk_ad_network_source_domain",
|
|
@@ -170,7 +168,6 @@ const metrics = [
|
|
|
170
168
|
"average_cpc",
|
|
171
169
|
"average_cpe",
|
|
172
170
|
"average_cpm",
|
|
173
|
-
"average_cpv",
|
|
174
171
|
"average_impression_frequency_per_user",
|
|
175
172
|
"average_order_value_micros",
|
|
176
173
|
"average_page_views",
|
|
@@ -260,8 +257,8 @@ const metrics = [
|
|
|
260
257
|
"video_quartile_p25_rate",
|
|
261
258
|
"video_quartile_p50_rate",
|
|
262
259
|
"video_quartile_p75_rate",
|
|
263
|
-
"
|
|
264
|
-
"
|
|
260
|
+
"video_trueview_view_rate",
|
|
261
|
+
"video_trueview_views",
|
|
265
262
|
"view_through_conversions",
|
|
266
263
|
"view_through_conversions_from_location_asset_click_to_call",
|
|
267
264
|
"view_through_conversions_from_location_asset_directions",
|
|
@@ -56,7 +56,7 @@ const segments = [
|
|
|
56
56
|
"sk_ad_network_ad_event_type",
|
|
57
57
|
"sk_ad_network_attribution_credit",
|
|
58
58
|
"sk_ad_network_coarse_conversion_value",
|
|
59
|
-
"
|
|
59
|
+
"sk_ad_network_fine_conversion_value",
|
|
60
60
|
"sk_ad_network_postback_sequence_index",
|
|
61
61
|
"sk_ad_network_source_app.sk_ad_network_source_app_id",
|
|
62
62
|
"sk_ad_network_source_domain",
|
|
@@ -98,7 +98,6 @@ const metrics = [
|
|
|
98
98
|
"average_cpc",
|
|
99
99
|
"average_cpe",
|
|
100
100
|
"average_cpm",
|
|
101
|
-
"average_cpv",
|
|
102
101
|
"average_order_value_micros",
|
|
103
102
|
"clicks",
|
|
104
103
|
"content_budget_lost_impression_share",
|
|
@@ -152,8 +151,8 @@ const metrics = [
|
|
|
152
151
|
"value_per_all_conversions_by_conversion_date",
|
|
153
152
|
"value_per_conversion",
|
|
154
153
|
"value_per_conversions_by_conversion_date",
|
|
155
|
-
"
|
|
156
|
-
"
|
|
154
|
+
"video_trueview_view_rate",
|
|
155
|
+
"video_trueview_views",
|
|
157
156
|
"view_through_conversions",
|
|
158
157
|
"view_through_conversions_from_location_asset_click_to_call",
|
|
159
158
|
"view_through_conversions_from_location_asset_directions",
|
package/common/utils.mjs
CHANGED
|
@@ -68,6 +68,10 @@ export function getResourceOption(item, resource) {
|
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
export function sanitizeGaqlString(value) {
|
|
72
|
+
return String(value).replace(/'/g, "''");
|
|
73
|
+
}
|
|
74
|
+
|
|
71
75
|
export function checkPrefix(value, prefix) {
|
|
72
76
|
const checkStr = (s) => s && (s?.startsWith?.(prefix)
|
|
73
77
|
? s
|