@segment/analytics-browser-actions-facebook-conversions-api-web 1.9.0 → 1.9.1-staging-c01044061.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/dist/cjs/functions.js +5 -2
- package/dist/cjs/functions.js.map +1 -1
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/send/depends-on.js +35 -3
- package/dist/cjs/send/depends-on.js.map +1 -1
- package/dist/cjs/send/fields.js +4 -4
- package/dist/cjs/send/fields.js.map +1 -1
- package/dist/cjs/send/functions.js +9 -7
- package/dist/cjs/send/functions.js.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/functions.js +5 -2
- package/dist/esm/functions.js.map +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/send/depends-on.js +35 -3
- package/dist/esm/send/depends-on.js.map +1 -1
- package/dist/esm/send/fields.js +4 -4
- package/dist/esm/send/fields.js.map +1 -1
- package/dist/esm/send/functions.js +9 -7
- package/dist/esm/send/functions.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/constants.ts +1 -1
- package/src/functions.ts +59 -66
- package/src/index.ts +22 -27
- package/src/send/depends-on.ts +62 -30
- package/src/send/fields.ts +299 -291
- package/src/send/functions.ts +151 -179
- package/src/send/index.ts +2 -2
- package/src/types.ts +21 -21
package/src/send/fields.ts
CHANGED
|
@@ -3,353 +3,361 @@ import { getDependenciesFor } from './depends-on'
|
|
|
3
3
|
import { CURRENCY_ISO_CODES } from '../constants'
|
|
4
4
|
|
|
5
5
|
export const event_config: InputField = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
custom_event_name:{
|
|
41
|
-
label: 'Custom Event Name',
|
|
42
|
-
description: 'Custom event name to send to Facebook',
|
|
43
|
-
type: 'string',
|
|
44
|
-
depends_on: getDependenciesFor('custom_event_name')
|
|
45
|
-
},
|
|
46
|
-
show_fields: {
|
|
47
|
-
label: 'Show all fields',
|
|
48
|
-
description: 'Show all fields, even those which are not relevant to the selected Event Name.',
|
|
49
|
-
type: 'boolean',
|
|
50
|
-
default: false
|
|
51
|
-
}
|
|
6
|
+
label: 'Event Configuration',
|
|
7
|
+
description: 'Specify the type of Facebook Conversions API event to send.',
|
|
8
|
+
type: 'object',
|
|
9
|
+
required: true,
|
|
10
|
+
additionalProperties: false,
|
|
11
|
+
defaultObjectUI: 'keyvalue',
|
|
12
|
+
properties: {
|
|
13
|
+
event_name: {
|
|
14
|
+
label: 'Event Name',
|
|
15
|
+
description: "Facebook Conversions API Event Name to send. Select 'Custom Event' to send a non standard event.",
|
|
16
|
+
type: 'string',
|
|
17
|
+
required: true,
|
|
18
|
+
choices: [
|
|
19
|
+
{ label: 'Custom Event', value: 'CustomEvent' },
|
|
20
|
+
{ label: 'Page View', value: 'PageView' },
|
|
21
|
+
{ label: 'Add Payment Info', value: 'AddPaymentInfo' },
|
|
22
|
+
{ label: 'Add To Cart', value: 'AddToCart' },
|
|
23
|
+
{ label: 'Add To Wishlist', value: 'AddToWishlist' },
|
|
24
|
+
{ label: 'Complete Registration', value: 'CompleteRegistration' },
|
|
25
|
+
{ label: 'Contact', value: 'Contact' },
|
|
26
|
+
{ label: 'Customize Product', value: 'CustomizeProduct' },
|
|
27
|
+
{ label: 'Donate', value: 'Donate' },
|
|
28
|
+
{ label: 'Find Location', value: 'FindLocation' },
|
|
29
|
+
{ label: 'Initiate Checkout', value: 'InitiateCheckout' },
|
|
30
|
+
{ label: 'Lead', value: 'Lead' },
|
|
31
|
+
{ label: 'Purchase', value: 'Purchase' },
|
|
32
|
+
{ label: 'Schedule', value: 'Schedule' },
|
|
33
|
+
{ label: 'Search', value: 'Search' },
|
|
34
|
+
{ label: 'Start Trial', value: 'StartTrial' },
|
|
35
|
+
{ label: 'Submit Application', value: 'SubmitApplication' },
|
|
36
|
+
{ label: 'Subscribe', value: 'Subscribe' },
|
|
37
|
+
{ label: 'View Content', value: 'ViewContent' }
|
|
38
|
+
]
|
|
52
39
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
40
|
+
custom_event_name: {
|
|
41
|
+
label: 'Custom Event Name',
|
|
42
|
+
description: 'Custom event name to send to Facebook',
|
|
43
|
+
type: 'string',
|
|
44
|
+
depends_on: getDependenciesFor('custom_event_name')
|
|
45
|
+
},
|
|
46
|
+
show_fields: {
|
|
47
|
+
label: 'Show all fields',
|
|
48
|
+
description: 'Show all fields, even those which are not relevant to the selected Event Name.',
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
default: false
|
|
57
51
|
}
|
|
52
|
+
},
|
|
53
|
+
default: {
|
|
54
|
+
event_name: 'CustomEvent',
|
|
55
|
+
custom_event_name: { '@path': '$.event' },
|
|
56
|
+
show_fields: false
|
|
57
|
+
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export const content_category: InputField = {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
label: 'Content Category',
|
|
62
|
+
description: 'The category of the content associated with the event.',
|
|
63
|
+
type: 'string',
|
|
64
|
+
default: { '@path': '$.properties.category' },
|
|
65
|
+
depends_on: getDependenciesFor('content_category')
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
export const content_name: InputField = {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
label: 'Content Name',
|
|
70
|
+
description: 'The name of the page or product associated with the event.',
|
|
71
|
+
type: 'string',
|
|
72
|
+
default: { '@path': '$.properties.name' },
|
|
73
|
+
depends_on: getDependenciesFor('content_name')
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
export const content_type: InputField = {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
label: 'Content Type',
|
|
78
|
+
description:
|
|
79
|
+
'If the IDs being passed in content_ids or contents parameter are IDs of products, then the value should be product. If product group IDs are being passed, then the value should be product_group. If no content_type is provided, Meta will match the event to every item that has the same ID, independent of its type.',
|
|
80
|
+
type: 'string',
|
|
81
|
+
choices: [
|
|
82
|
+
{ value: 'product', label: 'Product' },
|
|
83
|
+
{ value: 'product_group', label: 'Product Group' }
|
|
84
|
+
],
|
|
85
|
+
default: 'product',
|
|
86
|
+
depends_on: getDependenciesFor('content_type')
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
export const content_ids: InputField = {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
label: 'Content IDs',
|
|
91
|
+
description:
|
|
92
|
+
"Product IDs associated with the event, such as SKUs (e.g. ['ABC123', 'XYZ789']). Accepts a single string value or array of strings.",
|
|
93
|
+
type: 'string',
|
|
94
|
+
multiple: true,
|
|
95
|
+
default: { '@liquid': "{{ properties.products | map: 'product_id' }}" },
|
|
96
|
+
depends_on: getDependenciesFor('content_ids')
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
export const contents: InputField = {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
quantity: {
|
|
114
|
-
label: 'Quantity',
|
|
115
|
-
description: 'The number of items purchased.',
|
|
116
|
-
type: 'integer',
|
|
117
|
-
required: true
|
|
118
|
-
},
|
|
119
|
-
item_price: {
|
|
120
|
-
label: 'Item Price',
|
|
121
|
-
description: 'The price of the item.',
|
|
122
|
-
type: 'number'
|
|
123
|
-
}
|
|
100
|
+
label: 'Contents',
|
|
101
|
+
description:
|
|
102
|
+
'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.',
|
|
103
|
+
type: 'object',
|
|
104
|
+
multiple: true,
|
|
105
|
+
additionalProperties: true,
|
|
106
|
+
defaultObjectUI: 'keyvalue',
|
|
107
|
+
properties: {
|
|
108
|
+
id: {
|
|
109
|
+
label: 'ID',
|
|
110
|
+
description: 'The product ID of the purchased item.',
|
|
111
|
+
type: 'string',
|
|
112
|
+
required: true
|
|
124
113
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
quantity: { '@path': '$.quantity' },
|
|
131
|
-
item_price: { '@path': '$.price' }
|
|
132
|
-
}
|
|
133
|
-
]
|
|
114
|
+
quantity: {
|
|
115
|
+
label: 'Quantity',
|
|
116
|
+
description: 'The number of items purchased.',
|
|
117
|
+
type: 'integer',
|
|
118
|
+
required: true
|
|
134
119
|
},
|
|
135
|
-
|
|
136
|
-
|
|
120
|
+
item_price: {
|
|
121
|
+
label: 'Item Price',
|
|
122
|
+
description: 'The price of the item.',
|
|
123
|
+
type: 'number'
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
default: {
|
|
127
|
+
'@arrayPath': [
|
|
128
|
+
'$.properties.products',
|
|
129
|
+
{
|
|
130
|
+
id: { '@path': '$.product_id' },
|
|
131
|
+
quantity: { '@path': '$.quantity' },
|
|
132
|
+
item_price: { '@path': '$.price' }
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
depends_on: getDependenciesFor('contents')
|
|
137
|
+
}
|
|
137
138
|
|
|
138
139
|
export const currency: InputField = {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
140
|
+
label: 'Currency',
|
|
141
|
+
description: 'The currency for the value specified. Currency must be a valid ISO 4217 three-digit currency code.',
|
|
142
|
+
type: 'string',
|
|
143
|
+
default: { '@path': '$.properties.currency' },
|
|
144
|
+
depends_on: getDependenciesFor('currency'),
|
|
145
|
+
choices: (() => {
|
|
146
|
+
return [...CURRENCY_ISO_CODES].map((code) => ({
|
|
147
|
+
value: code,
|
|
148
|
+
label: code
|
|
149
|
+
}))
|
|
150
|
+
})(),
|
|
151
|
+
required: {
|
|
152
|
+
match: 'all',
|
|
153
|
+
conditions: [
|
|
154
|
+
{
|
|
155
|
+
fieldKey: 'event_config.event_name',
|
|
156
|
+
operator: 'is',
|
|
157
|
+
value: 'Purchase'
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
160
161
|
}
|
|
161
162
|
|
|
162
163
|
export const delivery_category: InputField = {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
164
|
+
label: 'Delivery Category',
|
|
165
|
+
description: 'Category of the delivery',
|
|
166
|
+
type: 'string',
|
|
167
|
+
choices: [
|
|
168
|
+
{ value: 'in_store', label: 'In Store' },
|
|
169
|
+
{ value: 'curbside', label: 'Curbside' },
|
|
170
|
+
{ value: 'home_delivery', label: 'Home Delivery' }
|
|
171
|
+
],
|
|
172
|
+
depends_on: getDependenciesFor('delivery_category')
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
export const num_items: InputField = {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
label: 'Number of Items',
|
|
177
|
+
description: 'The number of items when checkout was initiated.',
|
|
178
|
+
type: 'integer',
|
|
179
|
+
default: { '@path': '$.properties.num_items' },
|
|
180
|
+
depends_on: getDependenciesFor('num_items')
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
export const predicted_ltv: InputField = {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
label: 'Predicted LTV',
|
|
185
|
+
description: 'Predicted lifetime value of a subscriber as defined by the advertiser and expressed as an exact value.',
|
|
186
|
+
type: 'number',
|
|
187
|
+
depends_on: getDependenciesFor('predicted_ltv')
|
|
187
188
|
}
|
|
188
189
|
|
|
189
190
|
export const net_revenue: InputField = {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
label: 'Net Revenue',
|
|
192
|
+
description: 'The net revenue associated with the purchase.',
|
|
193
|
+
type: 'number',
|
|
194
|
+
default: { '@path': '$.properties.net_revenue' },
|
|
195
|
+
depends_on: getDependenciesFor('net_revenue')
|
|
195
196
|
}
|
|
196
197
|
|
|
197
198
|
export const search_string: InputField = {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
label: 'Search String',
|
|
200
|
+
description: 'The string entered by the user for the search.',
|
|
201
|
+
type: 'string',
|
|
202
|
+
default: { '@path': '$.properties.query' },
|
|
203
|
+
depends_on: getDependenciesFor('search_string')
|
|
203
204
|
}
|
|
204
205
|
|
|
205
206
|
export const status: InputField = {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
label: 'Registration Status',
|
|
208
|
+
description: 'The status of the registration. true for completed registrations, false otherwise.',
|
|
209
|
+
type: 'boolean',
|
|
210
|
+
depends_on: getDependenciesFor('status')
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
export const value: InputField = {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
214
|
+
label: 'Value',
|
|
215
|
+
description:
|
|
216
|
+
'A numeric value associated with this event. This could be a monetary value or a value in some other metric.',
|
|
217
|
+
type: 'number',
|
|
218
|
+
default: { '@path': '$.properties.value' },
|
|
219
|
+
depends_on: getDependenciesFor('value'),
|
|
220
|
+
required: {
|
|
221
|
+
match: 'all',
|
|
222
|
+
conditions: [
|
|
223
|
+
{
|
|
224
|
+
fieldKey: 'event_config.event_name',
|
|
225
|
+
operator: 'is',
|
|
226
|
+
value: 'Purchase'
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
}
|
|
228
230
|
}
|
|
229
231
|
|
|
230
232
|
export const custom_data: InputField = {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
label: 'Custom Data',
|
|
234
|
+
description: 'The custom data object can be used to pass custom properties.',
|
|
235
|
+
type: 'object',
|
|
236
|
+
additionalProperties: true,
|
|
237
|
+
defaultObjectUI: 'keyvalue'
|
|
236
238
|
}
|
|
237
239
|
|
|
238
240
|
export const eventID: InputField = {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
label: 'Event ID',
|
|
242
|
+
description:
|
|
243
|
+
'This ID can be any unique string. Event ID is used to deduplicate events sent both the server side Conversions API and the browser Pixel.',
|
|
244
|
+
type: 'string',
|
|
245
|
+
default: { '@path': '$.messageId' }
|
|
243
246
|
}
|
|
244
247
|
|
|
245
248
|
export const eventSourceUrl: InputField = {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
label: 'Event Source URL',
|
|
250
|
+
description:
|
|
251
|
+
'The URL of the page where the event occurred. Can be used to override the default URL taken from the current page.',
|
|
252
|
+
type: 'string',
|
|
253
|
+
default: { '@path': '$.context.page.url' }
|
|
250
254
|
}
|
|
251
255
|
|
|
252
256
|
export const userData: InputField = {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
ln: {
|
|
281
|
-
label: 'Last Name',
|
|
282
|
-
description: 'Last name of the user',
|
|
283
|
-
type: 'string'
|
|
284
|
-
},
|
|
285
|
-
ge: {
|
|
286
|
-
label: 'Gender',
|
|
287
|
-
description: 'Gender of the user. If unknown leave blank.',
|
|
288
|
-
type: 'string',
|
|
289
|
-
choices: [
|
|
290
|
-
{ label: 'Male', value: 'm' },
|
|
291
|
-
{ label: 'Female', value: 'f' }
|
|
292
|
-
]
|
|
293
|
-
},
|
|
294
|
-
db: {
|
|
295
|
-
label: 'Date of Birth',
|
|
296
|
-
description: 'Date of birth of the user',
|
|
297
|
-
type: 'string',
|
|
298
|
-
format: 'date'
|
|
299
|
-
},
|
|
300
|
-
ct: {
|
|
301
|
-
label: 'City',
|
|
302
|
-
description: 'City of the user',
|
|
303
|
-
type: 'string'
|
|
304
|
-
},
|
|
305
|
-
st: {
|
|
306
|
-
label: 'State',
|
|
307
|
-
description: 'State of the user. Facebook expects the 2-letter abbreviation for US states. For example, "CA" for California, or "NY" for New York.',
|
|
308
|
-
type: 'string'
|
|
309
|
-
},
|
|
310
|
-
zp: {
|
|
311
|
-
label: 'ZIP/Postal Code',
|
|
312
|
-
description: 'ZIP or postal code of the user. For example, U.S zip code: 94035, Australia zip code: 1987, France zip code: 75018, UK zip code: m11ae.',
|
|
313
|
-
type: 'string'
|
|
314
|
-
},
|
|
315
|
-
country: {
|
|
316
|
-
label: 'Country',
|
|
317
|
-
description: 'The country of the user. Facebook expects the 2-letter ISO 3166-1 alpha-2 country code. For example, "US" for the United States, or "GB" for the United Kingdom.',
|
|
318
|
-
type: 'string'
|
|
319
|
-
}
|
|
257
|
+
label: 'User Data',
|
|
258
|
+
description:
|
|
259
|
+
'User data to be sent with the event. This can include hashed identifiers like email, phone number, etc.',
|
|
260
|
+
type: 'object',
|
|
261
|
+
additionalProperties: false,
|
|
262
|
+
defaultObjectUI: 'keyvalue',
|
|
263
|
+
properties: {
|
|
264
|
+
external_id: {
|
|
265
|
+
label: 'External ID',
|
|
266
|
+
description: 'A unique identifier for the user from your system',
|
|
267
|
+
type: 'string'
|
|
268
|
+
},
|
|
269
|
+
em: {
|
|
270
|
+
label: 'Email',
|
|
271
|
+
description: 'Email address of the user',
|
|
272
|
+
type: 'string',
|
|
273
|
+
format: 'email'
|
|
274
|
+
},
|
|
275
|
+
ph: {
|
|
276
|
+
label: 'Phone Number',
|
|
277
|
+
description: 'Phone number of the user',
|
|
278
|
+
type: 'string'
|
|
279
|
+
},
|
|
280
|
+
fn: {
|
|
281
|
+
label: 'First Name',
|
|
282
|
+
description: 'First name of the user',
|
|
283
|
+
type: 'string'
|
|
320
284
|
},
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
285
|
+
ln: {
|
|
286
|
+
label: 'Last Name',
|
|
287
|
+
description: 'Last name of the user',
|
|
288
|
+
type: 'string'
|
|
289
|
+
},
|
|
290
|
+
ge: {
|
|
291
|
+
label: 'Gender',
|
|
292
|
+
description: 'Gender of the user. If unknown leave blank.',
|
|
293
|
+
type: 'string',
|
|
294
|
+
choices: [
|
|
295
|
+
{ label: 'Male', value: 'm' },
|
|
296
|
+
{ label: 'Female', value: 'f' }
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
|
+
db: {
|
|
300
|
+
label: 'Date of Birth',
|
|
301
|
+
description: 'Date of birth of the user',
|
|
302
|
+
type: 'string',
|
|
303
|
+
format: 'date'
|
|
304
|
+
},
|
|
305
|
+
ct: {
|
|
306
|
+
label: 'City',
|
|
307
|
+
description: 'City of the user',
|
|
308
|
+
type: 'string'
|
|
309
|
+
},
|
|
310
|
+
st: {
|
|
311
|
+
label: 'State',
|
|
312
|
+
description:
|
|
313
|
+
'State of the user. Facebook expects the 2-letter abbreviation for US states. For example, "CA" for California, or "NY" for New York.',
|
|
314
|
+
type: 'string'
|
|
315
|
+
},
|
|
316
|
+
zp: {
|
|
317
|
+
label: 'ZIP/Postal Code',
|
|
318
|
+
description:
|
|
319
|
+
'ZIP or postal code of the user. For example, "94025" for Menlo Park, CA, or "10001" for New York City.',
|
|
320
|
+
type: 'string'
|
|
321
|
+
},
|
|
322
|
+
country: {
|
|
323
|
+
label: 'Country',
|
|
324
|
+
description:
|
|
325
|
+
'The country of the user. Facebook expects the 2-letter ISO 3166-1 alpha-2 country code. For example, "US" for the United States, or "GB" for the United Kingdom.',
|
|
326
|
+
type: 'string'
|
|
333
327
|
}
|
|
328
|
+
},
|
|
329
|
+
default: {
|
|
330
|
+
external_id: { '@path': '$.userId' },
|
|
331
|
+
em: { '@path': '$.context.traits.email' },
|
|
332
|
+
ph: { '@path': '$.context.traits.phone' },
|
|
333
|
+
fn: { '@path': '$.context.traits.first_name' },
|
|
334
|
+
ln: { '@path': '$.context.traits.last_name' },
|
|
335
|
+
ge: { '@path': '$.context.traits.gender' },
|
|
336
|
+
db: { '@path': '$.context.traits.birthday' },
|
|
337
|
+
ct: { '@path': '$.context.traits.address.city' },
|
|
338
|
+
st: { '@path': '$.context.traits.address.state' },
|
|
339
|
+
zp: { '@path': '$.context.traits.address.postal_code' },
|
|
340
|
+
country: { '@path': '$.context.traits.address.country' }
|
|
341
|
+
}
|
|
334
342
|
}
|
|
335
343
|
|
|
336
344
|
export const AllFields = {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}
|
|
345
|
+
event_config,
|
|
346
|
+
content_category,
|
|
347
|
+
content_ids,
|
|
348
|
+
content_name,
|
|
349
|
+
content_type,
|
|
350
|
+
contents,
|
|
351
|
+
currency,
|
|
352
|
+
delivery_category,
|
|
353
|
+
num_items,
|
|
354
|
+
predicted_ltv,
|
|
355
|
+
net_revenue,
|
|
356
|
+
search_string,
|
|
357
|
+
status,
|
|
358
|
+
value,
|
|
359
|
+
custom_data,
|
|
360
|
+
eventID,
|
|
361
|
+
eventSourceUrl,
|
|
362
|
+
userData
|
|
363
|
+
}
|