@segment/action-destinations 3.225.0 → 3.227.0-actions-hooks
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/apolloio/generated-types.d.ts +3 -0
- package/dist/destinations/apolloio/generated-types.js +3 -0
- package/dist/destinations/apolloio/generated-types.js.map +1 -0
- package/dist/destinations/apolloio/index.d.ts +7 -0
- package/dist/destinations/apolloio/index.js +58 -0
- package/dist/destinations/apolloio/index.js.map +1 -0
- package/dist/destinations/apolloio/track/generated-types.d.ts +25 -0
- package/dist/destinations/apolloio/track/generated-types.js +3 -0
- package/dist/destinations/apolloio/track/generated-types.js.map +1 -0
- package/dist/destinations/apolloio/track/index.d.ts +5 -0
- package/dist/destinations/apolloio/track/index.js +162 -0
- package/dist/destinations/apolloio/track/index.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/braze/identifyUser/generated-types.d.ts +1 -0
- package/dist/destinations/braze/identifyUser/index.js +11 -1
- package/dist/destinations/braze/identifyUser/index.js.map +1 -1
- package/dist/destinations/braze-cohorts/index.js +1 -0
- package/dist/destinations/braze-cohorts/index.js.map +1 -1
- package/dist/destinations/display-video-360/addToAudience/generated-types.d.ts +2 -0
- package/dist/destinations/display-video-360/addToAudience/generated-types.js +3 -0
- package/dist/destinations/display-video-360/addToAudience/generated-types.js.map +1 -0
- package/dist/destinations/display-video-360/addToAudience/index.d.ts +5 -0
- package/dist/destinations/display-video-360/addToAudience/index.js +12 -0
- package/dist/destinations/display-video-360/addToAudience/index.js.map +1 -0
- package/dist/destinations/display-video-360/constants.d.ts +4 -0
- package/dist/destinations/display-video-360/constants.js +8 -0
- package/dist/destinations/display-video-360/constants.js.map +1 -0
- package/dist/destinations/display-video-360/generated-types.d.ts +5 -0
- package/dist/destinations/display-video-360/generated-types.js +3 -0
- package/dist/destinations/display-video-360/generated-types.js.map +1 -0
- package/dist/destinations/display-video-360/index.d.ts +4 -0
- package/dist/destinations/display-video-360/index.js +115 -0
- package/dist/destinations/display-video-360/index.js.map +1 -0
- package/dist/destinations/display-video-360/removeFromAudience/generated-types.d.ts +2 -0
- package/dist/destinations/display-video-360/removeFromAudience/generated-types.js +3 -0
- package/dist/destinations/display-video-360/removeFromAudience/generated-types.js.map +1 -0
- package/dist/destinations/display-video-360/removeFromAudience/index.d.ts +5 -0
- package/dist/destinations/display-video-360/removeFromAudience/index.js +12 -0
- package/dist/destinations/display-video-360/removeFromAudience/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +1 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/utils/track.d.ts +9 -9
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +3 -1
- package/dist/destinations/google-enhanced-conversions/functions.js +37 -1
- package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/types.d.ts +12 -0
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +8 -2
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +8 -2
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +10 -2
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -1
- package/dist/destinations/index.js +6 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/insider/cartViewedEvent/index.js +6 -0
- package/dist/destinations/insider/cartViewedEvent/index.js.map +1 -1
- package/dist/destinations/insider/checkoutEvent/index.js +6 -0
- package/dist/destinations/insider/checkoutEvent/index.js.map +1 -1
- package/dist/destinations/insider/insider-helpers.d.ts +32 -0
- package/dist/destinations/insider/insider-helpers.js +162 -1
- package/dist/destinations/insider/insider-helpers.js.map +1 -1
- package/dist/destinations/insider/orderCompletedEvent/index.js +6 -0
- package/dist/destinations/insider/orderCompletedEvent/index.js.map +1 -1
- package/dist/destinations/insider/productAddedEvent/index.js +6 -0
- package/dist/destinations/insider/productAddedEvent/index.js.map +1 -1
- package/dist/destinations/insider/productListViewedEvent/index.js +6 -0
- package/dist/destinations/insider/productListViewedEvent/index.js.map +1 -1
- package/dist/destinations/insider/productRemovedEvent/index.js +6 -0
- package/dist/destinations/insider/productRemovedEvent/index.js.map +1 -1
- package/dist/destinations/insider/productViewedEvent/index.js +6 -0
- package/dist/destinations/insider/productViewedEvent/index.js.map +1 -1
- package/dist/destinations/insider/trackEvent/index.js +6 -0
- package/dist/destinations/insider/trackEvent/index.js.map +1 -1
- package/dist/destinations/insider/updateUserProfile/index.js +6 -0
- package/dist/destinations/insider/updateUserProfile/index.js.map +1 -1
- package/dist/destinations/insider/userRegisteredEvent/index.js +6 -0
- package/dist/destinations/insider/userRegisteredEvent/index.js.map +1 -1
- package/dist/destinations/insider-audiences/insider-helpers.js +1 -2
- package/dist/destinations/insider-audiences/insider-helpers.js.map +1 -1
- package/dist/destinations/linkedin-conversions/streamConversion/generated-types.d.ts +15 -0
- package/dist/destinations/linkedin-conversions/streamConversion/index.d.ts +2 -2
- package/dist/destinations/linkedin-conversions/streamConversion/index.js +81 -1
- package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/addToList/generated-types.d.ts +2 -0
- package/dist/destinations/marketo-static-lists/addToList/generated-types.js +3 -0
- package/dist/destinations/marketo-static-lists/addToList/generated-types.js.map +1 -0
- package/dist/destinations/marketo-static-lists/addToList/index.d.ts +5 -0
- package/dist/destinations/marketo-static-lists/addToList/index.js +12 -0
- package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -0
- package/dist/destinations/marketo-static-lists/generated-types.d.ts +2 -0
- package/dist/destinations/marketo-static-lists/generated-types.js +3 -0
- package/dist/destinations/marketo-static-lists/generated-types.js.map +1 -0
- package/dist/destinations/marketo-static-lists/index.d.ts +4 -0
- package/dist/destinations/marketo-static-lists/index.js +29 -0
- package/dist/destinations/marketo-static-lists/index.js.map +1 -0
- package/dist/destinations/marketo-static-lists/removeFromList/generated-types.d.ts +2 -0
- package/dist/destinations/marketo-static-lists/removeFromList/generated-types.js +3 -0
- package/dist/destinations/marketo-static-lists/removeFromList/generated-types.js.map +1 -0
- package/dist/destinations/marketo-static-lists/removeFromList/index.d.ts +5 -0
- package/dist/destinations/marketo-static-lists/removeFromList/index.js +12 -0
- package/dist/destinations/marketo-static-lists/removeFromList/index.js.map +1 -0
- 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/movable-ink/categoryView/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js +3 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/categoryView/index.d.ts +5 -0
- package/dist/destinations/movable-ink/categoryView/index.js +43 -0
- package/dist/destinations/movable-ink/categoryView/index.js.map +1 -0
- package/dist/destinations/movable-ink/conversion/generated-types.d.ts +20 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js +3 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/conversion/index.d.ts +5 -0
- package/dist/destinations/movable-ink/conversion/index.js +45 -0
- package/dist/destinations/movable-ink/conversion/index.js.map +1 -0
- package/dist/destinations/movable-ink/fields.d.ts +21 -0
- package/dist/destinations/movable-ink/fields.js +236 -0
- package/dist/destinations/movable-ink/fields.js.map +1 -0
- package/dist/destinations/movable-ink/generated-types.d.ts +5 -0
- package/dist/destinations/movable-ink/generated-types.js +3 -0
- package/dist/destinations/movable-ink/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/identify/generated-types.d.ts +7 -0
- package/dist/destinations/movable-ink/identify/generated-types.js +3 -0
- package/dist/destinations/movable-ink/identify/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/identify/index.d.ts +5 -0
- package/dist/destinations/movable-ink/identify/index.js +32 -0
- package/dist/destinations/movable-ink/identify/index.js.map +1 -0
- package/dist/destinations/movable-ink/index.d.ts +4 -0
- package/dist/destinations/movable-ink/index.js +70 -0
- package/dist/destinations/movable-ink/index.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productAdded/index.js +43 -0
- package/dist/destinations/movable-ink/productAdded/index.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +21 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productViewed/index.js +43 -0
- package/dist/destinations/movable-ink/productViewed/index.js.map +1 -0
- package/dist/destinations/movable-ink/search/generated-types.d.ts +12 -0
- package/dist/destinations/movable-ink/search/generated-types.js +3 -0
- package/dist/destinations/movable-ink/search/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/search/index.d.ts +5 -0
- package/dist/destinations/movable-ink/search/index.js +43 -0
- package/dist/destinations/movable-ink/search/index.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +25 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +3 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +5 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js +48 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +1 -0
- package/dist/destinations/movable-ink/sendEntireEvent/generated-types.d.ts +11 -0
- package/dist/destinations/movable-ink/sendEntireEvent/generated-types.js +3 -0
- package/dist/destinations/movable-ink/sendEntireEvent/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/sendEntireEvent/index.d.ts +5 -0
- package/dist/destinations/movable-ink/sendEntireEvent/index.js +79 -0
- package/dist/destinations/movable-ink/sendEntireEvent/index.js.map +1 -0
- package/dist/destinations/salesforce-marketing-cloud/sfmc-properties.js +1 -1
- package/dist/destinations/salesforce-marketing-cloud/sfmc-properties.js.map +1 -1
- package/dist/destinations/the-trade-desk-crm/functions.js +16 -4
- package/dist/destinations/the-trade-desk-crm/functions.js.map +1 -1
- package/dist/destinations/tiktok-audiences/addUser/index.js +2 -2
- package/dist/destinations/tiktok-audiences/addUser/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/removeUser/index.js +2 -2
- package/dist/destinations/tiktok-audiences/removeUser/index.js.map +1 -1
- package/dist/destinations/usermotion/generated-types.d.ts +3 -0
- package/dist/destinations/usermotion/generated-types.js +3 -0
- package/dist/destinations/usermotion/generated-types.js.map +1 -0
- package/dist/destinations/usermotion/group/generated-types.d.ts +7 -0
- package/dist/destinations/usermotion/group/generated-types.js +3 -0
- package/dist/destinations/usermotion/group/generated-types.js.map +1 -0
- package/dist/destinations/usermotion/group/index.d.ts +5 -0
- package/dist/destinations/usermotion/group/index.js +48 -0
- package/dist/destinations/usermotion/group/index.js.map +1 -0
- package/dist/destinations/usermotion/identify/generated-types.d.ts +8 -0
- package/dist/destinations/usermotion/identify/generated-types.js +3 -0
- package/dist/destinations/usermotion/identify/generated-types.js.map +1 -0
- package/dist/destinations/usermotion/identify/index.d.ts +5 -0
- package/dist/destinations/usermotion/identify/index.js +57 -0
- package/dist/destinations/usermotion/identify/index.js.map +1 -0
- package/dist/destinations/usermotion/index.d.ts +4 -0
- package/dist/destinations/usermotion/index.js +65 -0
- package/dist/destinations/usermotion/index.js.map +1 -0
- package/dist/destinations/usermotion/track/generated-types.d.ts +9 -0
- package/dist/destinations/usermotion/track/generated-types.js +3 -0
- package/dist/destinations/usermotion/track/generated-types.js.map +1 -0
- package/dist/destinations/usermotion/track/index.d.ts +5 -0
- package/dist/destinations/usermotion/track/index.js +72 -0
- package/dist/destinations/usermotion/track/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.d.ts +4 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js +3 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.d.ts +5 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js +33 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.d.ts +6 -0
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.js +3 -0
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createSegment/index.d.ts +5 -0
- package/dist/destinations/yahoo-audiences/createSegment/index.js +45 -0
- package/dist/destinations/yahoo-audiences/createSegment/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/index.js +25 -11
- package/dist/destinations/yahoo-audiences/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/updateSegment/generated-types.d.ts +1 -2
- package/dist/destinations/yahoo-audiences/updateSegment/index.js +48 -44
- package/dist/destinations/yahoo-audiences/updateSegment/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/utils-rt.d.ts +2 -0
- package/dist/destinations/yahoo-audiences/utils-rt.js +72 -17
- package/dist/destinations/yahoo-audiences/utils-rt.js.map +1 -1
- package/dist/destinations/yahoo-audiences/utils-tax.d.ts +2 -1
- package/dist/destinations/yahoo-audiences/utils-tax.js +7 -1
- package/dist/destinations/yahoo-audiences/utils-tax.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sendTrackEvent = exports.userProfilePayload = exports.UPSERT_ENDPOINT = exports.API_BASE = void 0;
|
|
3
|
+
exports.sendBulkTrackEvents = exports.bulkUserProfilePayload = exports.sendTrackEvent = exports.userProfilePayload = exports.UPSERT_ENDPOINT = exports.API_BASE = void 0;
|
|
4
4
|
exports.API_BASE = 'https://unification.useinsider.com/api/';
|
|
5
5
|
exports.UPSERT_ENDPOINT = 'user/v1/upsert';
|
|
6
6
|
function userProfilePayload(data) {
|
|
@@ -152,4 +152,165 @@ function sendTrackEvent(data, event_name) {
|
|
|
152
152
|
return { users: [payload] };
|
|
153
153
|
}
|
|
154
154
|
exports.sendTrackEvent = sendTrackEvent;
|
|
155
|
+
function bulkUserProfilePayload(data) {
|
|
156
|
+
const batchPayload = data.map((userPayload) => {
|
|
157
|
+
const identifiers = {
|
|
158
|
+
uuid: userPayload.uuid,
|
|
159
|
+
custom: {
|
|
160
|
+
segment_anonymous_id: userPayload.segment_anonymous_id
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
if (userPayload.email_as_identifier) {
|
|
164
|
+
identifiers['email'] = userPayload.email;
|
|
165
|
+
}
|
|
166
|
+
if (userPayload.phone_number_as_identifier) {
|
|
167
|
+
identifiers['phone_number'] = userPayload.phone;
|
|
168
|
+
}
|
|
169
|
+
const attributes = {
|
|
170
|
+
age: userPayload.age,
|
|
171
|
+
birthday: userPayload.birthday,
|
|
172
|
+
email: userPayload.email,
|
|
173
|
+
name: userPayload.firstName,
|
|
174
|
+
gender: userPayload.gender,
|
|
175
|
+
surname: userPayload.lastName,
|
|
176
|
+
phone_number: userPayload.phone,
|
|
177
|
+
city: userPayload.city,
|
|
178
|
+
country: userPayload.country,
|
|
179
|
+
gdpr_optin: userPayload.gdprOptin,
|
|
180
|
+
email_optin: userPayload.emailOptin,
|
|
181
|
+
sms_optin: userPayload.smsOptin,
|
|
182
|
+
whatsapp_optin: userPayload.whatsappOptin,
|
|
183
|
+
language: userPayload.language?.replace('-', '_'),
|
|
184
|
+
custom: userPayload.custom
|
|
185
|
+
};
|
|
186
|
+
Object.keys(attributes).forEach((key) => {
|
|
187
|
+
if (attributes[key] === undefined) {
|
|
188
|
+
delete attributes[key];
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
Object.keys(identifiers).forEach((key) => {
|
|
192
|
+
if (identifiers[key] === undefined) {
|
|
193
|
+
delete identifiers[key];
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
return { identifiers, attributes };
|
|
197
|
+
});
|
|
198
|
+
return { users: batchPayload };
|
|
199
|
+
}
|
|
200
|
+
exports.bulkUserProfilePayload = bulkUserProfilePayload;
|
|
201
|
+
function sendBulkTrackEvents(dataArray, event_name) {
|
|
202
|
+
const bulkPayload = [];
|
|
203
|
+
dataArray.forEach((data) => {
|
|
204
|
+
const addEventParameters = function (event, data, parameter) {
|
|
205
|
+
parameter = parameter.toString().toLowerCase().trim().split(' ').join('_');
|
|
206
|
+
if (parameter === 'taxonomy') {
|
|
207
|
+
event.event_params[parameter] = [data[parameter]];
|
|
208
|
+
}
|
|
209
|
+
else if (defaultEvents.indexOf(parameter) > -1) {
|
|
210
|
+
event.event_params[parameter] = data[parameter];
|
|
211
|
+
}
|
|
212
|
+
else if (data) {
|
|
213
|
+
event.event_params.custom[parameter] = data[parameter];
|
|
214
|
+
}
|
|
215
|
+
return event;
|
|
216
|
+
};
|
|
217
|
+
const identifiers = {
|
|
218
|
+
uuid: data.uuid,
|
|
219
|
+
custom: {
|
|
220
|
+
segment_anonymous_id: data.segment_anonymous_id
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
if (data.email_as_identifier && data?.attributes?.email) {
|
|
224
|
+
identifiers['email'] = data?.attributes?.email;
|
|
225
|
+
}
|
|
226
|
+
if (data.phone_number_as_identifier && data?.attributes?.phone) {
|
|
227
|
+
identifiers['phone_number'] = data?.attributes?.phone;
|
|
228
|
+
}
|
|
229
|
+
const payload = {
|
|
230
|
+
identifiers,
|
|
231
|
+
attributes: {
|
|
232
|
+
custom: {}
|
|
233
|
+
},
|
|
234
|
+
events: []
|
|
235
|
+
};
|
|
236
|
+
const defaultAttributes = [
|
|
237
|
+
'email',
|
|
238
|
+
'phone',
|
|
239
|
+
'age',
|
|
240
|
+
'birthday',
|
|
241
|
+
'name',
|
|
242
|
+
'gender',
|
|
243
|
+
'surname',
|
|
244
|
+
'city',
|
|
245
|
+
'country',
|
|
246
|
+
'app_version',
|
|
247
|
+
'idfa',
|
|
248
|
+
'model',
|
|
249
|
+
'last_ip',
|
|
250
|
+
'carrier',
|
|
251
|
+
'os_version',
|
|
252
|
+
'platform',
|
|
253
|
+
'timezone',
|
|
254
|
+
'locale'
|
|
255
|
+
];
|
|
256
|
+
const defaultEvents = [
|
|
257
|
+
'campaign_id',
|
|
258
|
+
'campaign_name',
|
|
259
|
+
'url',
|
|
260
|
+
'product_id',
|
|
261
|
+
'user_agent',
|
|
262
|
+
'taxonomy',
|
|
263
|
+
'name',
|
|
264
|
+
'variant_id',
|
|
265
|
+
'unit_sale_price',
|
|
266
|
+
'unit_price',
|
|
267
|
+
'quantity',
|
|
268
|
+
'product_image_url',
|
|
269
|
+
'event_group_id',
|
|
270
|
+
'referrer',
|
|
271
|
+
'currency'
|
|
272
|
+
];
|
|
273
|
+
for (const key of Object.keys(data.attributes || {})) {
|
|
274
|
+
const attributeName = key.toString().toLowerCase().trim().split(' ').join('_').toString();
|
|
275
|
+
if (attributeName === 'locale' && data.attributes) {
|
|
276
|
+
payload.attributes[attributeName] = data.attributes[attributeName]
|
|
277
|
+
?.split('-')
|
|
278
|
+
.join('_');
|
|
279
|
+
}
|
|
280
|
+
else if (defaultAttributes.indexOf(attributeName) > -1 && data.attributes) {
|
|
281
|
+
payload.attributes[attributeName] = data.attributes[attributeName];
|
|
282
|
+
}
|
|
283
|
+
else if (data.attributes) {
|
|
284
|
+
payload.attributes.custom[attributeName] =
|
|
285
|
+
data.attributes[attributeName];
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
const eventName = event_name || data.event_name.toString().toLowerCase().trim().split(' ').join('_').toString();
|
|
289
|
+
let event = {
|
|
290
|
+
event_name: eventName,
|
|
291
|
+
timestamp: data.timestamp.toString(),
|
|
292
|
+
event_params: {
|
|
293
|
+
custom: {}
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
for (const key of Object.keys(data.parameters || {})) {
|
|
297
|
+
event = addEventParameters(event, data.parameters, key);
|
|
298
|
+
}
|
|
299
|
+
if (data.products) {
|
|
300
|
+
for (const product of data.products) {
|
|
301
|
+
let productEvent = event;
|
|
302
|
+
for (const key of Object.keys(product || {})) {
|
|
303
|
+
productEvent = addEventParameters(productEvent, product, key);
|
|
304
|
+
}
|
|
305
|
+
payload.events.push(productEvent);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
payload.events.push(event);
|
|
310
|
+
}
|
|
311
|
+
bulkPayload.push(payload);
|
|
312
|
+
});
|
|
313
|
+
return { users: bulkPayload };
|
|
314
|
+
}
|
|
315
|
+
exports.sendBulkTrackEvents = sendBulkTrackEvents;
|
|
155
316
|
//# sourceMappingURL=insider-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insider-helpers.js","sourceRoot":"","sources":["../../../src/destinations/insider/insider-helpers.ts"],"names":[],"mappings":";;;AAWa,QAAA,QAAQ,GAAG,yCAAyC,CAAA;AACpD,QAAA,eAAe,GAAG,gBAAgB,CAAA;AAiB/C,SAAgB,kBAAkB,CAAC,IAAiB;IAClD,MAAM,WAAW,GAAG;QAClB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,MAAM,EAAE;YACN,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;SAChD;KACF,CAAA;IAED,IAAI,IAAI,CAAC,mBAAmB,EAAE;QAG5B,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAA;KA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AU,EAAE,GAAG,CAAC,CAAA;KACxD;IAID,IAAI,IAAI,CAAC,QAAQ,EAAE;QAGjB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACnC,IAAI,YAAY,GAAG,KAAK,CAAA;YAExB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE;gBAC5C,YAAY,GAAG,kBAAkB,CAAC,YAAY,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;aAC9D;YAED,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;SAClC;KACF;SAAM;QACL,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;KAC3B;IAED,OAAO,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAA;AAC7B,CAAC;AAnLD,wCAmLC"}
|
|
1
|
+
{"version":3,"file":"insider-helpers.js","sourceRoot":"","sources":["../../../src/destinations/insider/insider-helpers.ts"],"names":[],"mappings":";;;AAWa,QAAA,QAAQ,GAAG,yCAAyC,CAAA;AACpD,QAAA,eAAe,GAAG,gBAAgB,CAAA;AAiB/C,SAAgB,kBAAkB,CAAC,IAAiB;IAClD,MAAM,WAAW,GAAG;QAClB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,MAAM,EAAE;YACN,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;SAChD;KACF,CAAA;IAED,IAAI,IAAI,CAAC,mBAAmB,EAAE;QAG5B,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAA;KAClC;IAED,IAAI,IAAI,CAAC,0BAA0B,EAAE;QAGnC,WAAW,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,KAAK,CAAA;KACzC;IAED,OAAO;QACL,KAAK,EAAE;YACL;gBACE,WAAW;gBACX,UAAU,EAAE;oBACV,GAAG,EAAE,IAAI,CAAC,GAAG;oBACb,QAAQ,EAAE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AI,CAAC,SAAS,CAAC,QAAQ,EAAE;YACpC,YAAY,EAAE;gBAGZ,MAAM,EAAE,EAAE;aACX;SACF,CAAA;QAID,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,EAAE;YAGpD,KAAK,GAAG,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAA;SACxD;QAID,IAAI,IAAI,CAAC,QAAQ,EAAE;YAGjB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACnC,IAAI,YAAY,GAAG,KAAK,CAAA;gBAExB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE;oBAC5C,YAAY,GAAG,kBAAkB,CAAC,YAAY,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;iBAC9D;gBAED,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;aAClC;SACF;aAAM;YACL,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;SAC3B;QAED,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC3B,CAAC,CAAC,CAAA;IAEF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,CAAA;AAC/B,CAAC;AA7LD,kDA6LC"}
|
|
@@ -21,6 +21,12 @@ const action = {
|
|
|
21
21
|
method: 'post',
|
|
22
22
|
json: insider_helpers_1.sendTrackEvent(data.payload, 'confirmation_page_view')
|
|
23
23
|
});
|
|
24
|
+
},
|
|
25
|
+
performBatch: (request, data) => {
|
|
26
|
+
return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
|
|
27
|
+
method: 'post',
|
|
28
|
+
json: insider_helpers_1.sendBulkTrackEvents(data.payload, 'confirmation_page_view')
|
|
29
|
+
});
|
|
24
30
|
}
|
|
25
31
|
};
|
|
26
32
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/orderCompletedEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAS8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/orderCompletedEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAS8B;AAC9B,wDAAmG;AAEnG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EAAE,yCAAyC;IACtD,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,mBAAmB,EAAE,EAAE,GAAG,wCAAmB,EAAE;QAC/C,0BAA0B,EAAE,EAAE,GAAG,+CAA0B,EAAE;QAC7D,IAAI,EAAE,EAAE,GAAG,yBAAI,EAAE;QACjB,oBAAoB,EAAE,EAAE,GAAG,yCAAoB,EAAE;QACjD,SAAS,EAAE,EAAE,GAAG,8BAAS,EAAE;QAC3B,UAAU,EAAE,EAAE,GAAG,2CAAsB,EAAE;QACzC,QAAQ,EAAE,EAAE,GAAG,6BAAQ,EAAE;QACzB,UAAU,EAAE,EAAE,GAAG,oCAAe,EAAE;KACnC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,gCAAc,CAAC,IAAI,CAAC,OAAO,EAAE,wBAAwB,CAAC;SAC7D,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,qCAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,wBAAwB,CAAC;SAClE,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -33,6 +33,12 @@ const action = {
|
|
|
33
33
|
method: 'post',
|
|
34
34
|
json: insider_helpers_1.sendTrackEvent(data.payload, 'item_added_to_cart')
|
|
35
35
|
});
|
|
36
|
+
},
|
|
37
|
+
performBatch: (request, data) => {
|
|
38
|
+
return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
|
|
39
|
+
method: 'post',
|
|
40
|
+
json: insider_helpers_1.sendBulkTrackEvents(data.payload, 'item_added_to_cart')
|
|
41
|
+
});
|
|
36
42
|
}
|
|
37
43
|
};
|
|
38
44
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/productAddedEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAQ8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/productAddedEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAQ8B;AAC9B,wDAAmG;AAEnG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,uCAAuC;IACpD,mBAAmB,EAAE,4CAA4C;IACjE,MAAM,EAAE;QACN,mBAAmB,EAAE,EAAE,GAAG,wCAAmB,EAAE;QAC/C,0BAA0B,EAAE,EAAE,GAAG,+CAA0B,EAAE;QAC7D,IAAI,EAAE,EAAE,GAAG,yBAAI,EAAE;QACjB,oBAAoB,EAAE,EAAE,GAAG,yCAAoB,EAAE;QACjD,SAAS,EAAE,EAAE,GAAG,8BAAS,EAAE;QAC3B,UAAU,EAAE;YACV,GAAG,wCAAmB,CAAC;gBACrB,UAAU;gBACV,KAAK;gBACL,UAAU;gBACV,YAAY;gBACZ,iBAAiB;gBACjB,UAAU;gBACV,YAAY;gBACZ,MAAM;gBACN,mBAAmB;gBACnB,UAAU;aACX,CAAC;SACH;QACD,UAAU,EAAE,EAAE,GAAG,oCAAe,EAAE;KACnC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,gCAAc,CAAC,IAAI,CAAC,OAAO,EAAE,oBAAoB,CAAC;SACzD,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,qCAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,oBAAoB,CAAC;SAC9D,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -20,6 +20,12 @@ const action = {
|
|
|
20
20
|
method: 'post',
|
|
21
21
|
json: insider_helpers_1.sendTrackEvent(data.payload, 'listing_page_view')
|
|
22
22
|
});
|
|
23
|
+
},
|
|
24
|
+
performBatch: (request, data) => {
|
|
25
|
+
return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
|
|
26
|
+
method: 'post',
|
|
27
|
+
json: insider_helpers_1.sendBulkTrackEvents(data.payload, 'listing_page_view')
|
|
28
|
+
});
|
|
23
29
|
}
|
|
24
30
|
};
|
|
25
31
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/productListViewedEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAQ8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/productListViewedEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAQ8B;AAC9B,wDAAmG;AAEnG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,2BAA2B;IAClC,WAAW,EAAE,2CAA2C;IACxD,mBAAmB,EAAE,kDAAkD;IACvE,MAAM,EAAE;QACN,mBAAmB,EAAE,EAAE,GAAG,wCAAmB,EAAE;QAC/C,0BAA0B,EAAE,EAAE,GAAG,+CAA0B,EAAE;QAC7D,IAAI,EAAE,EAAE,GAAG,yBAAI,EAAE;QACjB,oBAAoB,EAAE,EAAE,GAAG,yCAAoB,EAAE;QACjD,SAAS,EAAE,EAAE,GAAG,8BAAS,EAAE;QAC3B,UAAU,EAAE,EAAE,GAAG,wCAAmB,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE;QACvE,UAAU,EAAE,EAAE,GAAG,oCAAe,EAAE;KACnC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,gCAAc,CAAC,IAAI,CAAC,OAAO,EAAE,mBAAmB,CAAC;SACxD,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,qCAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,mBAAmB,CAAC;SAC7D,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -33,6 +33,12 @@ const action = {
|
|
|
33
33
|
method: 'post',
|
|
34
34
|
json: insider_helpers_1.sendTrackEvent(data.payload, 'item_removed_from_cart')
|
|
35
35
|
});
|
|
36
|
+
},
|
|
37
|
+
performBatch: (request, data) => {
|
|
38
|
+
return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
|
|
39
|
+
method: 'post',
|
|
40
|
+
json: insider_helpers_1.sendBulkTrackEvents(data.payload, 'item_removed_from_cart')
|
|
41
|
+
});
|
|
36
42
|
}
|
|
37
43
|
};
|
|
38
44
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/productRemovedEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAQ8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/productRemovedEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAQ8B;AAC9B,wDAAmG;AAEnG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EAAE,yCAAyC;IACtD,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,mBAAmB,EAAE,EAAE,GAAG,wCAAmB,EAAE;QAC/C,0BAA0B,EAAE,EAAE,GAAG,+CAA0B,EAAE;QAC7D,IAAI,EAAE,EAAE,GAAG,yBAAI,EAAE;QACjB,oBAAoB,EAAE,EAAE,GAAG,yCAAoB,EAAE;QACjD,SAAS,EAAE,EAAE,GAAG,8BAAS,EAAE;QAC3B,UAAU,EAAE;YACV,GAAG,wCAAmB,CAAC;gBACrB,UAAU;gBACV,KAAK;gBACL,UAAU;gBACV,YAAY;gBACZ,iBAAiB;gBACjB,UAAU;gBACV,YAAY;gBACZ,MAAM;gBACN,mBAAmB;gBACnB,UAAU;aACX,CAAC;SACH;QACD,UAAU,EAAE,EAAE,GAAG,oCAAe,EAAE;KACnC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,gCAAc,CAAC,IAAI,CAAC,OAAO,EAAE,wBAAwB,CAAC;SAC7D,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,qCAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,wBAAwB,CAAC;SAClE,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -33,6 +33,12 @@ const action = {
|
|
|
33
33
|
method: 'post',
|
|
34
34
|
json: insider_helpers_1.sendTrackEvent(data.payload, 'product_detail_page_view')
|
|
35
35
|
});
|
|
36
|
+
},
|
|
37
|
+
performBatch: (request, data) => {
|
|
38
|
+
return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
|
|
39
|
+
method: 'post',
|
|
40
|
+
json: insider_helpers_1.sendBulkTrackEvents(data.payload, 'product_detail_page_view')
|
|
41
|
+
});
|
|
36
42
|
}
|
|
37
43
|
};
|
|
38
44
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/productViewedEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAQ8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/productViewedEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAQ8B;AAC9B,wDAAmG;AAEnG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EAAE,sCAAsC;IACnD,mBAAmB,EAAE,6CAA6C;IAClE,MAAM,EAAE;QACN,mBAAmB,EAAE,EAAE,GAAG,wCAAmB,EAAE;QAC/C,0BAA0B,EAAE,EAAE,GAAG,+CAA0B,EAAE;QAC7D,IAAI,EAAE,EAAE,GAAG,yBAAI,EAAE;QACjB,oBAAoB,EAAE,EAAE,GAAG,yCAAoB,EAAE;QACjD,SAAS,EAAE,EAAE,GAAG,8BAAS,EAAE;QAC3B,UAAU,EAAE;YACV,GAAG,wCAAmB,CAAC;gBACrB,UAAU;gBACV,KAAK;gBACL,UAAU;gBACV,YAAY;gBACZ,iBAAiB;gBACjB,UAAU;gBACV,YAAY;gBACZ,MAAM;gBACN,mBAAmB;gBACnB,UAAU;aACX,CAAC;SACH;QACD,UAAU,EAAE,EAAE,GAAG,oCAAe,EAAE;KACnC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,gCAAc,CAAC,IAAI,CAAC,OAAO,EAAE,0BAA0B,CAAC;SAC/D,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,qCAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,0BAA0B,CAAC;SACpE,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -22,6 +22,12 @@ const action = {
|
|
|
22
22
|
method: 'post',
|
|
23
23
|
json: insider_helpers_1.sendTrackEvent(data.payload, data.payload.event_name.toString().toLowerCase().trim().split(' ').join('_').toString())
|
|
24
24
|
});
|
|
25
|
+
},
|
|
26
|
+
performBatch: (request, data) => {
|
|
27
|
+
return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
|
|
28
|
+
method: 'post',
|
|
29
|
+
json: insider_helpers_1.sendBulkTrackEvents(data.payload)
|
|
30
|
+
});
|
|
25
31
|
}
|
|
26
32
|
};
|
|
27
33
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/trackEvent/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/trackEvent/index.ts"],"names":[],"mappings":";;AAGA,wDAAmG;AACnG,8DAU8B;AAE9B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,gCAAgC;IAC7C,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,mBAAmB,EAAE,EAAE,GAAG,wCAAmB,EAAE;QAC/C,0BAA0B,EAAE,EAAE,GAAG,+CAA0B,EAAE;QAC7D,IAAI,EAAE,EAAE,GAAG,yBAAI,EAAE;QACjB,oBAAoB,EAAE,EAAE,GAAG,yCAAoB,EAAE;QACjD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE;QAC7B,SAAS,EAAE,EAAE,GAAG,8BAAS,EAAE;QAC3B,UAAU,EAAE,EAAE,GAAG,wCAAmB,CAAC,EAAE,CAAC,EAAE;QAC1C,QAAQ,EAAE,EAAE,GAAG,6BAAQ,EAAE;QACzB,UAAU,EAAE,EAAE,GAAG,oCAAe,EAAE;KACnC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,gCAAc,CAClB,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CACxF;SACF,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,qCAAmB,CAAC,IAAI,CAAC,OAAO,CAAC;SACxC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -146,6 +146,12 @@ const action = {
|
|
|
146
146
|
method: 'post',
|
|
147
147
|
json: insider_helpers_1.userProfilePayload(data.payload)
|
|
148
148
|
});
|
|
149
|
+
},
|
|
150
|
+
performBatch: (request, { payload }) => {
|
|
151
|
+
return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
|
|
152
|
+
method: 'post',
|
|
153
|
+
json: insider_helpers_1.bulkUserProfilePayload(payload)
|
|
154
|
+
});
|
|
149
155
|
}
|
|
150
156
|
};
|
|
151
157
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/updateUserProfile/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/updateUserProfile/index.ts"],"names":[],"mappings":";;AAGA,wDAA0G;AAE1G,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,iCAAiC;IACxC,WAAW,EAAE,4DAA4D;IACzE,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,mBAAmB,EAAE;YACnB,KAAK,EAAE,2BAA2B;YAClC,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,uDAAuD;YACpE,OAAO,EAAE,IAAI;SACd;QACD,0BAA0B,EAAE;YAC1B,KAAK,EAAE,kCAAkC;YACzC,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,6DAA6D;YAC1E,OAAO,EAAE,IAAI;SACd;QACD,GAAG,EAAE;YACH,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,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACrC,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,wCAAsB,CAAC,OAAO,CAAC;SACtC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -19,6 +19,12 @@ const action = {
|
|
|
19
19
|
method: 'post',
|
|
20
20
|
json: insider_helpers_1.sendTrackEvent(data.payload, 'sign_up_confirmation')
|
|
21
21
|
});
|
|
22
|
+
},
|
|
23
|
+
performBatch: (request, data) => {
|
|
24
|
+
return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
|
|
25
|
+
method: 'post',
|
|
26
|
+
json: insider_helpers_1.sendBulkTrackEvents(data.payload, 'sign_up_confirmation')
|
|
27
|
+
});
|
|
22
28
|
}
|
|
23
29
|
};
|
|
24
30
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/userRegisteredEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAO8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/userRegisteredEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAO8B;AAC9B,wDAAmG;AAEnG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EAAE,yCAAyC;IACtD,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,mBAAmB,EAAE,EAAE,GAAG,wCAAmB,EAAE;QAC/C,0BAA0B,EAAE,EAAE,GAAG,+CAA0B,EAAE;QAC7D,IAAI,EAAE,EAAE,GAAG,yBAAI,EAAE;QACjB,oBAAoB,EAAE,EAAE,GAAG,yCAAoB,EAAE;QACjD,SAAS,EAAE,EAAE,GAAG,8BAAS,EAAE;QAC3B,UAAU,EAAE,EAAE,GAAG,oCAAe,EAAE;KACnC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,gCAAc,CAAC,IAAI,CAAC,OAAO,EAAE,sBAAsB,CAAC;SAC3D,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,qCAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,sBAAsB,CAAC;SAChE,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -119,12 +119,11 @@ const getIdentifiers = function (data) {
|
|
|
119
119
|
};
|
|
120
120
|
const getAttributes = function (data) {
|
|
121
121
|
const computationKey = data.custom_audience_name;
|
|
122
|
-
|
|
122
|
+
return {
|
|
123
123
|
custom: {
|
|
124
124
|
segment_audience_name: [computationKey]
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
|
-
return attributes;
|
|
128
127
|
};
|
|
129
128
|
const getTraitAttributes = function (data) {
|
|
130
129
|
const computationKey = 'segment_io_' + data.custom_audience_name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insider-helpers.js","sourceRoot":"","sources":["../../../src/destinations/insider-audiences/insider-helpers.ts"],"names":[],"mappings":";;;AAGa,QAAA,QAAQ,GAAG,yCAAyC,CAAA;AACpD,QAAA,eAAe,GAAG,gBAAgB,CAAA;AAClC,QAAA,yBAAyB,GAAG,0BAA0B,CAAA;AACnE,MAAM,aAAa,GAAG,UAA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ED,IAAI,IAAI,CAAC,OAAO,EAAE;QAChB,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAA;KACnC;IAED,IAAI,IAAI,CAAC,YAAY,EAAE;QACrB,WAAW,CAAC,QAAQ,CAAC,GAAG;YACtB,oBAAoB,EAAE,IAAI,CAAC,YAAY;SACxC,CAAA;KACF;IAED,IAAI,IAAI,CAAC,KAAK,EAAE;QACd,WAAW,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,KAAK,CAAA;KACzC;IAED,OAAO,WAAW,CAAA;AACpB,CAAC,CAAA;AAGD,MAAM,aAAa,GAAG,UAAU,IAAa;IAC3C,MAAM,cAAc,GAAG,IAAI,CAAC,oBAAoB,CAAA;IAChD,
|
|
1
|
+
{"version":3,"file":"insider-helpers.js","sourceRoot":"","sources":["../../../src/destinations/insider-audiences/insider-helpers.ts"],"names":[],"mappings":";;;AAGa,QAAA,QAAQ,GAAG,yCAAyC,CAAA;AACpD,QAAA,eAAe,GAAG,gBAAgB,CAAA;AAClC,QAAA,yBAAyB,GAAG,0BAA0B,CAAA;AACnE,MAAM,aAAa,GAAG,UAAU,CAAA;AAChC,MAAM,QAAQ,GAAG,UAAU,CAAA;AAC3B,MAAM,KAAK,GAAG,OAAO,CAAA;AACrB,MAAM,mBAAmB,GAAG,OAAO,CAAA;AAEnC,MAAM,sBAAuB,SAAQ,KAAK;IACxC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAA;IACtC,CAAC;CACF;AAGD,MAAM,oCAAoC,GAAG,UAC3C,IAAa,EACb,OAA+G;IAE/G,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;IACxC,MAAM,UAAU,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAA;IAE3C,MAAM,OAAO,GAAG;QACd,KAAK,EAAE;YACL;gBACE,WAAW;gBACX,UAAU;aACX;SACF;KACF,CAAA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AO,iCAAiC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;KACxD;IAED,MAAM,IAAI,sBAAsB,CAAC,+CAA+C,CAAC,CAAA;AACnF,CAAC,CAAA;AAGM,MAAM,cAAc,GAAG,KAAK,WACjC,OAA+G,EAC/G,OAAkB;IAElB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACpC,IAAI,IAAI,CAAC,0BAA0B,KAAK,aAAa,EAAE;YACrD,OAAO,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;SACzC;QAED,IAAI,IAAI,CAAC,0BAA0B,KAAK,mBAAmB,EAAE;YAC3D,OAAO,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;SAC5C;QAED,MAAM,IAAI,sBAAsB,CAAC,2EAA2E,CAAC,CAAA;IAC/G,CAAC,CAAC,CAAA;IAEF,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AAC9B,CAAC,CAAA;AAjBY,QAAA,cAAc,kBAiB1B"}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
2
|
}
|
|
3
|
+
export interface HookBundle {
|
|
4
|
+
'on-mapping-save': {
|
|
5
|
+
inputs?: {
|
|
6
|
+
name: string;
|
|
7
|
+
conversionType: string;
|
|
8
|
+
account: string;
|
|
9
|
+
attribution_type: string;
|
|
10
|
+
};
|
|
11
|
+
outputs?: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
conversionType: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ActionDefinition } from '@segment/actions-core';
|
|
2
2
|
import type { Settings } from '../generated-types';
|
|
3
|
-
import type { Payload } from './generated-types';
|
|
4
|
-
declare const action: ActionDefinition<Settings, Payload>;
|
|
3
|
+
import type { Payload, HookBundle } from './generated-types';
|
|
4
|
+
declare const action: ActionDefinition<Settings, Payload, undefined, HookBundle>;
|
|
5
5
|
export default action;
|
|
@@ -4,10 +4,90 @@ const action = {
|
|
|
4
4
|
title: 'Stream Conversion Event',
|
|
5
5
|
description: 'Directly streams conversion events to a specific conversion rule.',
|
|
6
6
|
fields: {},
|
|
7
|
+
hooks: {
|
|
8
|
+
'on-mapping-save': {
|
|
9
|
+
type: 'on-mapping-save',
|
|
10
|
+
label: 'Create a Conversion Rule',
|
|
11
|
+
description: 'When saving this mapping, we will create a conversion rule in LinkedIn using the fields you provided.',
|
|
12
|
+
inputFields: {
|
|
13
|
+
name: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
label: 'Name',
|
|
16
|
+
description: 'The name of the conversion rule.',
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
conversionType: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
label: 'Conversion Type',
|
|
22
|
+
description: 'The type of conversion rule.',
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
account: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
label: 'Account',
|
|
28
|
+
description: 'The account to associate this conversion rule with.',
|
|
29
|
+
required: true
|
|
30
|
+
},
|
|
31
|
+
attribution_type: {
|
|
32
|
+
label: 'Attribution Type',
|
|
33
|
+
description: 'The attribution type for the conversion rule.',
|
|
34
|
+
type: 'string',
|
|
35
|
+
required: true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
outputTypes: {
|
|
39
|
+
id: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
label: 'ID',
|
|
42
|
+
description: 'The ID of the conversion rule.',
|
|
43
|
+
required: true
|
|
44
|
+
},
|
|
45
|
+
name: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
label: 'Name',
|
|
48
|
+
description: 'The name of the conversion rule.',
|
|
49
|
+
required: true
|
|
50
|
+
},
|
|
51
|
+
conversionType: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
label: 'Conversion Type',
|
|
54
|
+
description: 'The type of conversion rule.',
|
|
55
|
+
required: true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
performHook: async (request, { hookInputs }) => {
|
|
59
|
+
if (!hookInputs) {
|
|
60
|
+
throw new Error('No hook inputs provided');
|
|
61
|
+
}
|
|
62
|
+
const { data } = await request('https://api.linkedin.com/rest/conversions', {
|
|
63
|
+
method: 'post',
|
|
64
|
+
json: {
|
|
65
|
+
name: hookInputs.name,
|
|
66
|
+
account: hookInputs.account,
|
|
67
|
+
conversionMethod: 'CONVERSIONS_API',
|
|
68
|
+
postClickAttributionWindowSize: 30,
|
|
69
|
+
viewThroughAttributionWindowSize: 7,
|
|
70
|
+
attributionType: hookInputs.attribution_type,
|
|
71
|
+
type: hookInputs.conversionType
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return {
|
|
75
|
+
successMessage: `Conversion rule ${data.id} created successfully!`,
|
|
76
|
+
savedData: {
|
|
77
|
+
id: data.id,
|
|
78
|
+
name: data.name,
|
|
79
|
+
conversionType: data.type
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
7
85
|
perform: (request, data) => {
|
|
8
86
|
return request('https://example.com', {
|
|
9
87
|
method: 'post',
|
|
10
|
-
json:
|
|
88
|
+
json: {
|
|
89
|
+
conversion: data.hookOutputs?.['on-mapping-save']?.id
|
|
90
|
+
}
|
|
11
91
|
});
|
|
12
92
|
}
|
|
13
93
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/linkedin-conversions/streamConversion/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/linkedin-conversions/streamConversion/index.ts"],"names":[],"mappings":";;AAUA,MAAM,MAAM,GAA+D;IACzE,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,mEAAmE;IAChF,MAAM,EAAE,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C3C;gBAED,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,OAAO,CAAiC,2CAA2C,EAAE;oBAC1G,MAAM,EAAE,MAAM;oBACd,IAAI,EAAE;wBACJ,IAAI,EAAE,UAAU,CAAC,IAAI;wBACrB,OAAO,EAAE,UAAU,CAAC,OAAO;wBAC3B,gBAAgB,EAAE,iBAAiB;wBACnC,8BAA8B,EAAE,EAAE;wBAClC,gCAAgC,EAAE,CAAC;wBACnC,eAAe,EAAE,UAAU,CAAC,gBAAgB;wBAC5C,IAAI,EAAE,UAAU,CAAC,cAAc;qBAChC;iBACF,CAAC,CAAA;gBAEF,OAAO;oBACL,cAAc,EAAE,mBAAmB,IAAI,CAAC,EAAE,wBAAwB;oBAClE,SAAS,EAAE;wBACT,EAAE,EAAE,IAAI,CAAC,EAAE;wBACX,IAAI,EAAE,IAAI,CAAC,IAAI;wBACf,cAAc,EAAE,IAAI,CAAC,IAAI;qBAC1B;iBACF,CAAA;YACH,CAAC;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,qBAAqB,EAAE;YACpC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,iBAAiB,CAAC,EAAE,EAAE;aACtD;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/marketo-static-lists/addToList/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Add to List',
|
|
5
|
+
description: 'Add users into a list',
|
|
6
|
+
fields: {},
|
|
7
|
+
perform: () => {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
exports.default = action;
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/marketo-static-lists/addToList/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,uBAAuB;IACpC,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,GAAG,EAAE;QACZ,OAAM;IACR,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/marketo-static-lists/generated-types.ts"],"names":[],"mappings":""}
|