@segment/action-destinations 3.480.0 → 3.481.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.
Files changed (72) hide show
  1. package/dist/destinations/facebook-conversions-api/addToCart/generated-types.d.ts +0 -1
  2. package/dist/destinations/facebook-conversions-api/addToCart/index.js +87 -4
  3. package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
  4. package/dist/destinations/facebook-conversions-api/addToCart2/generated-types.d.ts +0 -1
  5. package/dist/destinations/facebook-conversions-api/addToCart2/index.js +86 -4
  6. package/dist/destinations/facebook-conversions-api/addToCart2/index.js.map +1 -1
  7. package/dist/destinations/facebook-conversions-api/constants.d.ts +0 -11
  8. package/dist/destinations/facebook-conversions-api/constants.js +1 -12
  9. package/dist/destinations/facebook-conversions-api/constants.js.map +1 -1
  10. package/dist/destinations/facebook-conversions-api/custom/generated-types.d.ts +0 -9
  11. package/dist/destinations/facebook-conversions-api/custom/index.js +53 -5
  12. package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
  13. package/dist/destinations/facebook-conversions-api/custom2/generated-types.d.ts +0 -9
  14. package/dist/destinations/facebook-conversions-api/custom2/index.js +52 -5
  15. package/dist/destinations/facebook-conversions-api/custom2/index.js.map +1 -1
  16. package/dist/destinations/facebook-conversions-api/fb-capi-app-data.d.ts +11 -0
  17. package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js +188 -0
  18. package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js.map +1 -0
  19. package/dist/destinations/facebook-conversions-api/{fields.d.ts → fb-capi-properties.d.ts} +10 -14
  20. package/dist/destinations/facebook-conversions-api/fb-capi-properties.js +185 -0
  21. package/dist/destinations/facebook-conversions-api/fb-capi-properties.js.map +1 -0
  22. package/dist/destinations/facebook-conversions-api/fb-capi-user-data.d.ts +7 -0
  23. package/dist/destinations/facebook-conversions-api/fb-capi-user-data.js +272 -0
  24. package/dist/destinations/facebook-conversions-api/fb-capi-user-data.js.map +1 -0
  25. package/dist/destinations/facebook-conversions-api/initiateCheckout/generated-types.d.ts +0 -1
  26. package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +90 -4
  27. package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
  28. package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.d.ts +0 -1
  29. package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js +89 -4
  30. package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js.map +1 -1
  31. package/dist/destinations/facebook-conversions-api/pageView/generated-types.d.ts +0 -1
  32. package/dist/destinations/facebook-conversions-api/pageView/index.js +46 -5
  33. package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
  34. package/dist/destinations/facebook-conversions-api/pageView2/generated-types.d.ts +0 -1
  35. package/dist/destinations/facebook-conversions-api/pageView2/index.js +45 -5
  36. package/dist/destinations/facebook-conversions-api/pageView2/index.js.map +1 -1
  37. package/dist/destinations/facebook-conversions-api/purchase/generated-types.d.ts +0 -11
  38. package/dist/destinations/facebook-conversions-api/purchase/index.js +95 -4
  39. package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
  40. package/dist/destinations/facebook-conversions-api/purchase2/fields.d.ts +2 -0
  41. package/dist/destinations/facebook-conversions-api/purchase2/fields.js +50 -0
  42. package/dist/destinations/facebook-conversions-api/purchase2/fields.js.map +1 -0
  43. package/dist/destinations/facebook-conversions-api/purchase2/functions.d.ts +4 -0
  44. package/dist/destinations/facebook-conversions-api/purchase2/functions.js +59 -0
  45. package/dist/destinations/facebook-conversions-api/purchase2/functions.js.map +1 -0
  46. package/dist/destinations/facebook-conversions-api/purchase2/generated-types.d.ts +0 -11
  47. package/dist/destinations/facebook-conversions-api/purchase2/index.js +4 -5
  48. package/dist/destinations/facebook-conversions-api/purchase2/index.js.map +1 -1
  49. package/dist/destinations/facebook-conversions-api/search/generated-types.d.ts +0 -1
  50. package/dist/destinations/facebook-conversions-api/search/index.js +94 -4
  51. package/dist/destinations/facebook-conversions-api/search/index.js.map +1 -1
  52. package/dist/destinations/facebook-conversions-api/search2/generated-types.d.ts +0 -1
  53. package/dist/destinations/facebook-conversions-api/search2/index.js +93 -4
  54. package/dist/destinations/facebook-conversions-api/search2/index.js.map +1 -1
  55. package/dist/destinations/facebook-conversions-api/utils.d.ts +3 -0
  56. package/dist/destinations/facebook-conversions-api/utils.js +19 -0
  57. package/dist/destinations/facebook-conversions-api/utils.js.map +1 -0
  58. package/dist/destinations/facebook-conversions-api/viewContent/generated-types.d.ts +0 -1
  59. package/dist/destinations/facebook-conversions-api/viewContent/index.js +89 -4
  60. package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
  61. package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.d.ts +0 -1
  62. package/dist/destinations/facebook-conversions-api/viewContent2/index.js +88 -4
  63. package/dist/destinations/facebook-conversions-api/viewContent2/index.js.map +1 -1
  64. package/package.json +2 -2
  65. package/dist/destinations/facebook-conversions-api/fields.js +0 -842
  66. package/dist/destinations/facebook-conversions-api/fields.js.map +0 -1
  67. package/dist/destinations/facebook-conversions-api/functions.d.ts +0 -37
  68. package/dist/destinations/facebook-conversions-api/functions.js +0 -425
  69. package/dist/destinations/facebook-conversions-api/functions.js.map +0 -1
  70. package/dist/destinations/facebook-conversions-api/types.d.ts +0 -182
  71. package/dist/destinations/facebook-conversions-api/types.js +0 -3
  72. package/dist/destinations/facebook-conversions-api/types.js.map +0 -1
