@segment/action-destinations 3.102.0 → 3.102.1-alpha.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/actions-pardot/prospects/index.js.map +1 -1
- package/dist/destinations/cordial/addProductToCart/index.js +1 -1
- package/dist/destinations/cordial/addProductToCart/index.js.map +1 -1
- package/dist/destinations/cordial/index.js +1 -1
- package/dist/destinations/cordial/index.js.map +1 -1
- package/dist/destinations/cordial/removeProductFromCart/index.js.map +1 -1
- package/dist/destinations/cordial/upsertOrder/index.js +8 -8
- package/dist/destinations/cordial/upsertOrder/index.js.map +1 -1
- package/dist/destinations/customerio/trackEvent/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/generated-types.d.ts +1 -0
- package/dist/destinations/engage-messaging-sendgrid/index.js +5 -0
- package/dist/destinations/engage-messaging-sendgrid/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +4 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +40 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +1 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/constants.d.ts +1 -0
- package/dist/destinations/google-enhanced-conversions/constants.js +185 -0
- package/dist/destinations/google-enhanced-conversions/constants.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +3 -0
- package/dist/destinations/google-enhanced-conversions/functions.js +36 -0
- package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/generated-types.d.ts +2 -1
- package/dist/destinations/google-enhanced-conversions/index.js +15 -8
- package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js +7 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.d.ts +11 -0
- package/dist/destinations/{linkedin-audiences → google-enhanced-conversions/uploadCallConversion}/generated-types.js +0 -0
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.d.ts +5 -0
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +99 -0
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.d.ts +25 -0
- package/dist/destinations/{linkedin-audiences/updateAudience → google-enhanced-conversions/uploadClickConversion}/generated-types.js +0 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.d.ts +5 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +238 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/types.d.ts +5 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/types.js +3 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/types.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.d.ts +20 -0
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.js +3 -0
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.d.ts +5 -0
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +269 -0
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -0
- package/dist/destinations/google-sheets/postSheet/index.js +1 -1
- package/dist/destinations/index.js +1 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/mixpanel/alias/index.js +1 -2
- package/dist/destinations/mixpanel/alias/index.js.map +1 -1
- package/dist/destinations/mixpanel/generated-types.d.ts +0 -1
- package/dist/destinations/mixpanel/groupIdentifyUser/index.js +1 -2
- package/dist/destinations/mixpanel/groupIdentifyUser/index.js.map +1 -1
- package/dist/destinations/mixpanel/identifyUser/index.js +2 -4
- package/dist/destinations/mixpanel/identifyUser/index.js.map +1 -1
- package/dist/destinations/mixpanel/index.js +0 -5
- package/dist/destinations/mixpanel/index.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/generated-types.d.ts +0 -1
- package/dist/destinations/mixpanel/trackEvent/index.js +66 -79
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/salesforce/lead/index.js +2 -1
- package/dist/destinations/salesforce/lead/index.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.d.ts +2 -0
- package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.js +3 -0
- package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.js.map +1 -0
- package/dist/destinations/{linkedin-audiences/updateAudience → salesforce-marketing-cloud/contact}/index.d.ts +0 -0
- package/dist/destinations/salesforce-marketing-cloud/contact/index.js +11 -0
- package/dist/destinations/salesforce-marketing-cloud/contact/index.js.map +1 -0
- package/dist/destinations/{linkedin-audiences → salesforce-marketing-cloud}/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce-marketing-cloud/generated-types.js +3 -0
- package/dist/destinations/salesforce-marketing-cloud/generated-types.js.map +1 -0
- package/dist/destinations/{linkedin-audiences → salesforce-marketing-cloud}/index.d.ts +0 -0
- package/dist/destinations/salesforce-marketing-cloud/index.js +27 -0
- package/dist/destinations/salesforce-marketing-cloud/index.js.map +1 -0
- package/package.json +4 -4
- package/dist/destinations/linkedin-audiences/generated-types.js.map +0 -1
- package/dist/destinations/linkedin-audiences/index.js +0 -59
- package/dist/destinations/linkedin-audiences/index.js.map +0 -1
- package/dist/destinations/linkedin-audiences/linkedin-properties.d.ts +0 -1
- package/dist/destinations/linkedin-audiences/linkedin-properties.js +0 -5
- package/dist/destinations/linkedin-audiences/linkedin-properties.js.map +0 -1
- package/dist/destinations/linkedin-audiences/updateAudience/generated-types.d.ts +0 -11
- package/dist/destinations/linkedin-audiences/updateAudience/generated-types.js.map +0 -1
- package/dist/destinations/linkedin-audiences/updateAudience/index.js +0 -171
- package/dist/destinations/linkedin-audiences/updateAudience/index.js.map +0 -1
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
+
const functions_1 = require("../functions");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Upload Conversion Adjustment',
|
|
7
|
+
description: 'Upload a conversion adjustment to the Google Ads API.',
|
|
8
|
+
fields: {
|
|
9
|
+
conversion_action: {
|
|
10
|
+
label: 'Conversion Action ID',
|
|
11
|
+
description: 'The ID of the conversion action associated with this conversion. To find the Conversion Action ID, click on your conversion in Google Ads and get the value for ctId in the URL. For example, if the URL is https://ads.google.com/aw/conversions/detail?ocid=00000000&ctId=576882000, your Conversion Action ID is 576882000.',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
default: ''
|
|
15
|
+
},
|
|
16
|
+
adjustment_type: {
|
|
17
|
+
label: 'Adjustment Type',
|
|
18
|
+
description: 'The adjustment type. See Google’s documentation for details on each type.',
|
|
19
|
+
type: 'string',
|
|
20
|
+
choices: [
|
|
21
|
+
{ label: 'UNSPECIFIED', value: 'UNSPECIFIED' },
|
|
22
|
+
{ label: 'UNKNOWN', value: 'UNKNOWN' },
|
|
23
|
+
{ label: `RETRACTION`, value: 'RETRACTION' },
|
|
24
|
+
{ label: 'RESTATEMENT', value: 'RESTATEMENT' },
|
|
25
|
+
{ label: `ENHANCEMENT`, value: 'ENHANCEMENT' }
|
|
26
|
+
],
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
adjustment_timestamp: {
|
|
30
|
+
label: 'Adjustment Timestamp',
|
|
31
|
+
description: 'The date time at which the adjustment occurred. Must be after the conversion_date_time. The timezone must be specified. The format is "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00".',
|
|
32
|
+
type: 'string',
|
|
33
|
+
required: true,
|
|
34
|
+
default: {
|
|
35
|
+
'@path': '$.timestamp'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
order_id: {
|
|
39
|
+
label: 'Order ID',
|
|
40
|
+
description: 'The order ID of the conversion to be adjusted. If the conversion was reported with an order ID specified, that order ID must be used as the identifier here. Required for ENHANCEMENT adjustments.',
|
|
41
|
+
type: 'string',
|
|
42
|
+
default: {
|
|
43
|
+
'@path': '$.properties.orderId'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
gclid: {
|
|
47
|
+
label: 'GCLID',
|
|
48
|
+
description: 'Google click ID associated with the original conversion for this adjustment. This is used for the GCLID Date Time Pair. Required for non-ENHANCEMENT adjustments. If adjustment is ENHANCEMENT, this value is optional but may be set in addition to the order ID.',
|
|
49
|
+
type: 'string',
|
|
50
|
+
default: ''
|
|
51
|
+
},
|
|
52
|
+
conversion_timestamp: {
|
|
53
|
+
label: 'Conversion Timestamp',
|
|
54
|
+
description: 'The date time at which the original conversion for this adjustment occurred. The timezone must be specified. The format is "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00". This is used for the GCLID Date Time Pair. Required for non-ENHANCEMENT adjustments. If adjustment is ENHANCEMENT, this value is optional but may be set in addition to the order ID.',
|
|
55
|
+
type: 'string',
|
|
56
|
+
default: ''
|
|
57
|
+
},
|
|
58
|
+
restatement_value: {
|
|
59
|
+
label: 'Restatement Value',
|
|
60
|
+
description: 'The restated conversion value. This is the value of the conversion after restatement. For example, to change the value of a conversion from 100 to 70, an adjusted value of 70 should be reported. Required for RESTATEMENT adjustments.',
|
|
61
|
+
type: 'number',
|
|
62
|
+
default: ''
|
|
63
|
+
},
|
|
64
|
+
restatement_currency_code: {
|
|
65
|
+
label: 'Restatement Currency Code',
|
|
66
|
+
description: 'The currency of the restated value. If not provided, then the default currency from the conversion action is used, and if that is not set then the account currency is used. This is the ISO 4217 3-character currency code e.g. USD or EUR.',
|
|
67
|
+
type: 'string',
|
|
68
|
+
default: ''
|
|
69
|
+
},
|
|
70
|
+
email_address: {
|
|
71
|
+
label: 'Email Address',
|
|
72
|
+
description: 'Email address of the individual who triggered the conversion event. Segment will hash this value before sending to Google.',
|
|
73
|
+
type: 'string',
|
|
74
|
+
format: 'email',
|
|
75
|
+
default: {
|
|
76
|
+
'@if': {
|
|
77
|
+
exists: { '@path': '$.properties.email' },
|
|
78
|
+
then: { '@path': '$.properties.email' },
|
|
79
|
+
else: { '@path': '$context.traits.email' }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
phone_number: {
|
|
84
|
+
label: 'Phone Number',
|
|
85
|
+
description: 'Phone number of the individual who triggered the conversion event, in E.164 standard format, e.g. +14150000000. Segment will hash this value before sending to Google.',
|
|
86
|
+
type: 'string',
|
|
87
|
+
default: {
|
|
88
|
+
'@if': {
|
|
89
|
+
exists: { '@path': '$.properties.phone' },
|
|
90
|
+
then: { '@path': '$.properties.phone' },
|
|
91
|
+
else: { '@path': '$context.traits.phone' }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
first_name: {
|
|
96
|
+
label: 'First Name',
|
|
97
|
+
description: 'First name of the user who performed the conversion. Segment will hash this value before sending to Google.',
|
|
98
|
+
type: 'string',
|
|
99
|
+
default: {
|
|
100
|
+
'@if': {
|
|
101
|
+
exists: { '@path': '$.properties.firstName' },
|
|
102
|
+
then: { '@path': '$.properties.firstName' },
|
|
103
|
+
else: { '@path': '$context.traits.firstName' }
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
last_name: {
|
|
108
|
+
label: 'Last Name',
|
|
109
|
+
description: 'Last name of the user who performed the conversion. Segment will hash this value before sending to Google.',
|
|
110
|
+
type: 'string',
|
|
111
|
+
default: {
|
|
112
|
+
'@if': {
|
|
113
|
+
exists: { '@path': '$.properties.lastName' },
|
|
114
|
+
then: { '@path': '$.properties.lastName' },
|
|
115
|
+
else: { '@path': '$context.traits.lastName' }
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
city: {
|
|
120
|
+
label: 'City',
|
|
121
|
+
description: 'City of the user who performed the conversion.',
|
|
122
|
+
type: 'string',
|
|
123
|
+
default: {
|
|
124
|
+
'@if': {
|
|
125
|
+
exists: { '@path': '$.properties.address.city,' },
|
|
126
|
+
then: { '@path': '$.properties.address.city,' },
|
|
127
|
+
else: { '@path': '$.context.traits.address.city' }
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
state: {
|
|
132
|
+
label: 'State',
|
|
133
|
+
description: 'State of the user who performed the conversion.',
|
|
134
|
+
type: 'string',
|
|
135
|
+
default: {
|
|
136
|
+
'@if': {
|
|
137
|
+
exists: { '@path': '$.properties.address.state,' },
|
|
138
|
+
then: { '@path': '$.properties.address.state,' },
|
|
139
|
+
else: { '@path': '$.context.traits.address.state' }
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
country: {
|
|
144
|
+
label: 'Country',
|
|
145
|
+
description: '2-letter country code in ISO-3166-1 alpha-2 of the user who performed the conversion.',
|
|
146
|
+
type: 'string',
|
|
147
|
+
default: {
|
|
148
|
+
'@if': {
|
|
149
|
+
exists: { '@path': '$.properties.address.country,' },
|
|
150
|
+
then: { '@path': '$.properties.address.country,' },
|
|
151
|
+
else: { '@path': '$.context.traits.address.country' }
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
postal_code: {
|
|
156
|
+
label: 'Postal Code',
|
|
157
|
+
description: 'Postal code of the user who performed the conversion.',
|
|
158
|
+
type: 'string',
|
|
159
|
+
default: {
|
|
160
|
+
'@if': {
|
|
161
|
+
exists: { '@path': '$.properties.address.postalCode,' },
|
|
162
|
+
then: { '@path': '$.properties.address.postalCode,' },
|
|
163
|
+
else: { '@path': '$.context.traits.address.postalCode' }
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
street_address: {
|
|
168
|
+
label: 'Street Address',
|
|
169
|
+
description: 'Street address of the user who performed the conversion. Segment will hash this value before sending to Google.',
|
|
170
|
+
type: 'string',
|
|
171
|
+
default: {
|
|
172
|
+
'@if': {
|
|
173
|
+
exists: { '@path': '$.properties.address.street,' },
|
|
174
|
+
then: { '@path': '$.properties.address.street,' },
|
|
175
|
+
else: { '@path': '$.context.traits.address.street' }
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
user_agent: {
|
|
180
|
+
label: 'User Agent',
|
|
181
|
+
description: 'The user agent to enhance the original conversion. User agent can only be specified in enhancements with user identifiers. This should match the user agent of the request that sent the original conversion so the conversion and its enhancement are either both attributed as same-device or both attributed as cross-device.',
|
|
182
|
+
type: 'string',
|
|
183
|
+
default: {
|
|
184
|
+
'@path': '$.context.userAgent'
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
perform: async (request, { settings, payload }) => {
|
|
189
|
+
if (!settings.customerId) {
|
|
190
|
+
throw new actions_core_1.IntegrationError('Customer id is required for this action. Please set it in destination settings.', 'Missing required fields.', 400);
|
|
191
|
+
}
|
|
192
|
+
settings.customerId = settings.customerId.replace(/[^0-9.]+/g, '');
|
|
193
|
+
if (payload.adjustment_type == 'ENHANCEMENT' && !payload.order_id) {
|
|
194
|
+
throw new actions_core_1.IntegrationError('Order id required for enhancement conversion', 'INVALID_ARGUMENT', 400);
|
|
195
|
+
}
|
|
196
|
+
else if (payload.adjustment_type != 'ENHANCEMENT') {
|
|
197
|
+
if (!payload.gclid) {
|
|
198
|
+
throw new actions_core_1.IntegrationError('Gclid required for chosen conversion type', 'INVALID_ARGUMENT', 400);
|
|
199
|
+
}
|
|
200
|
+
if (!payload.conversion_timestamp) {
|
|
201
|
+
throw new actions_core_1.IntegrationError('Conversion timestamp required for chosen conversion type', 'INVALID_ARGUMENT', 400);
|
|
202
|
+
}
|
|
203
|
+
if (payload.adjustment_type == 'RESTATEMENT' && !payload.restatement_value) {
|
|
204
|
+
throw new actions_core_1.IntegrationError('Restatement value required for restatement conversion', 'INVALID_ARGUMENT', 400);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
const request_object = {
|
|
208
|
+
conversionAction: `customers/${settings.customerId}/conversionActions/${payload.conversion_action}`,
|
|
209
|
+
adjustmentType: payload.adjustment_type,
|
|
210
|
+
adjustmentDateTime: payload.adjustment_timestamp.replace(/T/, ' ').replace(/\..+/, '+00:00'),
|
|
211
|
+
orderId: payload.order_id,
|
|
212
|
+
gclidDateTimePair: {
|
|
213
|
+
gclid: payload.gclid,
|
|
214
|
+
conversionDateTime: payload.conversion_timestamp
|
|
215
|
+
},
|
|
216
|
+
restatementValue: {
|
|
217
|
+
adjustedValue: payload.restatement_value,
|
|
218
|
+
currencyCode: payload.restatement_currency_code
|
|
219
|
+
},
|
|
220
|
+
userIdentifiers: [],
|
|
221
|
+
userAgent: payload.user_agent
|
|
222
|
+
};
|
|
223
|
+
if (payload.email_address) {
|
|
224
|
+
request_object.userIdentifiers.push({ hashedEmail: functions_1.hash(payload.email_address) });
|
|
225
|
+
}
|
|
226
|
+
if (payload.phone_number) {
|
|
227
|
+
request_object.userIdentifiers.push({ hashedPhoneNumber: functions_1.hash(payload.phone_number) });
|
|
228
|
+
}
|
|
229
|
+
if (payload.first_name ||
|
|
230
|
+
payload.last_name ||
|
|
231
|
+
payload.city ||
|
|
232
|
+
payload.state ||
|
|
233
|
+
payload.country ||
|
|
234
|
+
payload.postal_code ||
|
|
235
|
+
payload.street_address) {
|
|
236
|
+
request_object.userIdentifiers.push({
|
|
237
|
+
addressInfo: {
|
|
238
|
+
hashedFirstName: functions_1.hash(payload.first_name),
|
|
239
|
+
hashedLastName: functions_1.hash(payload.last_name),
|
|
240
|
+
hashedStreetAddress: functions_1.hash(payload.street_address),
|
|
241
|
+
city: payload.city,
|
|
242
|
+
state: payload.state,
|
|
243
|
+
countryCode: payload.country,
|
|
244
|
+
postalCode: payload.postal_code
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
const response = await request(`https://googleads.googleapis.com/v11/customers/${settings.customerId}:uploadConversionAdjustments`, {
|
|
249
|
+
method: 'post',
|
|
250
|
+
headers: {
|
|
251
|
+
'developer-token': `${process.env.ADWORDS_DEVELOPER_TOKEN}`
|
|
252
|
+
},
|
|
253
|
+
json: {
|
|
254
|
+
conversionAdjustments: [request_object],
|
|
255
|
+
partialFailure: true
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
if (typeof response.data === 'object' && response.data != null) {
|
|
259
|
+
Object.entries(response.data).forEach(([key, value]) => {
|
|
260
|
+
if (key === 'partialFailureError' && value.code !== 0) {
|
|
261
|
+
throw new actions_core_1.IntegrationError(value.message, 'INVALID_ARGUMENT', 400);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
return response;
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
exports.default = action;
|
|
269
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAmC;AAInC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,uDAAuD;IACpE,MAAM,EAAE;QACN,iBAAiB,EAAE;YACjB,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EACT,gUAAgU;YAClU,IAAI,EAAE,QAAQ;Y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ACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -16,7 +16,7 @@ const action = {
|
|
|
16
16
|
operation_type: {
|
|
17
17
|
label: 'Operation Type',
|
|
18
18
|
description: "Describes the nature of the operation being performed. Only supported values are 'new' and 'updated'.",
|
|
19
|
-
type: '
|
|
19
|
+
type: 'string',
|
|
20
20
|
required: true,
|
|
21
21
|
default: { '@path': '$.event' }
|
|
22
22
|
},
|
|
@@ -47,7 +47,6 @@ register('60ae8b97dcb6cc52d5d0d5ab', './google-enhanced-conversions');
|
|
|
47
47
|
register('627ea052118e3cd530d28963', './google-sheets');
|
|
48
48
|
register('62e184d538b54413fe754512', './heap');
|
|
49
49
|
register('624dddd054ced46facfdb9c0', './launchdarkly');
|
|
50
|
-
register('62f435d1d311567bd5bf0e8d', './linkedin-audiences');
|
|
51
50
|
register('615c7438d93d9b61b1e9e192', './mixpanel');
|
|
52
51
|
register('61a8032ea5f157ee37a720be', './metronome');
|
|
53
52
|
register('620feaa207e70f6c6a765ff7', './moengage');
|
|
@@ -55,6 +54,7 @@ register('62df16e45ba0058c864a75d1', './actions-pardot');
|
|
|
55
54
|
register('5f7dd8191ad74f868ab1fc48', './pipedrive');
|
|
56
55
|
register('62e17e6f687e4a3d32d0f875', './qualtrics');
|
|
57
56
|
register('61957755c4d820be968457de', './salesforce');
|
|
57
|
+
register('62e30bad99f1bfb98ee8ce08', './salesforce-marketing-cloud');
|
|
58
58
|
register('5f7dd8e302173ff732db5cc4', './slack');
|
|
59
59
|
register('6261a8b6cb4caa70e19116e8', './snap-conversions-api');
|
|
60
60
|
register('6234b137d3b6404a64f2a0f0', './talon-one');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/destinations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,wDAAmD;AACnD,gDAAuB;AAWV,QAAA,YAAY,GAA0C,EAAE,CAAA;AACxD,QAAA,QAAQ,GAAs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E,CAAC;AAGD,KAAK,UAAU,kBAAkB,CAAC,IAAY;IAC5C,MAAM,WAAW,GAAG,MAAM,kDAAO,KAAK,IAAI,EAAE,IAAE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAGxE,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,OAAO,WAAW,EAAE,OAAO,KAAK,QAAQ,EAAE;QAClE,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,WAAW,CAAA;AACpB,CAAC;AAED,KAAK,UAAU,uBAAuB,CAAC,GAAW;IAChD,MAAM,WAAW,GAAG,oBAAY,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAA;IAExE,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,IAAI,CAAA;KACZ;IAGD,OAAO,IAAI,0BAAW,CAAC,WAAyC,CAAC,CAAA;AACnE,CAAC;AAED,SAAgB,kBAAkB,CAAC,EAAU;IAC3C,MAAM,WAAW,GAAG,gBAAQ,CAAC,EAAE,CAAC,CAAA;IAEhC,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE;QAC5B,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,IAAI,0BAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAA;AAChD,CAAC;AARD,gDAQC;AAEM,KAAK,UAAU,uBAAuB,CAAC,WAAmB;IAC/D,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,uBAAuB,CAAC,WAAW,CAAC,CAAA;AAChF,CAAC;AAFD,0DAEC"}
|
|
@@ -33,8 +33,7 @@ const action = {
|
|
|
33
33
|
properties: {
|
|
34
34
|
distinct_id: payload.distinct_id,
|
|
35
35
|
alias: payload.alias,
|
|
36
|
-
token: settings.projectToken
|
|
37
|
-
segment_source_name: settings.sourceName
|
|
36
|
+
token: settings.projectToken
|
|
38
37
|
}
|
|
39
38
|
};
|
|
40
39
|
return request(`${utils_1.getApiServerUrl(settings.apiRegion)}/track`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/alias/index.ts"],"names":[],"mappings":";;AAIA,oCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,OAAO;IACd,WAAW,EACT,ufAAuf;IACzf,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EACT,2GAA2G;YAC7G,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBACnC;aACF;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,4CAA4C;YACzD,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAChD,MAAM,IAAI,GAAG;YACX,KAAK,EAAE,eAAe;YACtB,UAAU,EAAE;gBACV,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,KAAK,EAAE,QAAQ,CAAC,YAAY;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/alias/index.ts"],"names":[],"mappings":";;AAIA,oCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,OAAO;IACd,WAAW,EACT,ufAAuf;IACzf,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EACT,2GAA2G;YAC7G,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBACnC;aACF;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,4CAA4C;YACzD,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAChD,MAAM,IAAI,GAAG;YACX,KAAK,EAAE,eAAe;YACtB,UAAU,EAAE;gBACV,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,KAAK,EAAE,QAAQ,CAAC,YAAY;aAC7B;SACF,CAAA;QAED,OAAO,OAAO,CAAC,GAAG,uBAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC7D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;SAC1D,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -40,8 +40,7 @@ const action = {
|
|
|
40
40
|
$token: settings.projectToken,
|
|
41
41
|
$group_key: group_key,
|
|
42
42
|
$group_id: group_id,
|
|
43
|
-
$set: payload.traits
|
|
44
|
-
segment_source_name: settings.sourceName
|
|
43
|
+
$set: payload.traits
|
|
45
44
|
};
|
|
46
45
|
return request(`${utils_1.getApiServerUrl(settings.apiRegion)}/groups`, {
|
|
47
46
|
method: 'post',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/groupIdentifyUser/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAE1E,oCAA0C;AAG1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,kOAAkO;IACpO,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,gIAAgI;SACnI;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,kHAAkH;YACpH,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,WAAW;aACrB;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,6CAA6C;YAC1D,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,WAAW,CAAA;QAClD,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,MAAM,IAAI,+BAAgB,CAAC,8BAA8B,EAAE,yBAAyB,EAAE,GAAG,CAAC,CAAA;SAC3F;QAMD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAA;QAE9D,MAAM,IAAI,GAAG;YACX,MAAM,EAAE,QAAQ,CAAC,YAAY;YAC7B,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE,QAAQ;YACnB,IAAI,EAAE,OAAO,CAAC,MAAM;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","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9D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;SAC1D,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -46,8 +46,7 @@ const action = {
|
|
|
46
46
|
properties: {
|
|
47
47
|
$identified_id: payload.user_id,
|
|
48
48
|
$anon_id: payload.anonymous_id,
|
|
49
|
-
token: settings.projectToken
|
|
50
|
-
segment_source_name: settings.sourceName
|
|
49
|
+
token: settings.projectToken
|
|
51
50
|
}
|
|
52
51
|
};
|
|
53
52
|
const identifyResponse = await request(`${apiServerUrl}/track`, {
|
|
@@ -60,8 +59,7 @@ const action = {
|
|
|
60
59
|
const data = {
|
|
61
60
|
$token: settings.projectToken,
|
|
62
61
|
$distinct_id: payload.user_id,
|
|
63
|
-
$set: payload.traits
|
|
64
|
-
segment_source_name: settings.sourceName
|
|
62
|
+
$set: payload.traits
|
|
65
63
|
};
|
|
66
64
|
const engageResponse = request(`${apiServerUrl}/engage`, {
|
|
67
65
|
method: 'post',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/identifyUser/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,oCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,8UAA8U;IAChV,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,uCAAuC;YACpD,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,yCAAyC;YACtD,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;YACpD,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;KACF;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAChD,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE;YAC1B,MAAM,IAAI,+BAAgB,CAAC,uBAAuB,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;SACnF;QAED,MAAM,YAAY,GAAG,uBAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;QAExD,MAAM,SAAS,GAAG,EAAE,CAAA;QACpB,IAAI,OAAO,CAAC,YAAY,EAAE;YACxB,MAAM,aAAa,GAAG;gBACpB,KAAK,EAAE,WAAW;gBAClB,UAAU,EAAE;oBACV,cAAc,EAAE,OAAO,CAAC,OAAO;oBAC/B,QAAQ,EAAE,OAAO,CAAC,YAAY;oBAC9B,KAAK,EAAE,QAAQ,CAAC,YAAY;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/identifyUser/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,oCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,8UAA8U;IAChV,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,uCAAuC;YACpD,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,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AAG;gBACX,MAAM,EAAE,QAAQ,CAAC,YAAY;gBAC7B,YAAY,EAAE,OAAO,CAAC,OAAO;gBAC7B,IAAI,EAAE,OAAO,CAAC,MAAM;aACrB,CAAA;YAED,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,YAAY,SAAS,EAAE;gBACvD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;aAC1D,CAAC,CAAA;YACF,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;SAC/B;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IAC/B,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -76,11 +76,6 @@ const destination = {
|
|
|
76
76
|
type: 'string',
|
|
77
77
|
choices: Object.values(utils_1.ApiRegions).map((apiRegion) => ({ label: apiRegion, value: apiRegion })),
|
|
78
78
|
default: utils_1.ApiRegions.US
|
|
79
|
-
},
|
|
80
|
-
sourceName: {
|
|
81
|
-
label: 'Source Name',
|
|
82
|
-
description: "This value, if it's not blank, will be sent as segment_source_name to Mixpanel for every event/page/screen call.",
|
|
83
|
-
type: 'string',
|
|
84
79
|
}
|
|
85
80
|
},
|
|
86
81
|
testAuthentication: (request, { settings }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/mixpanel/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AACrD,8DAAqC;AAGrC,kEAAyC;AACzC,4EAAmD;AAEnD,oDAA2B;AAC3B,mCAAoC;AAGpC,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,YAAY;QAC3B,OAAO,EAAE,4BAAa,CAAC,oBAAU,CAAC,MAAM,CAAC;KAC1C;IACD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AA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -3,76 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
6
7
|
const utils_1 = require("../utils");
|
|
7
8
|
const dayjs_1 = __importDefault(require("../../../lib/dayjs"));
|
|
8
|
-
const getEventFromPayload = (payload, settings) => {
|
|
9
|
-
const datetime = payload.time;
|
|
10
|
-
const time = datetime && dayjs_1.default.utc(datetime).isValid() ? dayjs_1.default.utc(datetime).valueOf() : Date.now();
|
|
11
|
-
const utm = payload.utm_properties || {};
|
|
12
|
-
let browser, browserVersion;
|
|
13
|
-
if (payload.userAgent) {
|
|
14
|
-
browser = utils_1.getBrowser(payload.userAgent, payload.device_manufacturer);
|
|
15
|
-
browserVersion = utils_1.getBrowserVersion(payload.userAgent, payload.device_manufacturer);
|
|
16
|
-
}
|
|
17
|
-
const event = {
|
|
18
|
-
event: payload.event,
|
|
19
|
-
properties: {
|
|
20
|
-
time: time,
|
|
21
|
-
ip: payload.ip,
|
|
22
|
-
id: payload.distinct_id,
|
|
23
|
-
distinct_id: payload.distinct_id,
|
|
24
|
-
$app_build_number: payload.app_build,
|
|
25
|
-
$app_version_string: payload.app_version,
|
|
26
|
-
$app_namespace: payload.app_namespace,
|
|
27
|
-
$app_name: payload.app_name,
|
|
28
|
-
$browser: browser,
|
|
29
|
-
$browser_version: browserVersion,
|
|
30
|
-
$bluetooth_enabled: payload.bluetooth,
|
|
31
|
-
$cellular_enabled: payload.cellular,
|
|
32
|
-
$carrier: payload.carrier,
|
|
33
|
-
$current_url: payload.url,
|
|
34
|
-
$device: payload.device_name,
|
|
35
|
-
$device_id: payload.device_id,
|
|
36
|
-
$device_type: payload.device_type,
|
|
37
|
-
$device_name: payload.device_name,
|
|
38
|
-
$group_id: payload.group_id,
|
|
39
|
-
$insert_id: utils_1.cheapGuid(),
|
|
40
|
-
$ios_ifa: payload.idfa,
|
|
41
|
-
$lib_version: payload.library_version,
|
|
42
|
-
$locale: payload.language,
|
|
43
|
-
$manufacturer: payload.device_manufacturer,
|
|
44
|
-
$model: payload.device_model,
|
|
45
|
-
$os: payload.os_name,
|
|
46
|
-
$os_version: payload.os_version,
|
|
47
|
-
$referrer: payload.referrer,
|
|
48
|
-
$screen_height: payload.screen_height,
|
|
49
|
-
$screen_width: payload.screen_width,
|
|
50
|
-
$screen_density: payload.screen_density,
|
|
51
|
-
$source: 'segment',
|
|
52
|
-
$wifi_enabled: payload.wifi,
|
|
53
|
-
mp_country_code: payload.country,
|
|
54
|
-
mp_lib: payload.library_name && `Segment: ${payload.library_name}`,
|
|
55
|
-
segment_source_name: settings.sourceName,
|
|
56
|
-
utm_campaign: utm.utm_campaign,
|
|
57
|
-
utm_content: utm.utm_content,
|
|
58
|
-
utm_medium: utm.utm_medium,
|
|
59
|
-
utm_source: utm.utm_source,
|
|
60
|
-
utm_term: utm.utm_term,
|
|
61
|
-
...payload.event_properties
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
return event;
|
|
65
|
-
};
|
|
66
|
-
const processData = async (request, settings, payload) => {
|
|
67
|
-
const events = payload.map((value) => getEventFromPayload(value, settings));
|
|
68
|
-
return request(`${utils_1.getApiServerUrl(settings.apiRegion)}/import?strict=1`, {
|
|
69
|
-
method: 'post',
|
|
70
|
-
json: events,
|
|
71
|
-
headers: {
|
|
72
|
-
authorization: `Basic ${Buffer.from(`${settings.apiSecret}:`).toString('base64')}`
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
9
|
const action = {
|
|
77
10
|
title: 'Track Event',
|
|
78
11
|
description: 'Send an event to Mixpanel. [Learn more about Events in Mixpanel](https://help.mixpanel.com/hc/en-us/articles/360041995352-Mixpanel-Concepts-Events?source=segment-actions)',
|
|
@@ -392,19 +325,73 @@ const action = {
|
|
|
392
325
|
default: {
|
|
393
326
|
'@path': '$.context.userAgent'
|
|
394
327
|
}
|
|
395
|
-
},
|
|
396
|
-
enable_batching: {
|
|
397
|
-
type: 'boolean',
|
|
398
|
-
label: 'Batch Data to Mixpanel',
|
|
399
|
-
description: 'Set as true to ensure Segment sends data to Mixpanel in batches.',
|
|
400
|
-
default: true
|
|
401
328
|
}
|
|
402
329
|
},
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
330
|
+
perform: async (request, { payload, settings }) => {
|
|
331
|
+
const datetime = payload.time;
|
|
332
|
+
const time = datetime && dayjs_1.default.utc(datetime).isValid() ? dayjs_1.default.utc(datetime).valueOf() : Date.now();
|
|
333
|
+
const utm = payload.utm_properties || {};
|
|
334
|
+
let browser, browserVersion;
|
|
335
|
+
if (payload.userAgent) {
|
|
336
|
+
browser = utils_1.getBrowser(payload.userAgent, payload.device_manufacturer);
|
|
337
|
+
browserVersion = utils_1.getBrowserVersion(payload.userAgent, payload.device_manufacturer);
|
|
338
|
+
}
|
|
339
|
+
const event = {
|
|
340
|
+
event: payload.event,
|
|
341
|
+
properties: {
|
|
342
|
+
time: time,
|
|
343
|
+
ip: payload.ip,
|
|
344
|
+
id: payload.distinct_id,
|
|
345
|
+
distinct_id: payload.distinct_id,
|
|
346
|
+
$app_build_number: payload.app_build,
|
|
347
|
+
$app_version_string: payload.app_version,
|
|
348
|
+
$app_namespace: payload.app_namespace,
|
|
349
|
+
$app_name: payload.app_name,
|
|
350
|
+
$browser: browser,
|
|
351
|
+
$browser_version: browserVersion,
|
|
352
|
+
$bluetooth_enabled: payload.bluetooth,
|
|
353
|
+
$cellular_enabled: payload.cellular,
|
|
354
|
+
$carrier: payload.carrier,
|
|
355
|
+
$current_url: payload.url,
|
|
356
|
+
$device: payload.device_name,
|
|
357
|
+
$device_id: payload.device_id,
|
|
358
|
+
$device_type: payload.device_type,
|
|
359
|
+
$device_name: payload.device_name,
|
|
360
|
+
$group_id: payload.group_id,
|
|
361
|
+
$insert_id: utils_1.cheapGuid(),
|
|
362
|
+
$ios_ifa: payload.idfa,
|
|
363
|
+
$lib_version: payload.library_version,
|
|
364
|
+
$locale: payload.language,
|
|
365
|
+
$manufacturer: payload.device_manufacturer,
|
|
366
|
+
$model: payload.device_model,
|
|
367
|
+
$os: payload.os_name,
|
|
368
|
+
$os_version: payload.os_version,
|
|
369
|
+
$referrer: payload.referrer,
|
|
370
|
+
$screen_height: payload.screen_height,
|
|
371
|
+
$screen_width: payload.screen_width,
|
|
372
|
+
$screen_density: payload.screen_density,
|
|
373
|
+
$source: 'segment',
|
|
374
|
+
$wifi_enabled: payload.wifi,
|
|
375
|
+
mp_country_code: payload.country,
|
|
376
|
+
mp_lib: payload.library_name && `Segment: ${payload.library_name}`,
|
|
377
|
+
utm_campaign: utm.utm_campaign,
|
|
378
|
+
utm_content: utm.utm_content,
|
|
379
|
+
utm_medium: utm.utm_medium,
|
|
380
|
+
utm_source: utm.utm_source,
|
|
381
|
+
utm_term: utm.utm_term,
|
|
382
|
+
...payload.event_properties
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
if (!settings.apiSecret) {
|
|
386
|
+
throw new actions_core_1.InvalidAuthenticationError('Missing api secret');
|
|
387
|
+
}
|
|
388
|
+
return request(`${utils_1.getApiServerUrl(settings.apiRegion)}/import?strict=1`, {
|
|
389
|
+
method: 'post',
|
|
390
|
+
json: [event],
|
|
391
|
+
headers: {
|
|
392
|
+
authorization: `Basic ${Buffer.from(`${settings.apiSecret}:`).toString('base64')}`
|
|
393
|
+
}
|
|
394
|
+
});
|
|
408
395
|
}
|
|
409
396
|
};
|
|
410
397
|
exports.default = action;
|