@segment/action-destinations 3.331.8-staging.0 → 3.331.9-staging.1
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/destinations/absmartly/event.d.ts +9 -3
- package/dist/destinations/absmartly/event.js +0 -9
- package/dist/destinations/absmartly/event.js.map +1 -1
- package/dist/destinations/absmartly/exposure.d.ts +1 -1
- package/dist/destinations/absmartly/exposure.js +26 -10
- package/dist/destinations/absmartly/exposure.js.map +1 -1
- package/dist/destinations/absmartly/goal.d.ts +1 -2
- package/dist/destinations/absmartly/goal.js +4 -18
- package/dist/destinations/absmartly/goal.js.map +1 -1
- package/dist/destinations/absmartly/segment.d.ts +11 -0
- package/dist/destinations/absmartly/segment.js +3 -0
- package/dist/destinations/absmartly/segment.js.map +1 -0
- package/dist/destinations/absmartly/timestamp.d.ts +1 -1
- package/dist/destinations/absmartly/timestamp.js +2 -0
- package/dist/destinations/absmartly/timestamp.js.map +1 -1
- package/dist/destinations/absmartly/trackExposure/generated-types.d.ts +0 -1
- package/dist/destinations/absmartly/trackExposure/index.js +7 -2
- package/dist/destinations/absmartly/trackExposure/index.js.map +1 -1
- package/dist/destinations/absmartly/trackGoal/generated-types.d.ts +0 -2
- package/dist/destinations/absmartly/trackGoal/index.js +7 -2
- package/dist/destinations/absmartly/trackGoal/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/display-video-360/addToAudience/generated-types.d.ts +1 -1
- package/dist/destinations/display-video-360/addToAudience/index.js +3 -2
- package/dist/destinations/display-video-360/addToAudience/index.js.map +1 -1
- package/dist/destinations/display-video-360/index.js +5 -3
- package/dist/destinations/display-video-360/index.js.map +1 -1
- package/dist/destinations/display-video-360/properties.d.ts +1 -1
- package/dist/destinations/display-video-360/properties.js +14 -17
- package/dist/destinations/display-video-360/properties.js.map +1 -1
- package/dist/destinations/display-video-360/removeFromAudience/generated-types.d.ts +1 -1
- package/dist/destinations/display-video-360/removeFromAudience/index.js +3 -2
- package/dist/destinations/display-video-360/removeFromAudience/index.js.map +1 -1
- package/dist/destinations/display-video-360/shared.js +3 -3
- package/dist/destinations/display-video-360/shared.js.map +1 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +32 -3
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +1 -1
- package/dist/destinations/gleap/generated-types.d.ts +3 -0
- package/dist/destinations/gleap/generated-types.js +3 -0
- package/dist/destinations/gleap/generated-types.js.map +1 -0
- package/dist/destinations/gleap/identifyContact/generated-types.d.ts +18 -0
- package/dist/destinations/gleap/identifyContact/generated-types.js +3 -0
- package/dist/destinations/gleap/identifyContact/generated-types.js.map +1 -0
- package/dist/destinations/gleap/identifyContact/index.d.ts +5 -0
- package/dist/destinations/gleap/identifyContact/index.js +155 -0
- package/dist/destinations/gleap/identifyContact/index.js.map +1 -0
- package/dist/destinations/gleap/index.d.ts +4 -0
- package/dist/destinations/gleap/index.js +52 -0
- package/dist/destinations/gleap/index.js.map +1 -0
- package/dist/destinations/gleap/trackEvent/generated-types.d.ts +10 -0
- package/dist/destinations/gleap/trackEvent/generated-types.js +3 -0
- package/dist/destinations/gleap/trackEvent/generated-types.js.map +1 -0
- package/dist/destinations/gleap/trackEvent/index.d.ts +5 -0
- package/dist/destinations/gleap/trackEvent/index.js +111 -0
- package/dist/destinations/gleap/trackEvent/index.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.js +1 -1
- package/dist/destinations/index.js +1 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/insider/cartViewedEvent/generated-types.d.ts +1 -0
- package/dist/destinations/insider/cartViewedEvent/index.js +1 -0
- package/dist/destinations/insider/cartViewedEvent/index.js.map +1 -1
- package/dist/destinations/insider/checkoutEvent/generated-types.d.ts +1 -0
- package/dist/destinations/insider/checkoutEvent/index.js +1 -0
- package/dist/destinations/insider/checkoutEvent/index.js.map +1 -1
- package/dist/destinations/insider/insider-helpers.d.ts +3 -0
- package/dist/destinations/insider/insider-helpers.js +7 -2
- package/dist/destinations/insider/insider-helpers.js.map +1 -1
- package/dist/destinations/insider/insider-properties.d.ts +1 -0
- package/dist/destinations/insider/insider-properties.js +7 -1
- package/dist/destinations/insider/insider-properties.js.map +1 -1
- package/dist/destinations/insider/orderCompletedEvent/generated-types.d.ts +1 -0
- package/dist/destinations/insider/orderCompletedEvent/index.js +1 -0
- package/dist/destinations/insider/orderCompletedEvent/index.js.map +1 -1
- package/dist/destinations/insider/productAddedEvent/generated-types.d.ts +1 -0
- package/dist/destinations/insider/productAddedEvent/index.js +1 -0
- package/dist/destinations/insider/productAddedEvent/index.js.map +1 -1
- package/dist/destinations/insider/productListViewedEvent/generated-types.d.ts +1 -0
- package/dist/destinations/insider/productListViewedEvent/index.js +1 -0
- package/dist/destinations/insider/productListViewedEvent/index.js.map +1 -1
- package/dist/destinations/insider/productRemovedEvent/generated-types.d.ts +1 -0
- package/dist/destinations/insider/productRemovedEvent/index.js +1 -0
- package/dist/destinations/insider/productRemovedEvent/index.js.map +1 -1
- package/dist/destinations/insider/productViewedEvent/generated-types.d.ts +1 -0
- package/dist/destinations/insider/productViewedEvent/index.js +1 -0
- package/dist/destinations/insider/productViewedEvent/index.js.map +1 -1
- package/dist/destinations/insider/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/insider/trackEvent/index.js +1 -0
- package/dist/destinations/insider/trackEvent/index.js.map +1 -1
- package/dist/destinations/insider/updateUserProfile/generated-types.d.ts +1 -0
- package/dist/destinations/insider/updateUserProfile/index.js +2 -0
- package/dist/destinations/insider/updateUserProfile/index.js.map +1 -1
- package/dist/destinations/insider/userRegisteredEvent/generated-types.d.ts +1 -0
- package/dist/destinations/insider/userRegisteredEvent/index.js +1 -0
- package/dist/destinations/insider/userRegisteredEvent/index.js.map +1 -1
- package/dist/destinations/insider-audiences/insider-helpers.js +5 -0
- package/dist/destinations/insider-audiences/insider-helpers.js.map +1 -1
- package/dist/destinations/insider-audiences/insiderAudiences/generated-types.d.ts +1 -0
- package/dist/destinations/insider-audiences/insiderAudiences/index.js +6 -0
- package/dist/destinations/insider-audiences/insiderAudiences/index.js.map +1 -1
- package/dist/destinations/klaviyo/addProfileToList/generated-types.d.ts +1 -0
- package/dist/destinations/klaviyo/addProfileToList/index.js +7 -6
- package/dist/destinations/klaviyo/addProfileToList/index.js.map +1 -1
- package/dist/destinations/klaviyo/functions.d.ts +3 -3
- package/dist/destinations/klaviyo/functions.js +29 -19
- package/dist/destinations/klaviyo/functions.js.map +1 -1
- package/dist/destinations/klaviyo/properties.d.ts +1 -0
- package/dist/destinations/klaviyo/properties.js +8 -2
- package/dist/destinations/klaviyo/properties.js.map +1 -1
- package/dist/destinations/klaviyo/removeProfileFromList/generated-types.d.ts +2 -0
- package/dist/destinations/klaviyo/removeProfileFromList/index.js +18 -9
- package/dist/destinations/klaviyo/removeProfileFromList/index.js.map +1 -1
- package/dist/destinations/klaviyo/types.d.ts +12 -4
- package/dist/destinations/klaviyo/upsertProfile/index.js +1 -1
- package/dist/destinations/klaviyo/upsertProfile/index.js.map +1 -1
- package/dist/destinations/linkedin-audiences/updateAudience/index.js +15 -9
- package/dist/destinations/linkedin-audiences/updateAudience/index.js.map +1 -1
- package/dist/destinations/mixpanel/utils.d.ts +13 -0
- package/dist/destinations/mixpanel/utils.js +117 -0
- package/dist/destinations/mixpanel/utils.js.map +1 -0
- package/dist/destinations/tiktok-conversions/index.js +92 -3
- package/dist/destinations/tiktok-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -3
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +33 -24
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/generated-types.d.ts +12 -4
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js +113 -40
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/index.js +199 -48
- package/dist/destinations/tiktok-offline-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +43 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.d.ts +33 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.js +3 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.d.ts +5 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js +317 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js.map +1 -0
- package/dist/destinations/usermaven/request-params.js +8 -3
- package/dist/destinations/usermaven/request-params.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,8 +4,201 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const reportOfflineEvent_1 = __importDefault(require("./reportOfflineEvent"));
|
|
8
|
+
const productProperties = {
|
|
9
|
+
price: {
|
|
10
|
+
'@path': '$.price'
|
|
11
|
+
},
|
|
12
|
+
quantity: {
|
|
13
|
+
'@path': '$.quantity'
|
|
14
|
+
},
|
|
15
|
+
content_category: {
|
|
16
|
+
'@path': '$.category'
|
|
17
|
+
},
|
|
18
|
+
content_id: {
|
|
19
|
+
'@path': '$.product_id'
|
|
20
|
+
},
|
|
21
|
+
content_name: {
|
|
22
|
+
'@path': '$.name'
|
|
23
|
+
},
|
|
24
|
+
brand: {
|
|
25
|
+
'@path': '$.brand'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const singleProductContents = {
|
|
29
|
+
...actions_core_1.defaultValues(reportOfflineEvent_1.default.fields),
|
|
30
|
+
contents: {
|
|
31
|
+
'@arrayPath': [
|
|
32
|
+
'$.properties',
|
|
33
|
+
{
|
|
34
|
+
...productProperties
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const multiProductContents = {
|
|
40
|
+
...actions_core_1.defaultValues(reportOfflineEvent_1.default.fields),
|
|
41
|
+
contents: {
|
|
42
|
+
'@arrayPath': [
|
|
43
|
+
'$.properties.products',
|
|
44
|
+
{
|
|
45
|
+
...productProperties
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const presets = [
|
|
51
|
+
{
|
|
52
|
+
name: 'Page View',
|
|
53
|
+
subscribe: 'type="page"',
|
|
54
|
+
partnerAction: 'reportWebEvent',
|
|
55
|
+
mapping: {
|
|
56
|
+
...multiProductContents,
|
|
57
|
+
event: 'PageView'
|
|
58
|
+
},
|
|
59
|
+
type: 'automatic'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'View Content',
|
|
63
|
+
subscribe: 'event = "Product Viewed"',
|
|
64
|
+
partnerAction: 'reportWebEvent',
|
|
65
|
+
mapping: {
|
|
66
|
+
...singleProductContents,
|
|
67
|
+
event: 'ViewContent'
|
|
68
|
+
},
|
|
69
|
+
type: 'automatic'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'Click Button',
|
|
73
|
+
subscribe: 'event = "Product Clicked"',
|
|
74
|
+
partnerAction: 'reportWebEvent',
|
|
75
|
+
mapping: {
|
|
76
|
+
...singleProductContents,
|
|
77
|
+
event: 'ClickButton'
|
|
78
|
+
},
|
|
79
|
+
type: 'automatic'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'Search',
|
|
83
|
+
subscribe: 'event = "Products Searched"',
|
|
84
|
+
partnerAction: 'reportWebEvent',
|
|
85
|
+
mapping: {
|
|
86
|
+
...singleProductContents,
|
|
87
|
+
event: 'Search'
|
|
88
|
+
},
|
|
89
|
+
type: 'automatic'
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'Add to Wishlist',
|
|
93
|
+
subscribe: 'event = "Product Added to Wishlist"',
|
|
94
|
+
partnerAction: 'reportWebEvent',
|
|
95
|
+
mapping: {
|
|
96
|
+
...singleProductContents,
|
|
97
|
+
event: 'AddToWishlist'
|
|
98
|
+
},
|
|
99
|
+
type: 'automatic'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'Add to Cart',
|
|
103
|
+
subscribe: 'event = "Product Added"',
|
|
104
|
+
partnerAction: 'reportWebEvent',
|
|
105
|
+
mapping: {
|
|
106
|
+
...singleProductContents,
|
|
107
|
+
event: 'AddToCart'
|
|
108
|
+
},
|
|
109
|
+
type: 'automatic'
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'Initiate Checkout',
|
|
113
|
+
subscribe: 'event = "Checkout Started"',
|
|
114
|
+
partnerAction: 'reportWebEvent',
|
|
115
|
+
mapping: {
|
|
116
|
+
...multiProductContents,
|
|
117
|
+
event: 'InitiateCheckout'
|
|
118
|
+
},
|
|
119
|
+
type: 'automatic'
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'Add Payment Info',
|
|
123
|
+
subscribe: 'event = "Payment Info Entered"',
|
|
124
|
+
partnerAction: 'reportWebEvent',
|
|
125
|
+
mapping: {
|
|
126
|
+
...multiProductContents,
|
|
127
|
+
event: 'AddPaymentInfo'
|
|
128
|
+
},
|
|
129
|
+
type: 'automatic'
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'Place an Order',
|
|
133
|
+
subscribe: 'event = "Order Completed"',
|
|
134
|
+
partnerAction: 'reportWebEvent',
|
|
135
|
+
mapping: {
|
|
136
|
+
...multiProductContents,
|
|
137
|
+
event: 'PlaceAnOrder'
|
|
138
|
+
},
|
|
139
|
+
type: 'automatic'
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'Complete Payment',
|
|
143
|
+
subscribe: 'event = "Payment Completed"',
|
|
144
|
+
partnerAction: 'reportWebEvent',
|
|
145
|
+
mapping: {
|
|
146
|
+
...multiProductContents,
|
|
147
|
+
event: 'CompletePayment'
|
|
148
|
+
},
|
|
149
|
+
type: 'automatic'
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'Contact',
|
|
153
|
+
subscribe: 'event = "Callback Started"',
|
|
154
|
+
partnerAction: 'reportWebEvent',
|
|
155
|
+
mapping: {
|
|
156
|
+
...actions_core_1.defaultValues(reportOfflineEvent_1.default.fields),
|
|
157
|
+
event: 'Contact'
|
|
158
|
+
},
|
|
159
|
+
type: 'automatic'
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'Download',
|
|
163
|
+
subscribe: 'event = "Download Link Clicked"',
|
|
164
|
+
partnerAction: 'reportWebEvent',
|
|
165
|
+
mapping: {
|
|
166
|
+
...actions_core_1.defaultValues(reportOfflineEvent_1.default.fields),
|
|
167
|
+
event: 'Download'
|
|
168
|
+
},
|
|
169
|
+
type: 'automatic'
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'Submit Form',
|
|
173
|
+
subscribe: 'event = "Form Submitted"',
|
|
174
|
+
partnerAction: 'reportWebEvent',
|
|
175
|
+
mapping: {
|
|
176
|
+
...actions_core_1.defaultValues(reportOfflineEvent_1.default.fields),
|
|
177
|
+
event: 'SubmitForm'
|
|
178
|
+
},
|
|
179
|
+
type: 'automatic'
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'Complete Registration',
|
|
183
|
+
subscribe: 'event = "Signed Up"',
|
|
184
|
+
partnerAction: 'reportWebEvent',
|
|
185
|
+
mapping: {
|
|
186
|
+
...actions_core_1.defaultValues(reportOfflineEvent_1.default.fields),
|
|
187
|
+
event: 'CompleteRegistration'
|
|
188
|
+
},
|
|
189
|
+
type: 'automatic'
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: 'Subscribe',
|
|
193
|
+
subscribe: 'event = "Subscription Created"',
|
|
194
|
+
partnerAction: 'reportWebEvent',
|
|
195
|
+
mapping: {
|
|
196
|
+
...actions_core_1.defaultValues(reportOfflineEvent_1.default.fields),
|
|
197
|
+
event: 'Subscribe'
|
|
198
|
+
},
|
|
199
|
+
type: 'automatic'
|
|
200
|
+
}
|
|
201
|
+
];
|
|
9
202
|
const destination = {
|
|
10
203
|
name: 'TikTok Offline Conversions',
|
|
11
204
|
slug: 'actions-tiktok-offline-conversions',
|
|
@@ -15,14 +208,14 @@ const destination = {
|
|
|
15
208
|
fields: {
|
|
16
209
|
accessToken: {
|
|
17
210
|
label: 'Access Token',
|
|
18
|
-
description: 'Your TikTok Access Token. Please see TikTok’s [Events API documentation](https://
|
|
211
|
+
description: 'Your TikTok Access Token. Please see TikTok’s [Events API 2.0 documentation](https://business-api.tiktok.com/portal/docs?id=1771101130925058) for information on how to generate an access token via the TikTok Ads Manager or API.',
|
|
19
212
|
type: 'string',
|
|
20
213
|
required: true
|
|
21
214
|
},
|
|
22
215
|
eventSetID: {
|
|
23
216
|
label: 'Event Set ID',
|
|
24
217
|
type: 'string',
|
|
25
|
-
description: 'Your TikTok Offline Event Set ID. Please see TikTok’s [Events API documentation](https://
|
|
218
|
+
description: 'Your TikTok Offline Event Set ID. Please see TikTok’s [Events API 2.0 documentation](https://business-api.tiktok.com/portal/docs?id=1771101027431425) for information on how to find this value.',
|
|
26
219
|
required: true
|
|
27
220
|
}
|
|
28
221
|
},
|
|
@@ -46,51 +239,9 @@ const destination = {
|
|
|
46
239
|
}
|
|
47
240
|
};
|
|
48
241
|
},
|
|
49
|
-
presets
|
|
50
|
-
{
|
|
51
|
-
name: 'Complete Payment',
|
|
52
|
-
subscribe: 'type = "track" and event = "Order Completed"',
|
|
53
|
-
partnerAction: 'trackPaymentOfflineConversion',
|
|
54
|
-
mapping: {
|
|
55
|
-
...actions_core_1.defaultValues(trackPaymentOfflineConversion_1.default.fields),
|
|
56
|
-
event: 'CompletePayment'
|
|
57
|
-
},
|
|
58
|
-
type: 'automatic'
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: 'Contact',
|
|
62
|
-
subscribe: 'type = "track" and event = "User Contacted Call Center"',
|
|
63
|
-
partnerAction: 'trackNonPaymentOfflineConversion',
|
|
64
|
-
mapping: {
|
|
65
|
-
...actions_core_1.defaultValues(trackNonPaymentOfflineConversion_1.default.fields),
|
|
66
|
-
event: 'Contact'
|
|
67
|
-
},
|
|
68
|
-
type: 'automatic'
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: 'Subscribe',
|
|
72
|
-
subscribe: 'type = "track" and event = "User Subscribed In Store"',
|
|
73
|
-
partnerAction: 'trackNonPaymentOfflineConversion',
|
|
74
|
-
mapping: {
|
|
75
|
-
...actions_core_1.defaultValues(trackNonPaymentOfflineConversion_1.default.fields),
|
|
76
|
-
event: 'Subscribe'
|
|
77
|
-
},
|
|
78
|
-
type: 'automatic'
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: 'Submit Form',
|
|
82
|
-
subscribe: 'type = "track" and event = "Form Submitted"',
|
|
83
|
-
partnerAction: 'trackNonPaymentOfflineConversion',
|
|
84
|
-
mapping: {
|
|
85
|
-
...actions_core_1.defaultValues(trackNonPaymentOfflineConversion_1.default.fields),
|
|
86
|
-
event: 'SubmitForm'
|
|
87
|
-
},
|
|
88
|
-
type: 'automatic'
|
|
89
|
-
}
|
|
90
|
-
],
|
|
242
|
+
presets,
|
|
91
243
|
actions: {
|
|
92
|
-
|
|
93
|
-
trackNonPaymentOfflineConversion: trackNonPaymentOfflineConversion_1.default
|
|
244
|
+
reportOfflineEvent: reportOfflineEvent_1.default
|
|
94
245
|
}
|
|
95
246
|
};
|
|
96
247
|
exports.default = destination;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-offline-conversions/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-offline-conversions/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,8EAAqD;AAErD,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE;QACL,OAAO,EAAE,SAAS;KACnB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY;KACtB;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,YAAY;KACtB;IACD,UAAU,EAAE;QACV,OAAO,EAAE,cAAc;KACxB;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,QAAQ;KAClB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,SAAS;KACnB;CACF,CAAA;AAED,MAAM,qBAAqB,GAAG;IAC5B,GAAG,4BAAa,CAAC,4BAAkB,CAAC,MAAM,CAAC;IAC3C,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,cAAc;YACd;gBACE,GAAG,iBAAiB;aACrB;SACF;KACF;CACF,CAAA;AAED,MAAM,oBAAoB,GAAG;IAC3B,GAAG,4BAAa,CAAC,4BAAkB,CAAC,MAAM,CAAC;IAC3C,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,uBAAuB;YACvB;gBACE,GAAG,iBAAiB;aACrB;SACF;KACF;CACF,CAAA;AAED,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,gBAAgB;QAC/B,OAAO,EAAE;YACP,GAAG,oBAAoB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nB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatPhones = exports.formatUserIds = exports.formatEmails = void 0;
|
|
4
|
+
const crypto_1 = require("crypto");
|
|
5
|
+
const formatEmails = (email_addresses) => {
|
|
6
|
+
const result = [];
|
|
7
|
+
if (email_addresses) {
|
|
8
|
+
email_addresses.forEach((email) => {
|
|
9
|
+
result.push(hashAndEncode(email.toLowerCase()));
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return result;
|
|
13
|
+
};
|
|
14
|
+
exports.formatEmails = formatEmails;
|
|
15
|
+
function formatUserIds(userIds) {
|
|
16
|
+
const result = [];
|
|
17
|
+
if (userIds) {
|
|
18
|
+
userIds.forEach((userId) => {
|
|
19
|
+
result.push(hashAndEncode(userId.toLowerCase()));
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
exports.formatUserIds = formatUserIds;
|
|
25
|
+
const formatPhones = (phone_numbers) => {
|
|
26
|
+
const result = [];
|
|
27
|
+
if (!phone_numbers)
|
|
28
|
+
return result;
|
|
29
|
+
phone_numbers.forEach((phone) => {
|
|
30
|
+
const validatedPhone = phone.match(/[0-9]{0,14}/g);
|
|
31
|
+
if (validatedPhone === null) {
|
|
32
|
+
throw new Error(`${phone} is not a valid E.164 phone number.`);
|
|
33
|
+
}
|
|
34
|
+
const formattedPhone = `+${phone.replace(/[^0-9]/g, '')}`;
|
|
35
|
+
result.push(hashAndEncode(formattedPhone.substring(0, 15)));
|
|
36
|
+
});
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
exports.formatPhones = formatPhones;
|
|
40
|
+
function hashAndEncode(property) {
|
|
41
|
+
return crypto_1.createHash('sha256').update(property).digest('hex');
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAK5B,MAAM,YAAY,GAAG,CAAC,eAAqC,EAAY,EAAE;IAC9E,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,IAAI,eAAe,EAAE;QACnB,eAAe,CAAC,OAAO,CAAC,CAAC,KAAa,EAAE,EAAE;YACxC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAA;QACjD,CAAC,CAAC,CAAA;KACH;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AARY,QAAA,YAAY,gBAQxB;AAOD,SAAgB,aAAa,CAAC,OAA6B;IACzD,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,IAAI,OAAO,EAAE;QACX,OAAO,CAAC,OAAO,CAAC,CAAC,MAAc,EAAE,EAAE;YACjC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAA;QAClD,CAAC,CAAC,CAAA;KACH;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AARD,sCAQC;AAOM,MAAM,YAAY,GAAG,CAAC,aAAmC,EAAY,EAAE;IAC5E,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,IAAI,CAAC,aAAa;QAAE,OAAO,MAAM,CAAA;IAEjC,aAAa,CAAC,OAAO,CAAC,CAAC,KAAa,EAAE,EAAE;QACtC,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;QAClD,IAAI,cAAc,KAAK,IAAI,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qCAAqC,CAAC,CAAA;SAC/D;QAED,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAA;QAEzD,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;IAC7D,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAhBY,QAAA,YAAY,gBAgBxB;AAED,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
event: string;
|
|
3
|
+
event_id?: string;
|
|
4
|
+
timestamp?: string;
|
|
5
|
+
phone_numbers?: string[];
|
|
6
|
+
emails?: string[];
|
|
7
|
+
external_ids?: string[];
|
|
8
|
+
ttclid?: string;
|
|
9
|
+
ttp?: string;
|
|
10
|
+
lead_id?: string;
|
|
11
|
+
locale?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
referrer?: string;
|
|
14
|
+
ip?: string;
|
|
15
|
+
user_agent?: string;
|
|
16
|
+
contents?: {
|
|
17
|
+
price?: number;
|
|
18
|
+
quantity?: number;
|
|
19
|
+
content_category?: string;
|
|
20
|
+
content_id?: string;
|
|
21
|
+
content_name?: string;
|
|
22
|
+
brand?: string;
|
|
23
|
+
}[];
|
|
24
|
+
content_type?: string;
|
|
25
|
+
currency?: string;
|
|
26
|
+
value?: number;
|
|
27
|
+
description?: string;
|
|
28
|
+
query?: string;
|
|
29
|
+
order_id?: string;
|
|
30
|
+
shop_id?: string;
|
|
31
|
+
limited_data_use?: boolean;
|
|
32
|
+
test_event_code?: string;
|
|
33
|
+
}
|
package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.ts"],"names":[],"mappings":""}
|