@segment/action-destinations 3.437.1-staging-ea6c83c19.0 → 3.439.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations/criteo-audiences/addUserToAudience/generated-types.d.ts +1 -0
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js +7 -0
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js.map +1 -1
- package/dist/destinations/criteo-audiences/removeUserFromAudience/generated-types.d.ts +1 -0
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js +7 -0
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js.map +1 -1
- package/dist/destinations/first-party-dv360/_tests_/index.test.js +2 -2
- package/dist/destinations/first-party-dv360/_tests_/index.test.js.map +1 -1
- package/dist/destinations/first-party-dv360/functions.d.ts +1 -1
- package/dist/destinations/first-party-dv360/generated-types.d.ts +1 -1
- package/dist/destinations/first-party-dv360/index.js +2 -4
- package/dist/destinations/first-party-dv360/index.js.map +1 -1
- package/dist/destinations/first-party-dv360/types.d.ts +2 -2
- package/dist/destinations/kafka/generated-types.d.ts +3 -0
- package/dist/destinations/kafka/index.js +21 -0
- package/dist/destinations/kafka/index.js.map +1 -1
- package/dist/destinations/kafka/send/generated-types.d.ts +0 -1
- package/dist/destinations/kafka/send/index.js +0 -7
- package/dist/destinations/kafka/send/index.js.map +1 -1
- package/dist/destinations/kafka/utils.js +13 -0
- package/dist/destinations/kafka/utils.js.map +1 -1
- package/dist/destinations/linkedin-audiences/updateAudience/fields.js.map +1 -1
- package/dist/destinations/ms-bing-ads-audiences/index.js +1 -1
- package/dist/destinations/ms-bing-ads-audiences/index.js.map +1 -1
- package/dist/destinations/ms-bing-ads-audiences/syncAudiences/fields.js +13 -17
- package/dist/destinations/ms-bing-ads-audiences/syncAudiences/fields.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/index.js +1 -3
- package/dist/destinations/salesforce-marketing-cloud/index.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.d.ts +0 -3
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js +0 -109
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js.map +1 -1
- package/dist/destinations/snap-audiences/constants.d.ts +2 -0
- package/dist/destinations/snap-audiences/constants.js +6 -0
- package/dist/destinations/snap-audiences/constants.js.map +1 -0
- package/dist/destinations/snap-audiences/index.js +24 -40
- package/dist/destinations/snap-audiences/index.js.map +1 -1
- package/dist/destinations/snap-audiences/syncAudience/constants.d.ts +5 -0
- package/dist/destinations/snap-audiences/syncAudience/constants.js +9 -0
- package/dist/destinations/snap-audiences/syncAudience/constants.js.map +1 -0
- package/dist/destinations/snap-audiences/syncAudience/fields.d.ts +2 -0
- package/dist/destinations/snap-audiences/syncAudience/fields.js +90 -0
- package/dist/destinations/snap-audiences/syncAudience/fields.js.map +1 -0
- package/dist/destinations/snap-audiences/syncAudience/functions.d.ts +5 -0
- package/dist/destinations/snap-audiences/syncAudience/functions.js +119 -0
- package/dist/destinations/snap-audiences/syncAudience/functions.js.map +1 -0
- package/dist/destinations/snap-audiences/syncAudience/generated-types.d.ts +2 -1
- package/dist/destinations/snap-audiences/syncAudience/index.js +6 -146
- package/dist/destinations/snap-audiences/syncAudience/index.js.map +1 -1
- package/dist/destinations/snap-audiences/syncAudience/types.d.ts +18 -0
- package/dist/destinations/snap-audiences/syncAudience/types.js.map +1 -0
- package/dist/destinations/snap-audiences/types.d.ts +19 -0
- package/dist/destinations/snap-audiences/types.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/common-constants.d.ts +2 -0
- package/dist/destinations/stackadapt-audiences/common-constants.js +6 -0
- package/dist/destinations/stackadapt-audiences/common-constants.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/common-functions.d.ts +0 -7
- package/dist/destinations/stackadapt-audiences/common-functions.js +0 -193
- package/dist/destinations/stackadapt-audiences/common-functions.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/common-types.d.ts +15 -0
- package/dist/destinations/stackadapt-audiences/{forwardProfile/generated-types.js → common-types.js} +1 -1
- package/dist/destinations/stackadapt-audiences/common-types.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/{constants.js → forwardAudienceEvent/constants.js} +1 -22
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/constants.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.d.ts +1 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.js +184 -1
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.d.ts +6 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.js +184 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/generated-types.d.ts +0 -3
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/index.js +4 -5
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/index.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/{types.d.ts → forwardAudienceEvent/types.d.ts} +0 -15
- package/dist/destinations/{yonoma/sendEvent/generated-types.js → stackadapt-audiences/forwardAudienceEvent/types.js} +1 -1
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/types.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/index.d.ts +1 -1
- package/dist/destinations/stackadapt-audiences/index.js +5 -7
- package/dist/destinations/stackadapt-audiences/index.js.map +1 -1
- package/dist/destinations/yonoma/index.js +0 -2
- package/dist/destinations/yonoma/index.js.map +1 -1
- package/dist/destinations/yonoma/trackEvent/generated-types.d.ts +24 -3
- package/dist/destinations/yonoma/trackEvent/index.js +140 -16
- package/dist/destinations/yonoma/trackEvent/index.js.map +1 -1
- package/dist/destinations/yonoma/trackEvent/types.d.ts +24 -3
- package/dist/destinations/yonoma/trackPageView/generated-types.d.ts +23 -7
- package/dist/destinations/yonoma/trackPageView/index.js +133 -50
- package/dist/destinations/yonoma/trackPageView/index.js.map +1 -1
- package/dist/destinations/yonoma/trackPageView/types.d.ts +22 -4
- package/dist/destinations/yonoma/upsertContact/generated-types.d.ts +25 -3
- package/dist/destinations/yonoma/upsertContact/index.js +153 -21
- package/dist/destinations/yonoma/upsertContact/index.js.map +1 -1
- package/dist/destinations/yonoma/upsertContact/types.d.ts +26 -4
- package/package.json +4 -4
- package/dist/destinations/salesforce-marketing-cloud/_tests_/asyncDataExtension.test.d.ts +0 -1
- package/dist/destinations/salesforce-marketing-cloud/_tests_/asyncDataExtension.test.js +0 -96
- package/dist/destinations/salesforce-marketing-cloud/_tests_/asyncDataExtension.test.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/generated-types.d.ts +0 -58
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/generated-types.js +0 -3
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/generated-types.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/index.d.ts +0 -5
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/index.js +0 -61
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/index.js.map +0 -1
- package/dist/destinations/snap-audiences/syncAudience/utils.d.ts +0 -8
- package/dist/destinations/snap-audiences/syncAudience/utils.js +0 -61
- package/dist/destinations/snap-audiences/syncAudience/utils.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/common-fields.d.ts +0 -2
- package/dist/destinations/stackadapt-audiences/common-fields.js +0 -227
- package/dist/destinations/stackadapt-audiences/common-fields.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/constants.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/forwardProfile/generated-types.d.ts +0 -26
- package/dist/destinations/stackadapt-audiences/forwardProfile/generated-types.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/forwardProfile/index.d.ts +0 -5
- package/dist/destinations/stackadapt-audiences/forwardProfile/index.js +0 -140
- package/dist/destinations/stackadapt-audiences/forwardProfile/index.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/types.js.map +0 -1
- package/dist/destinations/yonoma/sendEvent/constants.d.ts +0 -1
- package/dist/destinations/yonoma/sendEvent/constants.js +0 -5
- package/dist/destinations/yonoma/sendEvent/constants.js.map +0 -1
- package/dist/destinations/yonoma/sendEvent/functions.d.ts +0 -1
- package/dist/destinations/yonoma/sendEvent/functions.js +0 -19
- package/dist/destinations/yonoma/sendEvent/functions.js.map +0 -1
- package/dist/destinations/yonoma/sendEvent/generated-types.d.ts +0 -13
- package/dist/destinations/yonoma/sendEvent/generated-types.js.map +0 -1
- package/dist/destinations/yonoma/sendEvent/index.d.ts +0 -5
- package/dist/destinations/yonoma/sendEvent/index.js +0 -103
- package/dist/destinations/yonoma/sendEvent/index.js.map +0 -1
- package/dist/destinations/yonoma/sendEvent/types.d.ts +0 -10
- package/dist/destinations/yonoma/sendEvent/types.js.map +0 -1
- /package/dist/destinations/{stackadapt-audiences → snap-audiences/syncAudience}/types.js +0 -0
- /package/dist/destinations/{yonoma/sendEvent → snap-audiences}/types.js +0 -0
- /package/dist/destinations/stackadapt-audiences/{constants.d.ts → forwardAudienceEvent/constants.d.ts} +0 -0
|
@@ -17,14 +17,15 @@ const action = {
|
|
|
17
17
|
identifiers: {
|
|
18
18
|
label: 'Identifiers',
|
|
19
19
|
type: 'object',
|
|
20
|
-
description: 'Unique identifiers for the contact.
|
|
20
|
+
description: 'Unique identifiers for the contact. User ID and email are required. Anonymous ID is optional.',
|
|
21
21
|
required: true,
|
|
22
22
|
additionalProperties: false,
|
|
23
23
|
properties: {
|
|
24
24
|
userId: {
|
|
25
25
|
label: 'User ID',
|
|
26
26
|
type: 'string',
|
|
27
|
-
description: 'Unique user identifier from your app.'
|
|
27
|
+
description: 'Unique user identifier from your app.',
|
|
28
|
+
required: true
|
|
28
29
|
},
|
|
29
30
|
anonymousId: {
|
|
30
31
|
label: 'Anonymous ID',
|
|
@@ -34,7 +35,8 @@ const action = {
|
|
|
34
35
|
email: {
|
|
35
36
|
label: 'Email',
|
|
36
37
|
type: 'string',
|
|
37
|
-
description: "Contact's email address.
|
|
38
|
+
description: "Contact's email address.",
|
|
39
|
+
required: true
|
|
38
40
|
}
|
|
39
41
|
},
|
|
40
42
|
default: {
|
|
@@ -62,24 +64,141 @@ const action = {
|
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
66
|
},
|
|
65
|
-
properties: {
|
|
66
|
-
label: 'Event Properties',
|
|
67
|
-
type: 'object',
|
|
68
|
-
description: 'Additional properties associated with the event.',
|
|
69
|
-
required: false,
|
|
70
|
-
defaultObjectUI: 'keyvalue',
|
|
71
|
-
default: { '@path': '$.properties' }
|
|
72
|
-
},
|
|
73
67
|
timestamp: {
|
|
74
68
|
label: 'Timestamp',
|
|
75
69
|
type: 'string',
|
|
76
70
|
description: 'The timestamp of the event. Defaults to the current time if not provided.',
|
|
77
71
|
format: 'date-time',
|
|
78
72
|
default: { '@path': '$.timestamp' }
|
|
73
|
+
},
|
|
74
|
+
ip: {
|
|
75
|
+
label: 'IP Address',
|
|
76
|
+
type: 'string',
|
|
77
|
+
description: 'The IP address of the user. Defaults to the current user IP if not provided.',
|
|
78
|
+
default: { '@path': '$.context.ip' }
|
|
79
|
+
},
|
|
80
|
+
userAgent: {
|
|
81
|
+
label: 'User Agent',
|
|
82
|
+
type: 'string',
|
|
83
|
+
description: 'The user agent of the user.',
|
|
84
|
+
default: { '@path': '$.context.userAgent' }
|
|
85
|
+
},
|
|
86
|
+
page: {
|
|
87
|
+
label: 'Page',
|
|
88
|
+
type: 'object',
|
|
89
|
+
description: 'The details of the page being viewed.',
|
|
90
|
+
properties: {
|
|
91
|
+
url: {
|
|
92
|
+
label: 'Page URL',
|
|
93
|
+
type: 'string',
|
|
94
|
+
description: 'Full URL of the page visited.'
|
|
95
|
+
},
|
|
96
|
+
title: {
|
|
97
|
+
label: 'Page Title',
|
|
98
|
+
type: 'string',
|
|
99
|
+
description: 'Title of the page.'
|
|
100
|
+
},
|
|
101
|
+
referrer: {
|
|
102
|
+
label: 'Referrer URL',
|
|
103
|
+
type: 'string',
|
|
104
|
+
description: 'URL of the referring page.'
|
|
105
|
+
},
|
|
106
|
+
path: {
|
|
107
|
+
label: 'Page Path',
|
|
108
|
+
type: 'string',
|
|
109
|
+
description: 'Path of the page being viewed.'
|
|
110
|
+
},
|
|
111
|
+
search: {
|
|
112
|
+
label: 'Search Query',
|
|
113
|
+
type: 'string',
|
|
114
|
+
description: 'Search query used to find the page.'
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
default: {
|
|
118
|
+
title: { '@path': '$.context.page.title' },
|
|
119
|
+
url: { '@path': '$.context.page.url' },
|
|
120
|
+
referrer: { '@path': '$.context.page.referrer' },
|
|
121
|
+
path: { '@path': '$.context.page.path' },
|
|
122
|
+
search: { '@path': '$.context.page.search' }
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
campaign: {
|
|
126
|
+
label: 'Campaign',
|
|
127
|
+
type: 'object',
|
|
128
|
+
description: 'The marketing campaign that referred the user to the site.',
|
|
129
|
+
properties: {
|
|
130
|
+
name: {
|
|
131
|
+
label: 'UTM Campaign Name',
|
|
132
|
+
type: 'string',
|
|
133
|
+
description: 'Name of the campaign.'
|
|
134
|
+
},
|
|
135
|
+
source: {
|
|
136
|
+
label: 'UTM Campaign Source',
|
|
137
|
+
type: 'string',
|
|
138
|
+
description: 'Source of the campaign UTM parameter.'
|
|
139
|
+
},
|
|
140
|
+
medium: {
|
|
141
|
+
label: 'UTM Campaign Medium',
|
|
142
|
+
type: 'string',
|
|
143
|
+
description: 'Medium of the campaign UTM parameter.'
|
|
144
|
+
},
|
|
145
|
+
term: {
|
|
146
|
+
label: 'UTM Campaign Term',
|
|
147
|
+
type: 'string',
|
|
148
|
+
description: 'Term or keyword of the campaign UTM parameter.'
|
|
149
|
+
},
|
|
150
|
+
content: {
|
|
151
|
+
label: 'UTM Campaign Content',
|
|
152
|
+
type: 'string',
|
|
153
|
+
description: 'Content of the campaign UTM parameter.'
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
default: {
|
|
157
|
+
name: { '@path': '$.context.campaign.name' },
|
|
158
|
+
source: { '@path': '$.context.campaign.source' },
|
|
159
|
+
medium: { '@path': '$.context.campaign.medium' },
|
|
160
|
+
term: { '@path': '$.context.campaign.term' },
|
|
161
|
+
content: { '@path': '$.context.campaign.content' }
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
location: {
|
|
165
|
+
label: 'Location',
|
|
166
|
+
type: 'object',
|
|
167
|
+
description: 'The geographic location of the user.',
|
|
168
|
+
properties: {
|
|
169
|
+
country: {
|
|
170
|
+
label: 'Country',
|
|
171
|
+
type: 'string',
|
|
172
|
+
description: 'Country of the user.'
|
|
173
|
+
},
|
|
174
|
+
region: {
|
|
175
|
+
label: 'Region/State',
|
|
176
|
+
type: 'string',
|
|
177
|
+
description: 'Region or state of the user.'
|
|
178
|
+
},
|
|
179
|
+
city: {
|
|
180
|
+
label: 'City',
|
|
181
|
+
type: 'string',
|
|
182
|
+
description: 'City of the user.'
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
default: {
|
|
186
|
+
country: { '@path': '$.context.location.country' },
|
|
187
|
+
region: { '@path': '$.context.location.region' },
|
|
188
|
+
city: { '@path': '$.context.location.city' }
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
properties: {
|
|
192
|
+
label: 'Event Properties',
|
|
193
|
+
type: 'object',
|
|
194
|
+
description: 'Properties associated with the event.',
|
|
195
|
+
required: false,
|
|
196
|
+
defaultObjectUI: 'keyvalue',
|
|
197
|
+
default: { '@path': '$.properties' }
|
|
79
198
|
}
|
|
80
199
|
},
|
|
81
200
|
perform: async (request, { payload }) => {
|
|
82
|
-
const { event,
|
|
201
|
+
const { event, identifiers: { userId, email }, identifiers: { anonymousId } = {}, listId, timestamp, ip, userAgent, page, campaign, location, properties } = payload;
|
|
83
202
|
if (!userId && !email && !anonymousId) {
|
|
84
203
|
throw new actions_core_1.PayloadValidationError('At least one identifier (userId, email, or anonymousId) is required.');
|
|
85
204
|
}
|
|
@@ -87,12 +206,17 @@ const action = {
|
|
|
87
206
|
delete properties?.list_id;
|
|
88
207
|
const json = {
|
|
89
208
|
event,
|
|
90
|
-
|
|
209
|
+
userId,
|
|
91
210
|
...(anonymousId ? { anonymousId } : {}),
|
|
92
|
-
|
|
211
|
+
email,
|
|
93
212
|
listId,
|
|
94
|
-
|
|
95
|
-
|
|
213
|
+
timestamp,
|
|
214
|
+
ip,
|
|
215
|
+
userAgent,
|
|
216
|
+
page,
|
|
217
|
+
campaign,
|
|
218
|
+
location,
|
|
219
|
+
properties
|
|
96
220
|
};
|
|
97
221
|
return await request(constants_1.TRACK_EVENT_URL, {
|
|
98
222
|
method: 'POST',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/trackEvent/index.ts"],"names":[],"mappings":";;AAAA,wDAAgF;AAIhF,2CAA6C;AAE7C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,+GAA+G;IAC5H,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SAChC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/trackEvent/index.ts"],"names":[],"mappings":";;AAAA,wDAAgF;AAIhF,2CAA6C;AAE7C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAA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M,IAAI,qCAAsB,CAAC,sEAAsE,CAAC,CAAA;QAC1G,CAAC;QAED,OAAO,UAAU,EAAE,KAAK,CAAA;QACxB,OAAO,UAAU,EAAE,OAAO,CAAA;QAE1B,MAAM,IAAI,GAAmB;YAC3B,KAAK;YACL,MAAM;YACN,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvC,KAAK;YACL,MAAM;YACN,SAAS;YACT,EAAE;YACF,SAAS;YACT,IAAI;YACJ,QAAQ;YACR,QAAQ;YACR,UAAU;SACX,CAAA;QAED,OAAO,MAAM,OAAO,CAAC,2BAAe,EAAE;YACpC,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAA;IAEJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
export interface TrackEventJSON {
|
|
2
2
|
event: string;
|
|
3
|
-
userId
|
|
3
|
+
userId: string;
|
|
4
4
|
anonymousId?: string;
|
|
5
|
-
email
|
|
5
|
+
email: string;
|
|
6
6
|
listId: string;
|
|
7
|
+
timestamp?: string;
|
|
8
|
+
ip?: string;
|
|
9
|
+
userAgent?: string;
|
|
10
|
+
page?: {
|
|
11
|
+
url?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
referrer?: string;
|
|
14
|
+
path?: string;
|
|
15
|
+
search?: string;
|
|
16
|
+
};
|
|
17
|
+
campaign?: {
|
|
18
|
+
name?: string;
|
|
19
|
+
source?: string;
|
|
20
|
+
medium?: string;
|
|
21
|
+
term?: string;
|
|
22
|
+
content?: string;
|
|
23
|
+
};
|
|
24
|
+
location?: {
|
|
25
|
+
country?: string;
|
|
26
|
+
region?: string;
|
|
27
|
+
city?: string;
|
|
28
|
+
};
|
|
7
29
|
properties?: {
|
|
8
30
|
[key: string]: unknown;
|
|
9
31
|
};
|
|
10
|
-
timestamp?: string | number;
|
|
11
32
|
}
|
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
|
|
3
|
-
title?: string;
|
|
4
|
-
url: string;
|
|
5
|
-
referrer?: string;
|
|
6
|
-
};
|
|
7
|
-
identifiers: {
|
|
2
|
+
identifiers?: {
|
|
8
3
|
userId?: string;
|
|
9
4
|
anonymousId?: string;
|
|
10
5
|
email?: string;
|
|
11
6
|
};
|
|
12
7
|
listId: string;
|
|
8
|
+
timestamp?: string;
|
|
9
|
+
ip?: string;
|
|
10
|
+
userAgent?: string;
|
|
11
|
+
page?: {
|
|
12
|
+
url?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
referrer?: string;
|
|
15
|
+
path?: string;
|
|
16
|
+
search?: string;
|
|
17
|
+
};
|
|
18
|
+
campaign?: {
|
|
19
|
+
name?: string;
|
|
20
|
+
source?: string;
|
|
21
|
+
medium?: string;
|
|
22
|
+
term?: string;
|
|
23
|
+
content?: string;
|
|
24
|
+
};
|
|
25
|
+
location?: {
|
|
26
|
+
country?: string;
|
|
27
|
+
region?: string;
|
|
28
|
+
city?: string;
|
|
29
|
+
};
|
|
13
30
|
properties?: {
|
|
14
31
|
[k: string]: unknown;
|
|
15
32
|
};
|
|
16
|
-
timestamp?: string;
|
|
17
33
|
}
|
|
@@ -1,46 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
4
3
|
const constants_1 = require("./constants");
|
|
5
4
|
const action = {
|
|
6
5
|
title: 'Track Page View',
|
|
7
6
|
description: 'Log page visits to build behavioral profiles and trigger view-based automations in Yonoma.',
|
|
8
7
|
defaultSubscription: 'type = "page"',
|
|
9
8
|
fields: {
|
|
10
|
-
pageDetails: {
|
|
11
|
-
label: 'Page Details',
|
|
12
|
-
type: 'object',
|
|
13
|
-
description: 'The details of the page being viewed.',
|
|
14
|
-
required: true,
|
|
15
|
-
properties: {
|
|
16
|
-
title: {
|
|
17
|
-
label: 'Page Title',
|
|
18
|
-
type: 'string',
|
|
19
|
-
description: 'Title of the page.'
|
|
20
|
-
},
|
|
21
|
-
url: {
|
|
22
|
-
label: 'Page URL',
|
|
23
|
-
type: 'string',
|
|
24
|
-
description: 'Full URL of the page visited.',
|
|
25
|
-
required: true
|
|
26
|
-
},
|
|
27
|
-
referrer: {
|
|
28
|
-
label: 'Referrer URL',
|
|
29
|
-
type: 'string',
|
|
30
|
-
description: 'URL of the referring page.'
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
default: {
|
|
34
|
-
title: { '@path': '$.context.page.title' },
|
|
35
|
-
url: { '@path': '$.context.page.url' },
|
|
36
|
-
referrer: { '@path': '$.context.page.referrer' }
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
9
|
identifiers: {
|
|
40
10
|
label: 'Identifiers',
|
|
41
11
|
type: 'object',
|
|
42
|
-
description: 'Unique identifiers for the contact.
|
|
43
|
-
required: true,
|
|
12
|
+
description: 'Unique identifiers for the contact.',
|
|
44
13
|
additionalProperties: false,
|
|
45
14
|
properties: {
|
|
46
15
|
userId: {
|
|
@@ -56,7 +25,7 @@ const action = {
|
|
|
56
25
|
email: {
|
|
57
26
|
label: 'Email',
|
|
58
27
|
type: 'string',
|
|
59
|
-
description: "Contact's email address.
|
|
28
|
+
description: "Contact's email address."
|
|
60
29
|
}
|
|
61
30
|
},
|
|
62
31
|
default: {
|
|
@@ -84,39 +53,153 @@ const action = {
|
|
|
84
53
|
}
|
|
85
54
|
}
|
|
86
55
|
},
|
|
87
|
-
properties: {
|
|
88
|
-
label: 'Event Properties',
|
|
89
|
-
type: 'object',
|
|
90
|
-
description: 'Additional properties associated with the event.',
|
|
91
|
-
required: false,
|
|
92
|
-
defaultObjectUI: 'keyvalue',
|
|
93
|
-
default: { '@path': '$.properties' }
|
|
94
|
-
},
|
|
95
56
|
timestamp: {
|
|
96
57
|
label: 'Timestamp',
|
|
97
58
|
type: 'string',
|
|
98
59
|
description: 'The timestamp of the event. Defaults to the current time if not provided.',
|
|
99
60
|
format: 'date-time',
|
|
100
61
|
default: { '@path': '$.timestamp' }
|
|
62
|
+
},
|
|
63
|
+
ip: {
|
|
64
|
+
label: 'IP Address',
|
|
65
|
+
type: 'string',
|
|
66
|
+
description: 'The IP address of the user. Defaults to the current user IP if not provided.',
|
|
67
|
+
default: { '@path': '$.context.ip' }
|
|
68
|
+
},
|
|
69
|
+
userAgent: {
|
|
70
|
+
label: 'User Agent',
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'The user agent of the user.',
|
|
73
|
+
default: { '@path': '$.context.userAgent' }
|
|
74
|
+
},
|
|
75
|
+
page: {
|
|
76
|
+
label: 'Page',
|
|
77
|
+
type: 'object',
|
|
78
|
+
description: 'The details of the page being viewed.',
|
|
79
|
+
properties: {
|
|
80
|
+
url: {
|
|
81
|
+
label: 'Page URL',
|
|
82
|
+
type: 'string',
|
|
83
|
+
description: 'Full URL of the page visited.'
|
|
84
|
+
},
|
|
85
|
+
title: {
|
|
86
|
+
label: 'Page Title',
|
|
87
|
+
type: 'string',
|
|
88
|
+
description: 'Title of the page.'
|
|
89
|
+
},
|
|
90
|
+
referrer: {
|
|
91
|
+
label: 'Referrer URL',
|
|
92
|
+
type: 'string',
|
|
93
|
+
description: 'URL of the referring page.'
|
|
94
|
+
},
|
|
95
|
+
path: {
|
|
96
|
+
label: 'Page Path',
|
|
97
|
+
type: 'string',
|
|
98
|
+
description: 'Path of the page being viewed.'
|
|
99
|
+
},
|
|
100
|
+
search: {
|
|
101
|
+
label: 'Search Query',
|
|
102
|
+
type: 'string',
|
|
103
|
+
description: 'Search query used to find the page.'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
default: {
|
|
107
|
+
title: { '@path': '$.context.page.title' },
|
|
108
|
+
url: { '@path': '$.context.page.url' },
|
|
109
|
+
referrer: { '@path': '$.context.page.referrer' },
|
|
110
|
+
path: { '@path': '$.context.page.path' },
|
|
111
|
+
search: { '@path': '$.context.page.search' }
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
campaign: {
|
|
115
|
+
label: 'Campaign',
|
|
116
|
+
type: 'object',
|
|
117
|
+
description: 'The marketing campaign that referred the user to the site.',
|
|
118
|
+
properties: {
|
|
119
|
+
name: {
|
|
120
|
+
label: 'UTM Campaign Name',
|
|
121
|
+
type: 'string',
|
|
122
|
+
description: 'Name of the campaign.'
|
|
123
|
+
},
|
|
124
|
+
source: {
|
|
125
|
+
label: 'UTM Campaign Source',
|
|
126
|
+
type: 'string',
|
|
127
|
+
description: 'Source of the campaign UTM parameter.'
|
|
128
|
+
},
|
|
129
|
+
medium: {
|
|
130
|
+
label: 'UTM Campaign Medium',
|
|
131
|
+
type: 'string',
|
|
132
|
+
description: 'Medium of the campaign UTM parameter.'
|
|
133
|
+
},
|
|
134
|
+
term: {
|
|
135
|
+
label: 'UTM Campaign Term',
|
|
136
|
+
type: 'string',
|
|
137
|
+
description: 'Term or keyword of the campaign UTM parameter.'
|
|
138
|
+
},
|
|
139
|
+
content: {
|
|
140
|
+
label: 'UTM Campaign Content',
|
|
141
|
+
type: 'string',
|
|
142
|
+
description: 'Content of the campaign UTM parameter.'
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
default: {
|
|
146
|
+
name: { '@path': '$.context.campaign.name' },
|
|
147
|
+
source: { '@path': '$.context.campaign.source' },
|
|
148
|
+
medium: { '@path': '$.context.campaign.medium' },
|
|
149
|
+
term: { '@path': '$.context.campaign.term' },
|
|
150
|
+
content: { '@path': '$.context.campaign.content' }
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
location: {
|
|
154
|
+
label: 'Location',
|
|
155
|
+
type: 'object',
|
|
156
|
+
description: 'The geographic location of the user.',
|
|
157
|
+
properties: {
|
|
158
|
+
country: {
|
|
159
|
+
label: 'Country',
|
|
160
|
+
type: 'string',
|
|
161
|
+
description: 'Country of the user.'
|
|
162
|
+
},
|
|
163
|
+
region: {
|
|
164
|
+
label: 'Region/State',
|
|
165
|
+
type: 'string',
|
|
166
|
+
description: 'Region or state of the user.'
|
|
167
|
+
},
|
|
168
|
+
city: {
|
|
169
|
+
label: 'City',
|
|
170
|
+
type: 'string',
|
|
171
|
+
description: 'City of the user.'
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
default: {
|
|
175
|
+
country: { '@path': '$.context.location.country' },
|
|
176
|
+
region: { '@path': '$.context.location.region' },
|
|
177
|
+
city: { '@path': '$.context.location.city' }
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
properties: {
|
|
181
|
+
label: 'Additional Page Properties',
|
|
182
|
+
type: 'object',
|
|
183
|
+
description: 'Additional properties associated with the event.',
|
|
184
|
+
defaultObjectUI: 'keyvalue'
|
|
101
185
|
}
|
|
102
186
|
},
|
|
103
187
|
perform: async (request, { payload }) => {
|
|
104
|
-
const {
|
|
105
|
-
if (!userId && !email && !anonymousId) {
|
|
106
|
-
throw new actions_core_1.PayloadValidationError('At least one identifier (userId, email, or anonymousId) is required.');
|
|
107
|
-
}
|
|
188
|
+
const { identifiers: { userId, email, anonymousId } = {}, listId, timestamp, ip, userAgent, page, campaign, location, properties } = payload;
|
|
108
189
|
delete properties?.email;
|
|
109
190
|
delete properties?.list_id;
|
|
110
191
|
const json = {
|
|
111
|
-
url: url,
|
|
112
|
-
...(referrer ? { referrer } : {}),
|
|
113
|
-
...(title ? { title } : {}),
|
|
114
192
|
...(userId ? { userId } : {}),
|
|
115
193
|
...(anonymousId ? { anonymousId } : {}),
|
|
116
194
|
...(email ? { email } : {}),
|
|
117
195
|
listId,
|
|
118
|
-
|
|
119
|
-
|
|
196
|
+
timestamp,
|
|
197
|
+
ip,
|
|
198
|
+
userAgent,
|
|
199
|
+
page,
|
|
200
|
+
campaign,
|
|
201
|
+
location,
|
|
202
|
+
properties
|
|
120
203
|
};
|
|
121
204
|
return await request(constants_1.TRACK_PAGE_VIEW_URL, {
|
|
122
205
|
method: 'POST',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/trackPageView/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/trackPageView/index.ts"],"names":[],"mappings":";;AAIA,2CAAiD;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,4FAA4F;IACzG,mBAAmB,EAAE,eAAe;IACpC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qCAAqC;YAClD,oBAAoB,EAAE,KAAK;YAC3B,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,KAAK,EAAE,SAAS;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uCAAuC;iBACrD;gBACD,WAAW,EAAE;oBACX,KAAK,EAAE,cAAc;oBACrB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yEAAyE;iBACvF;gBACD,KAAK,EAAE;oBACL,KAAK,EAAE,OAAO;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,0BAA0B;iBACxC;aACF;YACD,OAAO,EAAE;gBACP,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;gBAC/B,WAAW,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;gBACzC,KAAK,EAAE;oBACL,KAAK,EAAE;wBACL,MAAM,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;wBAC7C,IAAI,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;wBAC3C,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;qBACxC;iBACF;aACF;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,IAAI;YACd,O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C,EAAE,CAAC;YAC7B,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3B,MAAM;YACN,SAAS;YACT,EAAE;YACF,SAAS;YACT,IAAI;YACJ,QAAQ;YACR,QAAQ;YACR,UAAU;SACX,CAAA;QAED,OAAO,MAAM,OAAO,CAAC,+BAAmB,EAAE;YACxC,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
export interface TrackPageEventJSON {
|
|
2
|
-
url: string;
|
|
3
|
-
title?: string;
|
|
4
|
-
referrer?: string;
|
|
5
2
|
userId?: string;
|
|
6
3
|
anonymousId?: string;
|
|
7
4
|
email?: string;
|
|
8
5
|
listId: string;
|
|
6
|
+
timestamp?: string;
|
|
7
|
+
ip?: string;
|
|
8
|
+
userAgent?: string;
|
|
9
|
+
page?: {
|
|
10
|
+
url?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
referrer?: string;
|
|
13
|
+
path?: string;
|
|
14
|
+
search?: string;
|
|
15
|
+
};
|
|
16
|
+
campaign?: {
|
|
17
|
+
name?: string;
|
|
18
|
+
source?: string;
|
|
19
|
+
medium?: string;
|
|
20
|
+
term?: string;
|
|
21
|
+
content?: string;
|
|
22
|
+
};
|
|
23
|
+
location?: {
|
|
24
|
+
country?: string;
|
|
25
|
+
region?: string;
|
|
26
|
+
city?: string;
|
|
27
|
+
};
|
|
9
28
|
properties?: {
|
|
10
29
|
[key: string]: unknown;
|
|
11
30
|
};
|
|
12
|
-
timestamp?: string | number;
|
|
13
31
|
}
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
2
|
identifiers: {
|
|
3
|
-
userId
|
|
3
|
+
userId: string;
|
|
4
4
|
anonymousId?: string;
|
|
5
|
-
email
|
|
5
|
+
email: string;
|
|
6
6
|
};
|
|
7
7
|
listId: string;
|
|
8
|
+
status: boolean;
|
|
9
|
+
timestamp?: string;
|
|
10
|
+
ip?: string;
|
|
11
|
+
userAgent?: string;
|
|
12
|
+
page?: {
|
|
13
|
+
url?: string;
|
|
14
|
+
title?: string;
|
|
15
|
+
referrer?: string;
|
|
16
|
+
path?: string;
|
|
17
|
+
search?: string;
|
|
18
|
+
};
|
|
19
|
+
campaign?: {
|
|
20
|
+
name?: string;
|
|
21
|
+
source?: string;
|
|
22
|
+
medium?: string;
|
|
23
|
+
term?: string;
|
|
24
|
+
content?: string;
|
|
25
|
+
};
|
|
26
|
+
location?: {
|
|
27
|
+
country?: string;
|
|
28
|
+
region?: string;
|
|
29
|
+
city?: string;
|
|
30
|
+
};
|
|
8
31
|
properties?: {
|
|
9
32
|
firstName?: string;
|
|
10
33
|
lastName?: string;
|
|
@@ -16,7 +39,6 @@ export interface Payload {
|
|
|
16
39
|
country?: string;
|
|
17
40
|
zipcode?: string;
|
|
18
41
|
};
|
|
19
|
-
status: boolean;
|
|
20
42
|
tags_to_add?: string[];
|
|
21
43
|
tags_to_remove?: string[];
|
|
22
44
|
}
|