@segment/action-destinations 3.239.0 → 3.239.4
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/aggregations-io/index.js +7 -17
- package/dist/destinations/aggregations-io/index.js.map +1 -1
- package/dist/destinations/braze/trackEvent/generated-types.d.ts +0 -1
- package/dist/destinations/braze/trackEvent/index.js +0 -8
- package/dist/destinations/braze/trackEvent/index.js.map +1 -1
- package/dist/destinations/braze/trackPurchase/generated-types.d.ts +0 -1
- package/dist/destinations/braze/trackPurchase/index.js +0 -8
- package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
- package/dist/destinations/braze/utils.js +11 -15
- package/dist/destinations/braze/utils.js.map +1 -1
- package/dist/destinations/criteo-audiences/criteo-audiences.js +6 -11
- package/dist/destinations/criteo-audiences/criteo-audiences.js.map +1 -1
- package/dist/destinations/display-video-360/index.js +1 -1
- package/dist/destinations/display-video-360/index.js.map +1 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +1 -3
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +1 -1
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +0 -26
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/utils.d.ts +0 -10
- package/dist/destinations/index.js +0 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/api.test.js +24 -42
- package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/index.js +10 -6
- package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/types.d.ts +7 -4
- package/dist/destinations/tiktok-offline-conversions/common_fields.js +179 -20
- package/dist/destinations/tiktok-offline-conversions/common_fields.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/formatter.d.ts +1 -0
- package/dist/destinations/tiktok-offline-conversions/formatter.js +11 -1
- package/dist/destinations/tiktok-offline-conversions/formatter.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/index.js +169 -15
- package/dist/destinations/tiktok-offline-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.d.ts +33 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.js.map +1 -0
- package/dist/destinations/{amazon-ads/syncAudiences → tiktok-offline-conversions/reportOfflineEvent}/index.d.ts +1 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js +16 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/generated-types.d.ts +25 -2
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js +4 -29
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/generated-types.d.ts +18 -5
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js +5 -126
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/utils.d.ts +8 -0
- package/dist/destinations/tiktok-offline-conversions/utils.js +67 -0
- package/dist/destinations/tiktok-offline-conversions/utils.js.map +1 -0
- package/package.json +2 -2
- package/dist/destinations/aggregations-io/types.d.ts +0 -8
- package/dist/destinations/aggregations-io/types.js +0 -8
- package/dist/destinations/aggregations-io/types.js.map +0 -1
- package/dist/destinations/amazon-ads/generated-types.d.ts +0 -3
- package/dist/destinations/amazon-ads/generated-types.js.map +0 -1
- package/dist/destinations/amazon-ads/index.d.ts +0 -4
- package/dist/destinations/amazon-ads/index.js +0 -87
- package/dist/destinations/amazon-ads/index.js.map +0 -1
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +0 -2
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js +0 -3
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +0 -1
- package/dist/destinations/amazon-ads/syncAudiences/index.js +0 -15
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +0 -1
- package/dist/destinations/amazon-ads/types.d.ts +0 -22
- package/dist/destinations/amazon-ads/types.js +0 -11
- package/dist/destinations/amazon-ads/types.js.map +0 -1
- /package/dist/destinations/{amazon-ads → tiktok-offline-conversions/reportOfflineEvent}/generated-types.js +0 -0
|
@@ -13,67 +13,49 @@ describe('LinkedIn Conversions', () => {
|
|
|
13
13
|
const linkedIn = new api_1.LinkedInConversions(requestClient);
|
|
14
14
|
it('should fetch a list of ad accounts, with their names', async () => {
|
|
15
15
|
nock_1.default(`${constants_1.BASE_URL}`)
|
|
16
|
-
.get(`/
|
|
17
|
-
.query({ q: '
|
|
16
|
+
.get(`/adAccountUsers`)
|
|
17
|
+
.query({ q: 'authenticatedUser' })
|
|
18
18
|
.reply(200, {
|
|
19
19
|
elements: [
|
|
20
20
|
{
|
|
21
|
-
|
|
22
|
-
notifiedOnCreativeRejection: true,
|
|
23
|
-
notifiedOnNewFeaturesEnabled: true,
|
|
24
|
-
notifiedOnEndOfCampaign: true,
|
|
25
|
-
notifiedOnCampaignOptimization: true,
|
|
26
|
-
type: 'BUSINESS',
|
|
27
|
-
version: {
|
|
28
|
-
versionTag: '6'
|
|
29
|
-
},
|
|
30
|
-
reference: 'urn:li:organization:1122334',
|
|
31
|
-
notifiedOnCreativeApproval: false,
|
|
21
|
+
account: 'urn:li:sponsoredAccount:516413367',
|
|
32
22
|
changeAuditStamps: {
|
|
33
23
|
created: {
|
|
34
24
|
actor: 'urn:li:unknown:0',
|
|
35
|
-
time:
|
|
25
|
+
time: 1500331577000
|
|
36
26
|
},
|
|
37
27
|
lastModified: {
|
|
38
28
|
actor: 'urn:li:unknown:0',
|
|
39
|
-
time:
|
|
29
|
+
time: 1505328748000
|
|
40
30
|
}
|
|
41
31
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
role: 'ACCOUNT_BILLING_ADMIN',
|
|
33
|
+
user: 'urn:li:person:K1RwyVNukt',
|
|
34
|
+
version: {
|
|
35
|
+
versionTag: '89'
|
|
36
|
+
}
|
|
46
37
|
},
|
|
47
38
|
{
|
|
48
|
-
|
|
49
|
-
notifiedOnCreativeRejection: false,
|
|
50
|
-
notifiedOnNewFeaturesEnabled: false,
|
|
51
|
-
notifiedOnEndOfCampaign: false,
|
|
52
|
-
notifiedOnCampaignOptimization: false,
|
|
53
|
-
type: 'BUSINESS',
|
|
54
|
-
version: {
|
|
55
|
-
versionTag: '4'
|
|
56
|
-
},
|
|
57
|
-
reference: 'urn:li:organization:1122334',
|
|
58
|
-
notifiedOnCreativeApproval: false,
|
|
39
|
+
account: 'urn:li:sponsoredAccount:516880883',
|
|
59
40
|
changeAuditStamps: {
|
|
60
41
|
created: {
|
|
61
42
|
actor: 'urn:li:unknown:0',
|
|
62
|
-
time:
|
|
43
|
+
time: 1505326590000
|
|
63
44
|
},
|
|
64
45
|
lastModified: {
|
|
65
46
|
actor: 'urn:li:unknown:0',
|
|
66
|
-
time:
|
|
47
|
+
time: 1505326615000
|
|
67
48
|
}
|
|
68
49
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
50
|
+
role: 'ACCOUNT_BILLING_ADMIN',
|
|
51
|
+
user: 'urn:li:person:K1RwyVNukt',
|
|
52
|
+
version: {
|
|
53
|
+
versionTag: '3'
|
|
54
|
+
}
|
|
73
55
|
}
|
|
74
56
|
],
|
|
75
57
|
paging: {
|
|
76
|
-
count:
|
|
58
|
+
count: 2,
|
|
77
59
|
links: [],
|
|
78
60
|
start: 0,
|
|
79
61
|
total: 2
|
|
@@ -83,12 +65,12 @@ describe('LinkedIn Conversions', () => {
|
|
|
83
65
|
expect(getAdAccountsRes).toEqual({
|
|
84
66
|
choices: [
|
|
85
67
|
{
|
|
86
|
-
label: '
|
|
87
|
-
value: 'urn:li:sponsoredAccount:
|
|
68
|
+
label: 'urn:li:person:K1RwyVNukt',
|
|
69
|
+
value: 'urn:li:sponsoredAccount:516413367'
|
|
88
70
|
},
|
|
89
71
|
{
|
|
90
|
-
label: '
|
|
91
|
-
value: 'urn:li:sponsoredAccount:
|
|
72
|
+
label: 'urn:li:person:K1RwyVNukt',
|
|
73
|
+
value: 'urn:li:sponsoredAccount:516880883'
|
|
92
74
|
}
|
|
93
75
|
]
|
|
94
76
|
});
|
|
@@ -149,7 +131,7 @@ describe('LinkedIn Conversions', () => {
|
|
|
149
131
|
adAccountId: '123456'
|
|
150
132
|
};
|
|
151
133
|
nock_1.default(`${constants_1.BASE_URL}`)
|
|
152
|
-
.get(`/adAccounts/${payload.adAccountId}/adCampaigns?q=search&search=(status:(values:List(ACTIVE
|
|
134
|
+
.get(`/adAccounts/${payload.adAccountId}/adCampaigns?q=search&search=(status:(values:List(ACTIVE)))`)
|
|
153
135
|
.reply(200, {
|
|
154
136
|
paging: {
|
|
155
137
|
start: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.test.js","sourceRoot":"","sources":["../../../../src/destinations/linkedin-conversions/api/api.test.ts"],"names":[],"mappings":";;;;;AAAA,gDAAuB;AACvB,0GAA+E;AAC/E,gCAA4C;AAC5C,4CAAuC;AAEvC,MAAM,aAAa,GAAG,+BAAmB,EAAE,CAAA;AAE3C,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,MAAM,QAAQ,GAAwB,IAAI,yBAAmB,CAAC,aAAa,CAAC,CAAA;QAE5E,EAAE,CAAC,sDAAsD,EAAE,KAAK,IAAI,EAAE;YACpE,cAAI,CAAC,GAAG,oBAAQ,EAAE,CAAC;iBAChB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"api.test.js","sourceRoot":"","sources":["../../../../src/destinations/linkedin-conversions/api/api.test.ts"],"names":[],"mappings":";;;;;AAAA,gDAAuB;AACvB,0GAA+E;AAC/E,gCAA4C;AAC5C,4CAAuC;AAEvC,MAAM,aAAa,GAAG,+BAAmB,EAAE,CAAA;AAE3C,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,MAAM,QAAQ,GAAwB,IAAI,yBAAmB,CAAC,aAAa,CAAC,CAAA;QAE5E,EAAE,CAAC,sDAAsD,EAAE,KAAK,IAAI,EAAE;YACpE,cAAI,CAAC,GAAG,oBAAQ,EAAE,CAAC;iBAChB,GAAG,CAAC,iBAAiB,CAAC;iBACtB,KAAK,CAAC,EAAE,CAAC,EAAE,mBAAmB,EAAE,CAAC;iBACjC,KAAK,CAAC,GAAG,EAAE;gBACV,QAAQ,EAAE;oBACR;wBACE,OAAO,EAAE,mCAAmC;wBAC5C,iBAAiB,EAAE;4BACjB,OAAO,EAAE;gCACP,KAAK,EAAE,kBAAkB;gCACzB,IAAI,EAAE,aAAa;6BACpB;4BACD,YAAY,EAAE;gCACZ,KAAK,EAAE,kBAAkB;gCACzB,IAAI,EAAE,aAAa;6BACpB;yBACF;wBACD,IAAI,EAAE,uBAAuB;wBAC7B,IAAI,EAAE,0BAA0B;wBAChC,OAAO,EAAE;4BACP,UAAU,EAAE,IAAI;yBACjB;qBACF;oBACD;wBACE,OAAO,EAAE,mCAAmC;wBAC5C,iBAAiB,EAAE;4BACjB,OAAO,EAAE;gCACP,KAAK,EAAE,kBAAkB;gCACzB,IAAI,EAAE,aAAa;6BACpB;4BACD,YAAY,EAAE;gCACZ,KAAK,EAAE,kBAAkB;gCACzB,IAAI,EAAE,aAAa;6BACpB;yBACF;wBACD,IAAI,EAAE,uBAAuB;wBAC7B,IAAI,EAAE,0B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CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -64,16 +64,20 @@ class LinkedInConversions {
|
|
|
64
64
|
};
|
|
65
65
|
this.getAdAccounts = async () => {
|
|
66
66
|
try {
|
|
67
|
-
const
|
|
67
|
+
const response = [];
|
|
68
|
+
const result = await this.request(`${constants_1.BASE_URL}/adAccountUsers`, {
|
|
68
69
|
method: 'GET',
|
|
69
70
|
searchParams: {
|
|
70
|
-
q: '
|
|
71
|
+
q: 'authenticatedUser'
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
|
-
|
|
74
|
+
result.data.elements.forEach((item) => {
|
|
75
|
+
response.push(item);
|
|
76
|
+
});
|
|
77
|
+
const choices = response?.map((item) => {
|
|
74
78
|
return {
|
|
75
|
-
label: item.
|
|
76
|
-
value:
|
|
79
|
+
label: item.user,
|
|
80
|
+
value: item.account
|
|
77
81
|
};
|
|
78
82
|
});
|
|
79
83
|
return {
|
|
@@ -146,7 +150,7 @@ class LinkedInConversions {
|
|
|
146
150
|
}
|
|
147
151
|
try {
|
|
148
152
|
const response = [];
|
|
149
|
-
const result = await this.request(`${constants_1.BASE_URL}/adAccounts/${adAccountId}/adCampaigns?q=search&search=(status:(values:List(ACTIVE
|
|
153
|
+
const result = await this.request(`${constants_1.BASE_URL}/adAccounts/${adAccountId}/adCampaigns?q=search&search=(status:(values:List(ACTIVE)))`, {
|
|
150
154
|
method: 'GET'
|
|
151
155
|
});
|
|
152
156
|
result.data.elements.forEach((item) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/linkedin-conversions/api/index.ts"],"names":[],"mappings":";;;AACA,4CAAuC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/linkedin-conversions/api/index.ts"],"names":[],"mappings":";;;AACA,4CAAuC;AAcvC,MAAa,mBAAmB;IAI9B,YA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AE;aACpE,CAAC;SACH,CACF,CAAA;IACH,CAAC;CACF;AAjPD,kDAiPC"}
|
|
@@ -30,11 +30,14 @@ export interface GetAdAccountsAPIResponse {
|
|
|
30
30
|
start: number;
|
|
31
31
|
total: number;
|
|
32
32
|
};
|
|
33
|
-
elements: [
|
|
33
|
+
elements: [Accounts];
|
|
34
34
|
}
|
|
35
|
-
export interface
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
export interface Accounts {
|
|
36
|
+
account: string;
|
|
37
|
+
changeAuditStamps: object;
|
|
38
|
+
role: string;
|
|
39
|
+
user: string;
|
|
40
|
+
version: object;
|
|
38
41
|
}
|
|
39
42
|
export interface AccountsErrorInfo {
|
|
40
43
|
response: {
|
|
@@ -6,12 +6,12 @@ exports.commonFields = {
|
|
|
6
6
|
label: 'Event Name',
|
|
7
7
|
type: 'string',
|
|
8
8
|
required: true,
|
|
9
|
-
description: 'Conversion event name. Please refer to the "
|
|
9
|
+
description: 'Conversion event name. Please refer to the "Offline Standard Events" section on in TikTok’s [Events API 2.0 documentation](https://business-api.tiktok.com/portal/docs?id=1771101186666498) for accepted event names.'
|
|
10
10
|
},
|
|
11
11
|
event_id: {
|
|
12
12
|
label: 'Event ID',
|
|
13
13
|
type: 'string',
|
|
14
|
-
description: '
|
|
14
|
+
description: 'Any hashed ID that can identify a unique user/session.',
|
|
15
15
|
default: {
|
|
16
16
|
'@path': '$.messageId'
|
|
17
17
|
}
|
|
@@ -19,8 +19,7 @@ exports.commonFields = {
|
|
|
19
19
|
timestamp: {
|
|
20
20
|
label: 'Event Timestamp',
|
|
21
21
|
type: 'string',
|
|
22
|
-
|
|
23
|
-
description: 'Timestamp that the event took place, in ISO 8601 format. e.g. 2019-06-12T19:11:01.152Z',
|
|
22
|
+
description: 'Timestamp that the event took place, in ISO 8601 format.',
|
|
24
23
|
default: {
|
|
25
24
|
'@path': '$.timestamp'
|
|
26
25
|
}
|
|
@@ -34,7 +33,7 @@ exports.commonFields = {
|
|
|
34
33
|
'@if': {
|
|
35
34
|
exists: { '@path': '$.properties.phone' },
|
|
36
35
|
then: { '@path': '$.properties.phone' },
|
|
37
|
-
else: { '@path': '$.traits.phone' }
|
|
36
|
+
else: { '@path': '$.context.traits.phone' }
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
},
|
|
@@ -47,14 +46,14 @@ exports.commonFields = {
|
|
|
47
46
|
'@if': {
|
|
48
47
|
exists: { '@path': '$.properties.email' },
|
|
49
48
|
then: { '@path': '$.properties.email' },
|
|
50
|
-
else: { '@path': '$.traits.email' }
|
|
49
|
+
else: { '@path': '$.context.traits.email' }
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
},
|
|
54
53
|
order_id: {
|
|
55
54
|
label: 'Order ID',
|
|
56
55
|
type: 'string',
|
|
57
|
-
description: '
|
|
56
|
+
description: 'Order ID of the transaction.',
|
|
58
57
|
default: {
|
|
59
58
|
'@path': '$.properties.order_id'
|
|
60
59
|
}
|
|
@@ -62,24 +61,184 @@ exports.commonFields = {
|
|
|
62
61
|
shop_id: {
|
|
63
62
|
label: 'Shop ID',
|
|
64
63
|
type: 'string',
|
|
65
|
-
description: '
|
|
64
|
+
description: 'Shop ID of the transaction.',
|
|
66
65
|
default: {
|
|
67
66
|
'@path': '$.properties.shop_id'
|
|
68
67
|
}
|
|
69
68
|
},
|
|
70
|
-
|
|
71
|
-
label: '
|
|
69
|
+
external_ids: {
|
|
70
|
+
label: 'External ID',
|
|
71
|
+
description: 'Uniquely identifies the user who triggered the conversion event. Segment will hash this value before sending to TikTok.',
|
|
72
|
+
type: 'string',
|
|
73
|
+
multiple: true,
|
|
74
|
+
default: {
|
|
75
|
+
'@if': {
|
|
76
|
+
exists: { '@path': '$.userId' },
|
|
77
|
+
then: { '@path': '$.userId' },
|
|
78
|
+
else: { '@path': '$.anonymousId' }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
ttclid: {
|
|
83
|
+
label: 'TikTok Click ID',
|
|
84
|
+
description: 'The value of the ttclid used to match website visitor events with TikTok ads. The ttclid is valid for 7 days. See [Set up ttclid](https://ads.tiktok.com/marketing_api/docs?rid=4eezrhr6lg4&id=1681728034437121) for details.',
|
|
85
|
+
type: 'string',
|
|
86
|
+
default: {
|
|
87
|
+
'@if': {
|
|
88
|
+
exists: { '@path': '$.properties.ttclid' },
|
|
89
|
+
then: { '@path': '$.properties.ttclid' },
|
|
90
|
+
else: { '@path': '$.integrations.TikTok Offline Conversions.ttclid' }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
ttp: {
|
|
95
|
+
label: 'TikTok Cookie ID',
|
|
96
|
+
description: 'TikTok Cookie ID. If you also use Pixel SDK and have enabled cookies, Pixel SDK automatically saves a unique identifier in the `_ttp` cookie. The value of `_ttp` is used to match website visitor events with TikTok ads. You can extract the value of `_ttp` and attach the value here. To learn more about the `ttp` parameter, refer to [Events API 2.0 - Send TikTok Cookie](https://ads.tiktok.com/marketing_api/docs?id=%201771100936446977) (`_ttp`).',
|
|
97
|
+
type: 'string',
|
|
98
|
+
default: {
|
|
99
|
+
'@if': {
|
|
100
|
+
exists: { '@path': '$.properties.ttp' },
|
|
101
|
+
then: { '@path': '$.properties.ttp' },
|
|
102
|
+
else: { '@path': '$.integrations.TikTok Offline Conversions.ttp' }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
lead_id: {
|
|
107
|
+
label: 'TikTok Lead ID',
|
|
108
|
+
description: 'ID of TikTok leads. Every lead will have its own lead_id when exported from TikTok. This feature is in Beta. Please contact your TikTok representative to inquire regarding availability',
|
|
109
|
+
type: 'string',
|
|
110
|
+
default: { '@path': '$.properties.lead_id' }
|
|
111
|
+
},
|
|
112
|
+
locale: {
|
|
113
|
+
label: 'Locale',
|
|
114
|
+
description: 'The BCP 47 language identifier. For reference, refer to the [IETF BCP 47 standardized code](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).',
|
|
115
|
+
type: 'string',
|
|
116
|
+
default: {
|
|
117
|
+
'@path': '$.context.locale'
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
url: {
|
|
121
|
+
label: 'Page URL',
|
|
122
|
+
type: 'string',
|
|
123
|
+
description: 'The page URL where the conversion event took place.',
|
|
124
|
+
default: {
|
|
125
|
+
'@path': '$.context.page.url'
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
referrer: {
|
|
129
|
+
label: 'Page Referrer',
|
|
130
|
+
type: 'string',
|
|
131
|
+
description: 'The page referrer.',
|
|
132
|
+
default: {
|
|
133
|
+
'@path': '$.context.page.referrer'
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
ip: {
|
|
137
|
+
label: 'IP Address',
|
|
138
|
+
type: 'string',
|
|
139
|
+
description: 'IP address of the browser.',
|
|
140
|
+
default: {
|
|
141
|
+
'@path': '$.context.ip'
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
user_agent: {
|
|
145
|
+
label: 'User Agent',
|
|
146
|
+
type: 'string',
|
|
147
|
+
description: 'User agent from the user’s device.',
|
|
148
|
+
default: {
|
|
149
|
+
'@path': '$.context.userAgent'
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
contents: {
|
|
153
|
+
label: 'Contents',
|
|
154
|
+
type: 'object',
|
|
155
|
+
multiple: true,
|
|
156
|
+
description: 'Related items in a web event.',
|
|
157
|
+
properties: {
|
|
158
|
+
price: {
|
|
159
|
+
label: 'Price',
|
|
160
|
+
description: 'Price of the item.',
|
|
161
|
+
type: 'number'
|
|
162
|
+
},
|
|
163
|
+
quantity: {
|
|
164
|
+
label: 'Quantity',
|
|
165
|
+
description: 'Number of items.',
|
|
166
|
+
type: 'number'
|
|
167
|
+
},
|
|
168
|
+
content_category: {
|
|
169
|
+
label: 'Content Category',
|
|
170
|
+
description: 'Category of the product item.',
|
|
171
|
+
type: 'string'
|
|
172
|
+
},
|
|
173
|
+
content_id: {
|
|
174
|
+
label: 'Content ID',
|
|
175
|
+
description: 'ID of the product item.',
|
|
176
|
+
type: 'string'
|
|
177
|
+
},
|
|
178
|
+
content_name: {
|
|
179
|
+
label: 'Content Name',
|
|
180
|
+
description: 'Name of the product item.',
|
|
181
|
+
type: 'string'
|
|
182
|
+
},
|
|
183
|
+
brand: {
|
|
184
|
+
label: 'Brand',
|
|
185
|
+
description: 'Brand name of the product item.',
|
|
186
|
+
type: 'string'
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
content_type: {
|
|
191
|
+
label: 'Content Type',
|
|
192
|
+
description: 'Type of the product item. When the `content_id` in the `contents` parameter is specified as `sku_id`, set this field to `product`. When the `content_id` in the `contents` parameter is specified as `item_group_id`, set this field to `product_group`.',
|
|
193
|
+
type: 'string',
|
|
194
|
+
choices: ['product', 'product_group'],
|
|
195
|
+
default: 'product'
|
|
196
|
+
},
|
|
197
|
+
currency: {
|
|
198
|
+
label: 'Currency',
|
|
199
|
+
type: 'string',
|
|
200
|
+
description: 'Currency for the value specified as ISO 4217 code.',
|
|
201
|
+
default: {
|
|
202
|
+
'@path': '$.properties.currency'
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
value: {
|
|
206
|
+
label: 'Value',
|
|
207
|
+
type: 'number',
|
|
208
|
+
description: 'Value of the order or items sold.',
|
|
209
|
+
default: {
|
|
210
|
+
'@if': {
|
|
211
|
+
exists: { '@path': '$.properties.value' },
|
|
212
|
+
then: { '@path': '$.properties.value' },
|
|
213
|
+
else: { '@path': '$.properties.revenue' }
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
description: {
|
|
218
|
+
label: 'Description',
|
|
219
|
+
type: 'string',
|
|
220
|
+
description: 'A string description of the web event.'
|
|
221
|
+
},
|
|
222
|
+
query: {
|
|
223
|
+
label: 'Query',
|
|
224
|
+
type: 'string',
|
|
225
|
+
description: 'The text string that was searched for.',
|
|
226
|
+
default: {
|
|
227
|
+
'@path': '$.properties.query'
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
limited_data_use: {
|
|
231
|
+
label: 'Limited Data Use',
|
|
232
|
+
type: 'boolean',
|
|
233
|
+
description: 'Use this field to flag an event for limited data processing. TikTok will recognize this parameter as a request for limited data processing, and will limit its processing activities accordingly if the event shared occurred in an eligible location. To learn more about the Limited Data Use feature, refer to [Events API 2.0 - Limited Data Use](https://ads.tiktok.com/marketing_api/docs?id=1771101204435970).',
|
|
234
|
+
default: {
|
|
235
|
+
'@path': '$.properties.limited_data_use'
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
test_event_code: {
|
|
239
|
+
label: 'Test Event Code',
|
|
72
240
|
type: 'string',
|
|
73
|
-
description: 'Event
|
|
74
|
-
choices: [
|
|
75
|
-
{ label: 'Email', value: 'email' },
|
|
76
|
-
{ label: 'Website', value: 'website' },
|
|
77
|
-
{ label: 'Phone call', value: 'phone_call' },
|
|
78
|
-
{ label: 'In store', value: 'in_store' },
|
|
79
|
-
{ label: 'CRM', value: 'crm' },
|
|
80
|
-
{ label: 'Other', value: 'other' }
|
|
81
|
-
],
|
|
82
|
-
default: 'in_store'
|
|
241
|
+
description: 'Use this field to specify that events should be test events rather than actual traffic. You can find your Test Event Code in your TikTok Events Manager under the "Test Event" tab. You\'ll want to remove your Test Event Code when sending real traffic through this integration.'
|
|
83
242
|
}
|
|
84
243
|
};
|
|
85
244
|
//# sourceMappingURL=common_fields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common_fields.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-offline-conversions/common_fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAA+B;IACtD,KAAK,EAAE;QACL,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"common_fields.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-offline-conversions/common_f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,eAAe,EAAE;QACf,KAAK,EAAE,iBAAiB;QACxB,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,qRAAqR;KACxR;CACF,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatPhones = exports.formatEmails = void 0;
|
|
3
|
+
exports.formatUserIds = exports.formatPhones = exports.formatEmails = void 0;
|
|
4
4
|
const crypto_1 = require("crypto");
|
|
5
5
|
const formatEmails = (email_addresses) => {
|
|
6
6
|
const result = [];
|
|
@@ -27,6 +27,16 @@ const formatPhones = (phone_numbers) => {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
exports.formatPhones = formatPhones;
|
|
30
|
+
function formatUserIds(userIds) {
|
|
31
|
+
const result = [];
|
|
32
|
+
if (userIds) {
|
|
33
|
+
userIds.forEach((userId) => {
|
|
34
|
+
result.push(hashAndEncode(userId.toLowerCase()));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
exports.formatUserIds = formatUserIds;
|
|
30
40
|
function hashAndEncode(property) {
|
|
31
41
|
return crypto_1.createHash('sha256').update(property).digest('hex');
|
|
32
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-offline-conversions/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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