@@ -1,842 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addToCartFields = exports.customFields = exports.searchFields = exports.viewContentFields = exports.initiateCheckoutFields = exports.pageFields = exports.purchaseFields = exports.test_event_code = exports.order_id = exports.event_id = exports.event_source_url = exports.action_source = exports.event_time = exports.num_items = exports.data_processing_options_state = exports.data_processing_options_country = exports.data_processing_options = exports.contents = exports.content_type = exports.content_name = exports.content_ids = exports.content_category = exports.predicted_ltv = exports.net_revenue = exports.value = exports.currency = exports.custom_data = exports.append_event_details = exports.is_append_event = exports.app_data_field = exports.user_data_field = void 0;
4
- exports.user_data_field = {
5
- label: 'User Data',
6
- description: 'These parameters are a set of identifiers Facebook can use for targeted attribution. You must provide at least one of the following parameters in your request. More information on recommended User Data parameters in Facebook’s [Best Practices for Conversions API](https://www.facebook.com/business/help/308855623839366).',
7
- type: 'object',
8
- required: true,
9
- properties: {
10
- externalId: {
11
- label: 'External ID',
12
- description: 'Any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. You can send one or more external IDs for a given event.',
13
- type: 'string',
14
- multiple: true,
15
- category: 'hashedPII'
16
- },
17
- email: {
18
- label: 'Email',
19
- description: 'An email address in lowercase.',
20
- type: 'string',
21
- category: 'hashedPII'
22
- },
23
- phone: {
24
- label: 'Phone',
25
- description: 'A phone number. Include only digits with country code, area code, and number. Remove symbols, letters, and any leading zeros. In addition, always include the country code, even if all of the data is from the same country, as the country code is used for matching.',
26
- type: 'string',
27
- category: 'hashedPII'
28
- },
29
- gender: {
30
- label: 'Gender',
31
- description: 'Gender in lowercase. Either f or m.',
32
- type: 'string',
33
- category: 'hashedPII'
34
- },
35
- dateOfBirth: {
36
- label: 'Date of Birth',
37
- description: 'A date of birth given as year, month, and day. Example: 19971226 for December 26, 1997.',
38
- type: 'string',
39
- category: 'hashedPII'
40
- },
41
- lastName: {
42
- label: 'Last Name',
43
- description: 'A last name in lowercase.',
44
- type: 'string',
45
- category: 'hashedPII'
46
- },
47
- firstName: {
48
- label: 'First Name',
49
- description: 'A first name in lowercase.',
50
- type: 'string',
51
- category: 'hashedPII'
52
- },
53
- city: {
54
- label: 'City',
55
- description: 'A city in lowercase without spaces or punctuation. Example: menlopark.',
56
- type: 'string',
57
- category: 'hashedPII'
58
- },
59
- state: {
60
- label: 'State',
61
- description: 'A two-letter state code in lowercase. Example: ca.',
62
- type: 'string',
63
- category: 'hashedPII'
64
- },
65
- zip: {
66
- label: 'Zip Code',
67
- description: 'A five-digit zip code for United States. For other locations, follow each country`s standards.',
68
- type: 'string',
69
- category: 'hashedPII'
70
- },
71
- country: {
72
- label: 'Country',
73
- description: 'A two-letter country code in lowercase.',
74
- type: 'string',
75
- category: 'hashedPII'
76
- },
77
- client_ip_address: {
78
- label: 'Client IP Address',
79
- description: 'The IP address of the browser corresponding to the event.',
80
- type: 'string'
81
- },
82
- client_user_agent: {
83
- label: 'Client User Agent',
84
- description: 'The user agent for the browser corresponding to the event. This is required if action source is “website”.',
85
- type: 'string'
86
- },
87
- fbc: {
88
- label: 'Click ID',
89
- description: 'The Facebook click ID value stored in the _fbc browser cookie under your domain.',
90
- type: 'string'
91
- },
92
- fbp: {
93
- label: 'Browser ID',
94
- description: 'The Facebook browser ID value stored in the _fbp browser cookie under your domain.',
95
- type: 'string'
96
- },
97
- subscriptionID: {
98
- label: 'Subscription ID',
99
- description: 'The subscription ID for the user in this transaction.',
100
- type: 'string'
101
- },
102
- leadID: {
103
- label: 'Lead ID',
104
- description: 'The ID associated with a lead generated by Facebook`s Lead Ads.',
105
- type: 'integer'
106
- },
107
- fbLoginID: {
108
- label: 'Facebook Login ID',
109
- description: 'The ID issued by Facebook when a person first logs into an instance of an app.',
110
- type: 'integer'
111
- },
112
- anonId: {
113
- label: 'Install ID (anon_id)',
114
- description: 'This field represents unique application installation instances. Note: This parameter is for app events only.',
115
- type: 'string'
116
- },
117
- madId: {
118
- label: 'Advertiser ID (madid)',
119
- description: 'Your mobile advertiser ID, the advertising ID from an Android device or the Advertising Identifier (IDFA) from an Apple device.',
120
- type: 'string'
121
- },
122
- partner_id: {
123
- label: 'Partner ID',
124
- description: 'The ID issued by Facebook identity partner.',
125
- type: 'string'
126
- },
127
- partner_name: {
128
- label: 'Partner Name',
129
- description: 'The name of the Facebook identity partner.',
130
- type: 'string'
131
- },
132
- ctwa_clid: {
133
- label: 'Click to WhatsApp Click ID (ctwa_clid)',
134
- description: 'Click ID generated by Meta for ads that click to WhatsApp.',
135
- type: 'string'
136
- }
137
- },
138
- default: {
139
- externalId: {
140
- '@if': {
141
- exists: { '@path': '$.userId' },
142
- then: { '@path': '$.userId' },
143
- else: { '@path': '$.anonymousId' }
144
- }
145
- },
146
- email: {
147
- '@path': '$.context.traits.email'
148
- },
149
- phone: {
150
- '@path': '$.context.traits.phone'
151
- },
152
- dateOfBirth: {
153
- '@path': '$.context.traits.birthday'
154
- },
155
- lastName: {
156
- '@path': '$.context.traits.lastName'
157
- },
158
- firstName: {
159
- '@path': '$.context.traits.firstName'
160
- },
161
- city: {
162
- '@path': '$.context.traits.address.city'
163
- },
164
- state: {
165
- '@path': '$.context.traits.address.state'
166
- },
167
- zip: {
168
- '@path': '$.context.traits.address.postalCode'
169
- },
170
- client_ip_address: {
171
- '@path': '$.context.ip'
172
- },
173
- client_user_agent: {
174
- '@path': '$.context.userAgent'
175
- },
176
- fbc: {
177
- '@path': '$.properties.fbc'
178
- },
179
- fbp: {
180
- '@path': '$.properties.fbp'
181
- }
182
- }
183
- };
184
- exports.app_data_field = {
185
- label: 'App Events Fields',
186
- description: `These fields support sending app events to Facebook through the Conversions API. For more information about app events support in the Conversions API, see the Facebook docs [here](https://developers.facebook.com/docs/marketing-api/conversions-api/app-events).
187
- App events sent through the Conversions API must be associated with a dataset.
188
- Instructions for creating a dataset can be found [here](https://www.facebook.com/business/help/750785952855662?id=490360542427371). Once a dataset is created, the dataset ID
189
- can be substituted for the pixel ID in the destination settings.`,
190
- type: 'object',
191
- properties: {
192
- use_app_data: {
193
- label: 'Send App Events?',
194
- description: 'Segment will not send app events to Facebook by default. Enable this once you have created a dataset in Facebook and are ready to begin sending app events.',
195
- type: 'boolean',
196
- default: false
197
- },
198
- advertiser_tracking_enabled: {
199
- label: 'Advertiser Tracking Enabled',
200
- description: `*Required for app events*
201
- Use this field to specify ATT permission on an iOS 14.5+ device. Set to 0 for disabled or 1 for enabled.`,
202
- type: 'boolean'
203
- },
204
- application_tracking_enabled: {
205
- label: 'Application Tracking Enabled',
206
- type: 'boolean',
207
- description: `*Required for app events*
208
- A person can choose to enable ad tracking on an app level. Your SDK should allow an app developer to put an opt-out setting into their app. Use this field to specify the person's choice. Use 0 for disabled, 1 for enabled.`
209
- },
210
- version: {
211
- label: 'ExtInfo Version',
212
- description: `*Required for app events* Example: 'i2'.`,
213
- type: 'string',
214
- choices: [
215
- { label: 'iOS', value: 'i2' },
216
- { label: 'Android', value: 'a2' }
217
- ]
218
- },
219
- packageName: {
220
- label: 'Package Name',
221
- description: `Example: 'com.facebook.sdk.samples.hellofacebook'.`,
222
- type: 'string'
223
- },
224
- shortVersion: {
225
- label: 'Short Version',
226
- description: `Example: '1.0'.`,
227
- type: 'string'
228
- },
229
- longVersion: {
230
- label: 'Long Version',
231
- description: `Example: '1.0 long'.`,
232
- type: 'string'
233
- },
234
- osVersion: {
235
- label: '*Required for app events* OS Version',
236
- description: `Example: '13.4.1'.`,
237
- type: 'string'
238
- },
239
- deviceName: {
240
- label: 'Device Model Name',
241
- description: `Example: 'iPhone5,1'.`,
242
- type: 'string'
243
- },
244
- madId: {
245
- label: 'Advertiser ID (madid)',
246
- description: 'Your mobile advertiser ID, the advertising ID from an Android device or the Advertising Identifier (IDFA) from an Apple device.',
247
- type: 'string'
248
- },
249
- locale: {
250
- label: 'Locale',
251
- description: `Example: 'En_US'.`,
252
- type: 'string'
253
- },
254
- timezone: {
255
- label: 'Timezone Abbreviation',
256
- description: `Example: 'PST'.`,
257
- type: 'string'
258
- },
259
- carrier: {
260
- label: 'Carrier Name',
261
- description: `Example: 'AT&T'.`,
262
- type: 'string'
263
- },
264
- width: {
265
- label: 'Screen Width',
266
- description: `Example: '1080'.`,
267
- type: 'string'
268
- },
269
- height: {
270
- label: 'Screen Height',
271
- description: `Example: '1920'.`,
272
- type: 'string'
273
- },
274
- density: {
275
- label: 'Screen Density',
276
- description: `Example: '2.0'.`,
277
- type: 'string'
278
- },
279
- cpuCores: {
280
- label: 'CPU Cores',
281
- description: `Example: '8'.`,
282
- type: 'string'
283
- },
284
- storageSize: {
285
- label: 'Storage Size in GBs',
286
- description: `Example: '64'.`,
287
- type: 'string'
288
- },
289
- freeStorage: {
290
- label: 'Free Storage in GBs',
291
- description: `Example: '32'.`,
292
- type: 'string'
293
- },
294
- deviceTimezone: {
295
- label: 'Device Timezone',
296
- description: `Example: 'USA/New York'.`,
297
- type: 'string'
298
- }
299
- },
300
- default: {
301
- application_tracking_enabled: {
302
- '@path': '$.context.device.adTrackingEnabled'
303
- },
304
- packageName: {
305
- '@path': '$.context.app.namespace'
306
- },
307
- longVersion: {
308
- '@path': '$.context.app.version'
309
- },
310
- osVersion: {
311
- '@path': '$.context.os.version'
312
- },
313
- deviceName: {
314
- '@path': '$.context.device.model'
315
- },
316
- locale: {
317
- '@path': '$.context.locale'
318
- },
319
- carrier: {
320
- '@path': '$.context.network.carrier'
321
- },
322
- width: {
323
- '@path': '$.context.screen.width'
324
- },
325
- height: {
326
- '@path': '$.context.screen.height'
327
- },
328
- density: {
329
- '@path': '$.context.screen.density'
330
- },
331
- deviceTimezone: {
332
- '@path': '$.context.timezone'
333
- },
334
- madId: {
335
- '@path': '$.context.madId'
336
- }
337
- }
338
- };
339
- exports.is_append_event = {
340
- label: 'Append Data to Existing Conversion',
341
- description: 'Turn this on to add new information to a previously sent event. Currently supports late-calculated values for predicted lifetime value (pLTV) or net profit values. Make sure to resubmit all the original data from your conversion event as well as the pLTV or net profit values.',
342
- type: 'boolean',
343
- default: false,
344
- required: false
345
- };
346
- exports.append_event_details = {
347
- label: 'Append Event Details',
348
- description: 'Details to append to the original event. Order Id, Event Id and Original Timestamp are used to match the original event. Net Revenue and Predicted Lifetime Value are the late-calculated values to append to the original event.',
349
- type: 'object',
350
- defaultObjectUI: 'keyvalue',
351
- properties: {
352
- original_event_time: {
353
- label: 'Original Event Time',
354
- description: 'A timestamp indicating when the actual original event occurred in ISO 8601 format. Required to match to the original event.',
355
- type: 'string',
356
- format: 'date-time'
357
- },
358
- original_event_order_id: {
359
- label: 'Original Order ID',
360
- description: 'A unique identifier for the original purchase event, typically the order ID or transaction ID from your ecommerce system. Facebook uses this value to match to the original event.',
361
- type: 'string'
362
- },
363
- original_event_id: {
364
- label: 'Original Event ID',
365
- description: 'This ID can be any unique string. Event ID is used to deduplicate events sent by both Facebook Pixel and Conversions API. Facebook uses this value to match to the original event.',
366
- type: 'string'
367
- },
368
- net_revenue_to_append: {
369
- label: 'Net Revenue',
370
- description: 'The late-calculated numeric net revenue value to append to the original event.',
371
- type: 'number'
372
- },
373
- predicted_ltv_to_append: {
374
- label: 'Predicted Lifetime Value',
375
- description: 'The late-calculated numeric predicted lifetime value (pLTV) to append to the original event.',
376
- type: 'number'
377
- }
378
- },
379
- depends_on: {
380
- match: 'any',
381
- conditions: [
382
- {
383
- fieldKey: 'is_append_event',
384
- operator: 'is',
385
- value: true
386
- }
387
- ]
388
- },
389
- required: {
390
- match: 'any',
391
- conditions: [
392
- {
393
- fieldKey: 'is_append_event',
394
- operator: 'is',
395
- value: true
396
- }
397
- ]
398
- }
399
- };
400
- exports.custom_data = {
401
- label: 'Custom Data',
402
- description: 'The custom data object can be used to pass custom properties. See [Facebook documentation](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data#custom-properties) for more information.',
403
- type: 'object',
404
- defaultObjectUI: 'keyvalue'
405
- };
406
- exports.currency = {
407
- label: 'Currency',
408
- description: 'The currency for the value specified. Currency must be a valid ISO 4217 three-digit currency code.',
409
- type: 'string',
410
- default: {
411
- '@path': '$.properties.currency'
412
- }
413
- };
414
- exports.value = {
415
- label: 'Value',
416
- description: 'A numeric value associated with this event. This could be a monetary value or a value in some other metric.',
417
- type: 'number'
418
- };
419
- exports.net_revenue = {
420
- label: 'Net Revenue',
421
- description: 'The numeric net revenue value associated with the event.',
422
- type: 'number',
423
- depends_on: {
424
- match: 'any',
425
- conditions: [
426
- {
427
- fieldKey: 'is_append_event',
428
- operator: 'is_not',
429
- value: true
430
- }
431
- ]
432
- }
433
- };
434
- exports.predicted_ltv = {
435
- label: 'Predicted Lifetime Value',
436
- description: 'The numeric predicted lifetime value (pLTV) associated with the event.',
437
- type: 'number',
438
- depends_on: {
439
- match: 'any',
440
- conditions: [
441
- {
442
- fieldKey: 'is_append_event',
443
- operator: 'is_not',
444
- value: true
445
- }
446
- ]
447
- }
448
- };
449
- exports.content_category = {
450
- label: 'Content Category',
451
- description: 'The category of the content associated with the event.',
452
- type: 'string'
453
- };
454
- exports.content_ids = {
455
- label: 'Content IDs',
456
- description: 'The content IDs associated with the event, such as product SKUs.',
457
- type: 'string',
458
- multiple: true
459
- };
460
- exports.content_name = {
461
- label: 'Content Name',
462
- description: 'The name of the page or product associated with the event.',
463
- type: 'string'
464
- };
465
- exports.content_type = {
466
- label: 'Content Type',
467
- description: 'The content type should be set to product or product_group. See [Facebook documentation](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data) for more information.',
468
- type: 'string'
469
- };
470
- exports.contents = {
471
- label: 'Contents',
472
- description: 'A list of JSON objects that contain the product IDs associated with the event plus information about the products. ID and quantity are required fields.',
473
- type: 'object',
474
- multiple: true,
475
- properties: {
476
- id: {
477
- label: 'ID',
478
- description: 'The product ID of the purchased item.',
479
- type: 'string'
480
- },
481
- quantity: {
482
- label: 'Quantity',
483
- description: 'The number of items purchased.',
484
- type: 'integer'
485
- },
486
- item_price: {
487
- label: 'Item Price',
488
- description: 'The price of the item.',
489
- type: 'number'
490
- },
491
- delivery_category: {
492
- label: 'Delivery Category',
493
- description: 'The type of delivery for a purchase event. Supported values are "in_store", "curbside", and "home_delivery".',
494
- type: 'string'
495
- }
496
- }
497
- };
498
- exports.data_processing_options = {
499
- label: 'Data Processing Options',
500
- description: `The Data Processing Options to send to Facebook. If set to true, Segment will send an array to Facebook indicating events should be processed with Limited Data Use (LDU) restrictions. More information can be found in [Facebook’s documentation](https://developers.facebook.com/docs/marketing-apis/data-processing-options).`,
501
- type: 'boolean'
502
- };
503
- exports.data_processing_options_country = {
504
- label: 'Data Processing Country',
505
- description: 'A country that you want to associate to the Data Processing Options. Accepted values are 1, for the United States of America, or 0, to request that Facebook geolocates the event using IP address. This is required if Data Processing Options is set to true. If nothing is provided, Segment will send 0.',
506
- type: 'number',
507
- choices: [
508
- { label: 'Use Facebook’s Geolocation Logic', value: 0 },
509
- { label: 'United States of America', value: 1 }
510
- ]
511
- };
512
- exports.data_processing_options_state = {
513
- label: 'Data Processing State',
514
- description: 'A state that you want to associate to the Data Processing Options. Accepted values are 1000, for California, or 0, to request that Facebook geolocates the event using IP address. This is required if Data Processing Options is set to true. If nothing is provided, Segment will send 0.',
515
- type: 'number',
516
- choices: [
517
- { label: 'Use Facebook’s Geolocation Logic', value: 0 },
518
- { label: 'California', value: 1000 },
519
- { label: 'Colorado', value: 1001 },
520
- { label: 'Connecticut', value: 1002 },
521
- { label: 'Florida', value: 1003 },
522
- { label: 'Oregon', value: 1004 },
523
- { label: 'Texas', value: 1005 },
524
- { label: 'Montana', value: 1006 },
525
- { label: 'Delaware', value: 1007 },
526
- { label: 'Nebraska', value: 1008 },
527
- { label: 'New Hampshire', value: 1009 },
528
- { label: 'New Jersey', value: 1010 }
529
- ]
530
- };
531
- exports.num_items = {
532
- label: 'Number of Items',
533
- description: 'The number of items when checkout was initiated.',
534
- type: 'integer'
535
- };
536
- exports.event_time = {
537
- label: 'Event Time',
538
- description: 'A Unix timestamp in seconds indicating when the actual event occurred. Facebook will automatically convert ISO 8601 timestamps to Unix.',
539
- type: 'string',
540
- default: {
541
- '@path': '$.timestamp'
542
- }
543
- };
544
- exports.action_source = {
545
- label: 'Action Source',
546
- description: 'This field allows you to specify where your conversions occurred. See [Facebook documentation](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/server-event) for supported values.',
547
- type: 'string',
548
- choices: [
549
- { label: 'EMAIL', value: 'email' },
550
- { label: 'WEBSITE', value: 'website' },
551
- { label: 'APP', value: 'app' },
552
- { label: 'PHONE CALL', value: 'phone_call' },
553
- { label: 'CHAT', value: 'chat' },
554
- { label: 'PHYSICAL STORE', value: 'physical_store' },
555
- { label: 'SYSTEM GENERATED', value: 'system_generated' },
556
- { label: 'OTHER', value: 'other' }
557
- ]
558
- };
559
- exports.event_source_url = {
560
- label: 'Event Source URL',
561
- description: 'The browser URL where the event happened. The URL must begin with http:// or https:// and should match the verified domain. This is required if the action source is "website."',
562
- type: 'string',
563
- default: {
564
- '@path': '$.context.page.url'
565
- }
566
- };
567
- exports.event_id = {
568
- label: 'Event ID',
569
- description: 'This ID can be any unique string. Event ID is used to deduplicate events sent by both Facebook Pixel and Conversions API.',
570
- type: 'string',
571
- default: {
572
- '@path': '$.messageId'
573
- }
574
- };
575
- exports.order_id = {
576
- label: 'Order ID',
577
- description: 'A unique identifier for the purchase event, typically the order ID or transaction ID from your ecommerce system.',
578
- type: 'string',
579
- default: {
580
- '@path': '$.properties.order_id'
581
- },
582
- depends_on: {
583
- match: 'any',
584
- conditions: [
585
- {
586
- fieldKey: 'is_append_event',
587
- operator: 'is_not',
588
- value: true
589
- }
590
- ]
591
- }
592
- };
593
- exports.test_event_code = {
594
- label: 'Test Event Code',
595
- type: 'string',
596
- description: 'Use this field to specify that events should be test events rather than actual traffic. You can find your Test Event Code in your Facebook Events Manager under the "Test events" tab. This property overrides the test event code defined in Settings. You\'ll want to remove your Test Event Code when sending real traffic through this integration.',
597
- required: false
598
- };
599
- exports.purchaseFields = {
600
- is_append_event: exports.is_append_event,
601
- append_event_details: exports.append_event_details,
602
- action_source: { ...exports.action_source, required: true },
603
- currency: { ...exports.currency, required: true },
604
- event_time: { ...exports.event_time, required: true },
605
- user_data: exports.user_data_field,
606
- app_data_field: exports.app_data_field,
607
- value: {
608
- ...exports.value,
609
- required: true,
610
- default: { '@path': '$.properties.revenue' }
611
- },
612
- net_revenue: exports.net_revenue,
613
- predicted_ltv: exports.predicted_ltv,
614
- content_ids: exports.content_ids,
615
- content_name: exports.content_name,
616
- content_type: exports.content_type,
617
- contents: {
618
- ...exports.contents,
619
- default: {
620
- '@arrayPath': [
621
- '$.properties.products',
622
- {
623
- id: {
624
- '@path': '$.product_id'
625
- },
626
- quantity: {
627
- '@path': '$.quantity'
628
- },
629
- item_price: {
630
- '@path': '$.price'
631
- }
632
- }
633
- ]
634
- }
635
- },
636
- event_id: exports.event_id,
637
- order_id: exports.order_id,
638
- event_source_url: exports.event_source_url,
639
- num_items: exports.num_items,
640
- custom_data: exports.custom_data,
641
- data_processing_options: exports.data_processing_options,
642
- data_processing_options_country: exports.data_processing_options_country,
643
- data_processing_options_state: exports.data_processing_options_state,
644
- test_event_code: exports.test_event_code
645
- };
646
- exports.pageFields = {
647
- action_source: { ...exports.action_source, required: true },
648
- event_time: { ...exports.event_time, required: true },
649
- user_data: exports.user_data_field,
650
- app_data_field: exports.app_data_field,
651
- event_id: exports.event_id,
652
- event_source_url: exports.event_source_url,
653
- custom_data: exports.custom_data,
654
- data_processing_options: exports.data_processing_options,
655
- data_processing_options_country: exports.data_processing_options_country,
656
- data_processing_options_state: exports.data_processing_options_state,
657
- test_event_code: exports.test_event_code
658
- };
659
- exports.initiateCheckoutFields = {
660
- action_source: { ...exports.action_source, required: true },
661
- event_time: { ...exports.event_time, required: true },
662
- user_data: exports.user_data_field,
663
- app_data_field: exports.app_data_field,
664
- content_category: exports.content_category,
665
- content_ids: exports.content_ids,
666
- contents: {
667
- ...exports.contents,
668
- default: {
669
- '@arrayPath': [
670
- '$.properties.products',
671
- {
672
- id: {
673
- '@path': '$.product_id'
674
- },
675
- quantity: {
676
- '@path': '$.quantity'
677
- },
678
- item_price: {
679
- '@path': '$.price'
680
- }
681
- }
682
- ]
683
- }
684
- },
685
- currency: exports.currency,
686
- event_id: exports.event_id,
687
- event_source_url: exports.event_source_url,
688
- num_items: exports.num_items,
689
- value: {
690
- ...exports.value,
691
- default: { '@path': '$.properties.revenue' }
692
- },
693
- custom_data: exports.custom_data,
694
- data_processing_options: exports.data_processing_options,
695
- data_processing_options_country: exports.data_processing_options_country,
696
- data_processing_options_state: exports.data_processing_options_state,
697
- test_event_code: exports.test_event_code
698
- };
699
- exports.viewContentFields = {
700
- action_source: { ...exports.action_source, required: true },
701
- event_time: { ...exports.event_time, required: true },
702
- user_data: exports.user_data_field,
703
- app_data_field: exports.app_data_field,
704
- content_category: exports.content_category,
705
- content_ids: { ...exports.content_ids, default: { '@path': '$.properties.product_id' } },
706
- content_name: exports.content_name,
707
- content_type: exports.content_type,
708
- contents: {
709
- ...exports.contents,
710
- default: {
711
- '@arrayPath': [
712
- '$.properties',
713
- {
714
- id: {
715
- '@path': '$.product_id'
716
- },
717
- quantity: {
718
- '@path': '$.quantity'
719
- },
720
- item_price: {
721
- '@path': '$.price'
722
- }
723
- }
724
- ]
725
- }
726
- },
727
- currency: exports.currency,
728
- event_id: exports.event_id,
729
- event_source_url: exports.event_source_url,
730
- value: { ...exports.value, default: { '@path': '$.properties.price' } },
731
- custom_data: exports.custom_data,
732
- data_processing_options: exports.data_processing_options,
733
- data_processing_options_country: exports.data_processing_options_country,
734
- data_processing_options_state: exports.data_processing_options_state,
735
- test_event_code: exports.test_event_code
736
- };
737
- exports.searchFields = {
738
- action_source: { ...exports.action_source, required: true },
739
- event_time: { ...exports.event_time, required: true },
740
- user_data: exports.user_data_field,
741
- app_data_field: exports.app_data_field,
742
- content_category: exports.content_category,
743
- content_ids: exports.content_ids,
744
- contents: {
745
- ...exports.contents,
746
- default: {
747
- '@arrayPath': [
748
- '$.properties',
749
- {
750
- id: {
751
- '@path': '$.product_id'
752
- },
753
- quantity: {
754
- '@path': '$.quantity'
755
- },
756
- item_price: {
757
- '@path': '$.price'
758
- }
759
- }
760
- ]
761
- }
762
- },
763
- currency: exports.currency,
764
- event_id: exports.event_id,
765
- event_source_url: exports.event_source_url,
766
- search_string: {
767
- label: 'Search String',
768
- description: 'A search query made by a user. This must be a string.',
769
- type: 'string',
770
- default: {
771
- '@path': '$.properties.query'
772
- }
773
- },
774
- value: exports.value,
775
- custom_data: exports.custom_data,
776
- data_processing_options: exports.data_processing_options,
777
- data_processing_options_country: exports.data_processing_options_country,
778
- data_processing_options_state: exports.data_processing_options_state,
779
- test_event_code: exports.test_event_code
780
- };
781
- exports.customFields = {
782
- is_append_event: exports.is_append_event,
783
- append_event_details: exports.append_event_details,
784
- action_source: { ...exports.action_source, required: true },
785
- event_name: {
786
- label: 'Event Name',
787
- description: 'A Facebook [standard event](https://developers.facebook.com/docs/meta-pixel/implementation/conversion-tracking#standard-events) or [custom event](https://developers.facebook.com/docs/meta-pixel/implementation/conversion-tracking#custom-events) name.',
788
- type: 'string',
789
- required: true,
790
- default: {
791
- '@path': '$.event'
792
- }
793
- },
794
- event_time: { ...exports.event_time, required: true },
795
- user_data: exports.user_data_field,
796
- app_data_field: exports.app_data_field,
797
- custom_data: exports.custom_data,
798
- event_id: exports.event_id,
799
- event_source_url: exports.event_source_url,
800
- data_processing_options: exports.data_processing_options,
801
- data_processing_options_country: exports.data_processing_options_country,
802
- data_processing_options_state: exports.data_processing_options_state,
803
- test_event_code: exports.test_event_code
804
- };
805
- exports.addToCartFields = {
806
- action_source: { ...exports.action_source, required: true },
807
- event_time: { ...exports.event_time, required: true },
808
- user_data: exports.user_data_field,
809
- app_data_field: exports.app_data_field,
810
- content_ids: exports.content_ids,
811
- content_name: exports.content_name,
812
- content_type: exports.content_type,
813
- contents: {
814
- ...exports.contents,
815
- default: {
816
- '@arrayPath': [
817
- '$.properties',
818
- {
819
- id: {
820
- '@path': '$.product_id'
821
- },
822
- quantity: {
823
- '@path': '$.quantity'
824
- },
825
- item_price: {
826
- '@path': '$.price'
827
- }
828
- }
829
- ]
830
- }
831
- },
832
- currency: exports.currency,
833
- event_id: exports.event_id,
834
- event_source_url: exports.event_source_url,
835
- value: { ...exports.value, default: { '@path': '$.properties.price' } },
836
- custom_data: exports.custom_data,
837
- data_processing_options: exports.data_processing_options,
838
- data_processing_options_country: exports.data_processing_options_country,
839
- data_processing_options_state: exports.data_processing_options_state,
840
- test_event_code: exports.test_event_code
841
- };
842
- //# sourceMappingURL=fields.js.map