@segment/action-destinations 3.47.0 → 3.49.2-alpha.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/README.md +1 -1
- package/dist/destinations/adobe-target/adobeTarget_operations.d.ts +10 -0
- package/dist/destinations/adobe-target/adobeTarget_operations.js +50 -0
- package/dist/destinations/adobe-target/adobeTarget_operations.js.map +1 -0
- package/dist/destinations/adobe-target/generated-types.d.ts +3 -0
- package/dist/destinations/adobe-target/generated-types.js +3 -0
- package/dist/destinations/adobe-target/generated-types.js.map +1 -0
- package/dist/destinations/adobe-target/index.d.ts +4 -0
- package/dist/destinations/adobe-target/index.js +27 -0
- package/dist/destinations/adobe-target/index.js.map +1 -0
- package/dist/destinations/adobe-target/updateProfile/generated-types.d.ts +6 -0
- package/dist/destinations/adobe-target/updateProfile/generated-types.js +3 -0
- package/dist/destinations/adobe-target/updateProfile/generated-types.js.map +1 -0
- package/dist/destinations/adobe-target/updateProfile/index.d.ts +5 -0
- package/dist/destinations/adobe-target/updateProfile/index.js +41 -0
- package/dist/destinations/adobe-target/updateProfile/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/constants.d.ts +1 -1
- package/dist/destinations/facebook-conversions-api/constants.js +3 -3
- package/dist/destinations/google-analytics-4/addPaymentInfo/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +6 -2
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/addToCart/index.js +6 -2
- package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/addToWishlist/index.js +6 -2
- package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/beginCheckout/index.js +6 -2
- package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/customEvent/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/customEvent/index.js +3 -7
- package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-properties.d.ts +2 -0
- package/dist/destinations/google-analytics-4/ga4-properties.js +12 -1
- package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -1
- package/dist/destinations/google-analytics-4/generateLead/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/generateLead/index.js +6 -2
- package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/login/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/login/index.js +6 -2
- package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/pageView/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/pageView/index.js +6 -2
- package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/purchase/index.js +6 -2
- package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/refund/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/refund/index.js +6 -2
- package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/removeFromCart/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/removeFromCart/index.js +6 -2
- package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/search/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/search/index.js +6 -2
- package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/selectItem/index.js +6 -2
- package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/selectPromotion/index.js +6 -2
- package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/signUp/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/signUp/index.js +6 -2
- package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewCart/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/viewCart/index.js +6 -2
- package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/viewItem/index.js +6 -2
- package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItemList/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/viewItemList/index.js +6 -2
- package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/viewPromotion/index.js +6 -2
- package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
- package/dist/destinations/index.js +2 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/personas-messaging-sendgrid/sendEmail/index.js +7 -1
- package/dist/destinations/personas-messaging-sendgrid/sendEmail/index.js.map +1 -1
- package/dist/destinations/salesforce/customObject/generated-types.d.ts +10 -0
- package/dist/destinations/salesforce/customObject/generated-types.js +3 -0
- package/dist/destinations/salesforce/customObject/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/customObject/index.d.ts +5 -0
- package/dist/destinations/salesforce/customObject/index.js +37 -0
- package/dist/destinations/salesforce/customObject/index.js.map +1 -0
- package/dist/destinations/salesforce/index.js +3 -1
- package/dist/destinations/salesforce/index.js.map +1 -1
- package/dist/destinations/salesforce/lead/generated-types.d.ts +3 -0
- package/dist/destinations/salesforce/lead/index.js +2 -1
- package/dist/destinations/salesforce/lead/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-object-to-shape.d.ts +2 -0
- package/dist/destinations/salesforce/sf-object-to-shape.js +26 -0
- package/dist/destinations/salesforce/sf-object-to-shape.js.map +1 -0
- package/dist/destinations/salesforce/sf-operations.d.ts +1 -0
- package/dist/destinations/salesforce/sf-operations.js +15 -22
- package/dist/destinations/salesforce/sf-operations.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.d.ts +1 -0
- package/dist/destinations/salesforce/sf-properties.js +10 -1
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/salesforce/sf-types.d.ts +14 -1
- package/dist/destinations/tiktok-conversions/index.js +32 -14
- package/dist/destinations/tiktok-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -3
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +9 -3
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/generated-types.d.ts +16 -6
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js +177 -27
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Destination definitions and their actions
|
|
|
6
6
|
|
|
7
7
|
MIT License
|
|
8
8
|
|
|
9
|
-
Copyright (c)
|
|
9
|
+
Copyright (c) 2022 Segment
|
|
10
10
|
|
|
11
11
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
12
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RequestClient } from '@segment/actions-core';
|
|
2
|
+
export default class AdobeTarget {
|
|
3
|
+
userId: string;
|
|
4
|
+
clientCode: string;
|
|
5
|
+
traits: object;
|
|
6
|
+
request: RequestClient;
|
|
7
|
+
constructor(userId: string, clientCode: string, traits: object, request: RequestClient);
|
|
8
|
+
updateProfile: () => Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
9
|
+
private lookupProfile;
|
|
10
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
+
function getNestedObjects(obj, objectPath = '', attributes = {}) {
|
|
5
|
+
Object.keys(obj).forEach((key) => {
|
|
6
|
+
const currObjectPath = objectPath ? `${objectPath}.${key}` : key;
|
|
7
|
+
if (typeof obj[key] !== 'object' && obj[key]) {
|
|
8
|
+
attributes[currObjectPath] = obj[key].toString();
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
getNestedObjects(obj[key], currObjectPath, attributes);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
return attributes;
|
|
15
|
+
}
|
|
16
|
+
const objectToQueryString = (object) => Object.keys(object)
|
|
17
|
+
.map((key) => `profile.${key}=${object[key].toString()}`)
|
|
18
|
+
.join('&');
|
|
19
|
+
class AdobeTarget {
|
|
20
|
+
constructor(userId, clientCode, traits, request) {
|
|
21
|
+
this.updateProfile = async () => {
|
|
22
|
+
const err = await this.lookupProfile(this.userId, this.clientCode);
|
|
23
|
+
if (err) {
|
|
24
|
+
throw err;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const traits = getNestedObjects(this.traits);
|
|
28
|
+
const requestUrl = `https://${this.clientCode}.tt.omtrdc.net/m2/${this.clientCode}/profile/update?mbox3rdPartyId=${this.userId}&${objectToQueryString(traits)}`;
|
|
29
|
+
return this.request(requestUrl, {
|
|
30
|
+
method: 'POST'
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
this.lookupProfile = async (userId, clientCode) => {
|
|
35
|
+
try {
|
|
36
|
+
await this.request(`https://${clientCode}.tt.omtrdc.net/rest/v1/profiles/thirdPartyId/${userId}?client=${clientCode}`, { method: 'get' });
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
return new actions_core_1.IntegrationError('No profile found in Adobe Target with this mbox3rdPartyId', 'Profile not found', 404);
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
};
|
|
43
|
+
this.userId = userId;
|
|
44
|
+
this.clientCode = clientCode;
|
|
45
|
+
this.traits = traits;
|
|
46
|
+
this.request = request;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.default = AdobeTarget;
|
|
50
|
+
//# sourceMappingURL=adobeTarget_operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adobeTarget_operations.js","sourceRoot":"","sources":["../../../src/destinations/adobe-target/adobeTarget_operations.ts"],"names":[],"mappings":";;AAAA,wDAAuE;AAEvE,SAAS,gBAAgB,CAAC,GAAyB,EAAE,UAAU,GAAG,EAAE,EAAE,aAAsC,EAAE;IAC5G,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC/B,MAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;QAChE,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE;YAC5C,UAAU,CAAC,cAAc,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAA;SACjD;aAAM;YACL,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,cAAc,EAAE,UAAU,CAAC,CAAA;SACvD;IACH,CAAC,CAAC,CAAA;IACF,OAAO,UAAU,CAAA;AACnB,CAAC;AACD,MAAM,mBAAmB,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,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CA8BF;AAzCD,8BAyCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/adobe-target/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const updateProfile_1 = __importDefault(require("./updateProfile"));
|
|
7
|
+
const destination = {
|
|
8
|
+
name: 'Adobe Target Cloud Mode',
|
|
9
|
+
slug: 'actions-adobe-target-cloud',
|
|
10
|
+
mode: 'cloud',
|
|
11
|
+
authentication: {
|
|
12
|
+
scheme: 'custom',
|
|
13
|
+
fields: {
|
|
14
|
+
client_code: {
|
|
15
|
+
label: 'Client Code',
|
|
16
|
+
description: 'Your Adobe Target client code. To find your client code in Adobe Target, navigate to **Administration > Implementation**. The client code is shown at the top under Account Details.',
|
|
17
|
+
type: 'string',
|
|
18
|
+
required: true
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
actions: {
|
|
23
|
+
updateProfile: updateProfile_1.default
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.default = destination;
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/adobe-target/index.ts"],"names":[],"mappings":";;;;;AAGA,oEAA2C;AAE3C,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,WAAW,EAAE;gBACX,KAAK,EAAE,aAAa;gBACpB,WAAW,EACT,sLAAsL;gBACxL,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/adobe-target/updateProfile/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const adobeTarget_operations_1 = __importDefault(require("../adobeTarget_operations"));
|
|
7
|
+
const action = {
|
|
8
|
+
title: 'Update Profile',
|
|
9
|
+
description: 'Update an existing user profile in Adobe Target.',
|
|
10
|
+
defaultSubscription: 'type = "identify"',
|
|
11
|
+
fields: {
|
|
12
|
+
user_id: {
|
|
13
|
+
label: 'Mbox 3rd Party ID',
|
|
14
|
+
description: "A user's unique visitor ID. This field is used to fetch a matching profile in Adobe Target to make an update on. For more information, please see our Adobe Target Destination documentation.",
|
|
15
|
+
type: 'string',
|
|
16
|
+
required: true,
|
|
17
|
+
default: {
|
|
18
|
+
'@if': {
|
|
19
|
+
exists: { '@path': '$.userId' },
|
|
20
|
+
then: { '@path': '$.userId' },
|
|
21
|
+
else: { '@path': '$.anonymousId' }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
traits: {
|
|
26
|
+
label: 'Profile Attributes',
|
|
27
|
+
description: 'Profile parameters specific to a user.',
|
|
28
|
+
type: 'object',
|
|
29
|
+
required: true,
|
|
30
|
+
default: {
|
|
31
|
+
'@path': '$.traits'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
perform: async (request, { settings, payload }) => {
|
|
36
|
+
const at = new adobeTarget_operations_1.default(payload.user_id, settings.client_code, payload.traits, request);
|
|
37
|
+
return await at.updateProfile();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.default = action;
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/adobe-target/updateProfile/index.ts"],"names":[],"mappings":";;;;;AAEA,uFAAmD;AAGnD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,kDAAkD;IAC/D,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,+LAA+L;YACjM,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,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,MAAM,EAAE;YACN,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;KACF;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,MAAM,EAAE,GAAgB,IAAI,gCAAW,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QACvG,OAAO,MAAM,EAAE,CAAC,aAAa,EAAE,CAAA;IACjC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.COUNTRY_CODES = exports.US_STATE_CODES = exports.CURRENCY_ISO_CODES = exports.API_VERSION = void 0;
|
|
4
|
-
exports.API_VERSION = '
|
|
4
|
+
exports.API_VERSION = '12.0';
|
|
5
5
|
exports.CURRENCY_ISO_CODES = new Set([
|
|
6
6
|
'AED',
|
|
7
7
|
'AFN',
|
|
@@ -233,7 +233,7 @@ exports.US_STATE_CODES = new Map([
|
|
|
233
233
|
['washington', 'wa'],
|
|
234
234
|
['westvirginia', 'wv'],
|
|
235
235
|
['wisconsin', 'wi'],
|
|
236
|
-
['wyoming', 'wy']
|
|
236
|
+
['wyoming', 'wy']
|
|
237
237
|
]);
|
|
238
238
|
exports.COUNTRY_CODES = new Map([
|
|
239
239
|
['afghanistan', 'af'],
|
|
@@ -480,6 +480,6 @@ exports.COUNTRY_CODES = new Map([
|
|
|
480
480
|
['westernsahara', 'eh'],
|
|
481
481
|
['yemen', 'ye'],
|
|
482
482
|
['zambia', 'zm'],
|
|
483
|
-
['zimbabwe', 'zw']
|
|
483
|
+
['zimbabwe', 'zw']
|
|
484
484
|
]);
|
|
485
485
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
2
|
client_id: string;
|
|
3
|
+
user_id?: string;
|
|
3
4
|
currency?: string;
|
|
4
5
|
value?: number;
|
|
5
6
|
coupon?: string;
|
|
@@ -25,4 +26,7 @@ export interface Payload {
|
|
|
25
26
|
price?: number;
|
|
26
27
|
quantity?: number;
|
|
27
28
|
}[];
|
|
29
|
+
params?: {
|
|
30
|
+
[k: string]: unknown;
|
|
31
|
+
};
|
|
28
32
|
}
|
|
@@ -9,6 +9,7 @@ const action = {
|
|
|
9
9
|
defaultSubscription: 'type = "track" and event = "Payment Info Entered"',
|
|
10
10
|
fields: {
|
|
11
11
|
client_id: { ...ga4_properties_1.client_id },
|
|
12
|
+
user_id: { ...ga4_properties_1.user_id },
|
|
12
13
|
currency: { ...ga4_properties_1.currency },
|
|
13
14
|
value: { ...ga4_properties_1.value },
|
|
14
15
|
coupon: { ...ga4_properties_1.coupon },
|
|
@@ -16,7 +17,8 @@ const action = {
|
|
|
16
17
|
items: {
|
|
17
18
|
...ga4_properties_1.items_multi_products,
|
|
18
19
|
required: true
|
|
19
|
-
}
|
|
20
|
+
},
|
|
21
|
+
params: ga4_properties_1.params
|
|
20
22
|
},
|
|
21
23
|
perform: (request, { payload }) => {
|
|
22
24
|
if (payload.currency && !constants_1.CURRENCY_ISO_CODES.includes(payload.currency)) {
|
|
@@ -44,6 +46,7 @@ const action = {
|
|
|
44
46
|
method: 'POST',
|
|
45
47
|
json: {
|
|
46
48
|
client_id: payload.client_id,
|
|
49
|
+
user_id: payload.user_id,
|
|
47
50
|
events: [
|
|
48
51
|
{
|
|
49
52
|
name: 'add_payment_info',
|
|
@@ -52,7 +55,8 @@ const action = {
|
|
|
52
55
|
value: payload.value,
|
|
53
56
|
coupon: payload.coupon,
|
|
54
57
|
payment_type: payload.payment_type,
|
|
55
|
-
items: googleItems
|
|
58
|
+
items: googleItems,
|
|
59
|
+
...payload.params
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addPaymentInfo/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AAIjD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/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
4
|
currency?: string;
|
|
4
5
|
items: {
|
|
5
6
|
item_id?: string;
|
|
@@ -23,4 +24,7 @@ export interface Payload {
|
|
|
23
24
|
quantity?: number;
|
|
24
25
|
}[];
|
|
25
26
|
value?: number;
|
|
27
|
+
params?: {
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
};
|
|
26
30
|
}
|
|
@@ -9,12 +9,14 @@ const action = {
|
|
|
9
9
|
defaultSubscription: 'type = "track" and event = "Product Added"',
|
|
10
10
|
fields: {
|
|
11
11
|
client_id: { ...ga4_properties_1.client_id },
|
|
12
|
+
user_id: { ...ga4_properties_1.user_id },
|
|
12
13
|
currency: { ...ga4_properties_1.currency },
|
|
13
14
|
items: {
|
|
14
15
|
...ga4_properties_1.items_single_products,
|
|
15
16
|
required: true
|
|
16
17
|
},
|
|
17
|
-
value: { ...ga4_properties_1.value }
|
|
18
|
+
value: { ...ga4_properties_1.value },
|
|
19
|
+
params: ga4_properties_1.params
|
|
18
20
|
},
|
|
19
21
|
perform: (request, { payload }) => {
|
|
20
22
|
let googleItems = [];
|
|
@@ -33,13 +35,15 @@ const action = {
|
|
|
33
35
|
method: 'POST',
|
|
34
36
|
json: {
|
|
35
37
|
client_id: payload.client_id,
|
|
38
|
+
user_id: payload.user_id,
|
|
36
39
|
events: [
|
|
37
40
|
{
|
|
38
41
|
name: 'add_to_cart',
|
|
39
42
|
params: {
|
|
40
43
|
currency: payload.currency,
|
|
41
44
|
items: googleItems,
|
|
42
|
-
value: payload.value
|
|
45
|
+
value: payload.value,
|
|
46
|
+
...payload.params
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,4CAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addTo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AAO,CAAC,SAAS;gBAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,aAAa;wBACnB,MAAM,EAAE;4BACN,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,KAAK,EAAE,WAAW;4BAClB,KAAK,EAAE,OAAO,CAAC,KAAK;4BACpB,GAAG,OAAO,CAAC,MAAM;yBAClB;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
2
|
client_id: string;
|
|
3
|
+
user_id?: string;
|
|
3
4
|
currency?: string;
|
|
4
5
|
value?: number;
|
|
5
6
|
items: {
|
|
@@ -23,4 +24,7 @@ export interface Payload {
|
|
|
23
24
|
price?: number;
|
|
24
25
|
quantity?: number;
|
|
25
26
|
}[];
|
|
27
|
+
params?: {
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
};
|
|
26
30
|
}
|
|
@@ -9,12 +9,14 @@ const action = {
|
|
|
9
9
|
defaultSubscription: 'type = "track" and event = "Product Added to Wishlist"',
|
|
10
10
|
fields: {
|
|
11
11
|
client_id: { ...ga4_properties_1.client_id },
|
|
12
|
+
user_id: { ...ga4_properties_1.user_id },
|
|
12
13
|
currency: { ...ga4_properties_1.currency },
|
|
13
14
|
value: { ...ga4_properties_1.value },
|
|
14
15
|
items: {
|
|
15
16
|
...ga4_properties_1.items_single_products,
|
|
16
17
|
required: true
|
|
17
|
-
}
|
|
18
|
+
},
|
|
19
|
+
params: ga4_properties_1.params
|
|
18
20
|
},
|
|
19
21
|
perform: (request, { payload }) => {
|
|
20
22
|
if (payload.currency && !constants_1.CURRENCY_ISO_CODES.includes(payload.currency)) {
|
|
@@ -42,13 +44,15 @@ const action = {
|
|
|
42
44
|
method: 'POST',
|
|
43
45
|
json: {
|
|
44
46
|
client_id: payload.client_id,
|
|
47
|
+
user_id: payload.user_id,
|
|
45
48
|
events: [
|
|
46
49
|
{
|
|
47
50
|
name: 'add_to_wishlist',
|
|
48
51
|
params: {
|
|
49
52
|
currency: payload.currency,
|
|
50
53
|
value: payload.value,
|
|
51
|
-
items: googleItems
|
|
54
|
+
items: googleItems,
|
|
55
|
+
...payload.params
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToWishlist/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AAIjD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToWishlist/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AAIjD,sDAAsG;AAEtG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,iDAAiD;IAC9D,mBAAmB,EAAE,wDAAwD;IAC7E,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QACzB,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE;QACnB,KAAK,EAAE;YACL,GAAG,sCAAqB;YACxB,QAAQ,EAAE,IAAI;SACf;QACD,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAEhC,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,8BAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YACtE,MAAM,IAAI,+BAAgB,CAAC,GAAG,OAAO,CAAC,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;SAC/G;QA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AI,EAAE,iBAAiB;wBACvB,MAAM,EAAE;4BACN,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;4BACpB,KAAK,EAAE,WAAW;4BAClB,GAAG,OAAO,CAAC,MAAM;yBAClB;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
2
|
client_id: string;
|
|
3
|
+
user_id?: string;
|
|
3
4
|
coupon?: string;
|
|
4
5
|
currency?: string;
|
|
5
6
|
items: {
|
|
@@ -24,4 +25,7 @@ export interface Payload {
|
|
|
24
25
|
quantity?: number;
|
|
25
26
|
}[];
|
|
26
27
|
value?: number;
|
|
28
|
+
params?: {
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
};
|
|
27
31
|
}
|
|
@@ -9,13 +9,15 @@ const action = {
|
|
|
9
9
|
defaultSubscription: 'type = "track" and event = "Checkout Started"',
|
|
10
10
|
fields: {
|
|
11
11
|
client_id: { ...ga4_properties_1.client_id },
|
|
12
|
+
user_id: { ...ga4_properties_1.user_id },
|
|
12
13
|
coupon: { ...ga4_properties_1.coupon, default: { '@path': '$.properties.coupon' } },
|
|
13
14
|
currency: { ...ga4_properties_1.currency },
|
|
14
15
|
items: {
|
|
15
16
|
...ga4_properties_1.items_multi_products,
|
|
16
17
|
required: true
|
|
17
18
|
},
|
|
18
|
-
value: { ...ga4_properties_1.value }
|
|
19
|
+
value: { ...ga4_properties_1.value },
|
|
20
|
+
params: ga4_properties_1.params
|
|
19
21
|
},
|
|
20
22
|
perform: (request, { payload }) => {
|
|
21
23
|
if (payload.currency && !constants_1.CURRENCY_ISO_CODES.includes(payload.currency)) {
|
|
@@ -37,6 +39,7 @@ const action = {
|
|
|
37
39
|
method: 'POST',
|
|
38
40
|
json: {
|
|
39
41
|
client_id: payload.client_id,
|
|
42
|
+
user_id: payload.user_id,
|
|
40
43
|
events: [
|
|
41
44
|
{
|
|
42
45
|
name: 'begin_checkout',
|
|
@@ -44,7 +47,8 @@ const action = {
|
|
|
44
47
|
coupon: payload.coupon,
|
|
45
48
|
currency: payload.currency,
|
|
46
49
|
items: googleItems,
|
|
47
|
-
value: payload.value
|
|
50
|
+
value: payload.value,
|
|
51
|
+
...payload.params
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/beginCheckout/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/beginCheckout/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AACjD,sDAA6G;AAK7G,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,wCAAwC;IACrD,mBAAmB,EAAE,+CAA+C;IACpE,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,MAAM,EAAE,EAAE,GAAG,uBAAM,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,EAAE;QAClE,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QAGzB,KAAK,EAAE;YACL,GAAG,qCAAoB;YACvB,QAAQ,EAAE,IAAI;SACf;QACD,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE;QACnB,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,8BAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,E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
|
|
|
15
15
|
defaultSubscription: 'type = "track"',
|
|
16
16
|
fields: {
|
|
17
17
|
clientId: { ...ga4_properties_1.client_id },
|
|
18
|
+
user_id: { ...ga4_properties_1.user_id },
|
|
18
19
|
name: {
|
|
19
20
|
label: 'Event Name',
|
|
20
21
|
description: 'The unique name of the custom event created in GA4. GA4 does not accept spaces in event names so Segment will replace any spaces with underscores. More information about GA4 event name rules is available in [their docs](https://support.google.com/analytics/answer/10085872?hl=en&ref_topic=9756175#event-name-rules&zippy=%2Cin-this-article.%2Cin-this-article).',
|
|
@@ -30,13 +31,7 @@ const action = {
|
|
|
30
31
|
type: 'boolean',
|
|
31
32
|
default: false
|
|
32
33
|
},
|
|
33
|
-
params: {
|
|
34
|
-
label: 'Event Parameters',
|
|
35
|
-
description: 'The event parameters to send to Google',
|
|
36
|
-
type: 'object',
|
|
37
|
-
additionalProperties: true,
|
|
38
|
-
default: { '@path': '$.properties' }
|
|
39
|
-
}
|
|
34
|
+
params: { ...ga4_properties_1.params, default: { '@path': '$.properties' } }
|
|
40
35
|
},
|
|
41
36
|
perform: (request, { payload }) => {
|
|
42
37
|
const event_name = normalizeEventName(payload.name, payload.lowercase);
|
|
@@ -44,6 +39,7 @@ const action = {
|
|
|
44
39
|
method: 'POST',
|
|
45
40
|
json: {
|
|
46
41
|
client_id: payload.clientId,
|
|
42
|
+
user_id: payload.user_id,
|
|
47
43
|
events: [
|
|
48
44
|
{
|
|
49
45
|
name: event_name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/customEvent/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/customEvent/index.ts"],"names":[],"mappings":";;AAGA,sDAA8D;AAE9D,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,SAA8B,EAAU,EAAE;IAClF,IAAI,GAAG,IAAI,CAA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ACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AACD,kBAAe,MAAM,CAAA"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { InputField } from '@segment/actions-core/src/destination-kit/types';
|
|
2
|
+
export declare const params: InputField;
|
|
3
|
+
export declare const user_id: InputField;
|
|
2
4
|
export declare const promotion_id: InputField;
|
|
3
5
|
export declare const promotion_name: InputField;
|
|
4
6
|
export declare const creative_slot: InputField;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.items_multi_products = exports.items_single_products = exports.minimal_items = exports.payment_type = exports.coupon = exports.value = exports.currency = exports.client_id = exports.affiliation = exports.transaction_id = exports.shipping = exports.tax = exports.creative_name = exports.creative_slot = exports.promotion_name = exports.promotion_id = void 0;
|
|
3
|
+
exports.items_multi_products = exports.items_single_products = exports.minimal_items = exports.payment_type = exports.coupon = exports.value = exports.currency = exports.client_id = exports.affiliation = exports.transaction_id = exports.shipping = exports.tax = exports.creative_name = exports.creative_slot = exports.promotion_name = exports.promotion_id = exports.user_id = exports.params = void 0;
|
|
4
|
+
exports.params = {
|
|
5
|
+
label: 'Event Parameters',
|
|
6
|
+
description: 'The event parameters to send to Google',
|
|
7
|
+
type: 'object',
|
|
8
|
+
additionalProperties: true
|
|
9
|
+
};
|
|
10
|
+
exports.user_id = {
|
|
11
|
+
label: 'User ID',
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: "A unique identifier for a user. See Google's [User-ID for cross-platform analysis](https://support.google.com/analytics/answer/9213390) and [Reporting: deduplicate user counts](https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier."
|
|
14
|
+
};
|
|
4
15
|
exports.promotion_id = {
|
|
5
16
|
label: 'Promotion ID',
|
|
6
17
|
type: 'string',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ga4-properties.js","sourceRoot":"","sources":["../../../src/destinations/google-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BACL,OAAO,EAAE,YAAY;iBACtB;gBACD,UAAU,EAAE;oBACV,OAAO,EAAE,SAAS;iBACnB;gBACD,aAAa,EAAE;oBACb,OAAO,EAAE,YAAY;iBACtB;gBACD,YAAY,EAAE;oBACZ,OAAO,EAAE,WAAW;iBACrB;gBACD,KAAK,EAAE;oBACL,OAAO,EAAE,SAAS;iBACnB;gBACD,QAAQ,EAAE;oBACR,OAAO,EAAE,YAAY;iBACtB;aACF;SACF;KACF;CACF,CAAA"}
|
|
1
|
+
{"version":3,"file":"ga4-properties.js","sourceRoot":"","sources":["../../../src/destinations/google-analytics-4/ga4-properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,MAAM,GAAe;IAChC,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,wCAAwC;IACrD,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,IAAI;CAC3B,CAAA;AACY,QAAA,OAAO,GAAe;IACjC,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,oSAAoS;CACvS,CAAA;AAEY,QAAA,YAAY,GAAe;IACtC,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,oDAAoD;CAClE,CAAA;AAEY,QAAA,cAAc,GAAe;IACxC,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,sDAAsD;CACpE,CAAA;AAEY,QAAA,aAAa,GAAe;IACvC,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,sEAAsE;CACpF,CAAA;AAEY,QAAA,aAAa,GAAe;IACvC,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,uCAAuC;CACrD,CAAA;AAEY,QAAA,GAAG,GAAe;IAC7B,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,4CAA4C;IACzD,OAAO,EAAE;QACP,OAAO,EA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,OAAO,EAAE,UAAU;iBACpB;gBACD,UAAU,EAAE;oBACV,OAAO,EAAE,SAAS;iBACnB;gBACD,aAAa,EAAE;oBACb,OAAO,EAAE,YAAY;iBACtB;gBACD,YAAY,EAAE;oBACZ,OAAO,EAAE,WAAW;iBACrB;gBACD,KAAK,EAAE;oBACL,OAAO,EAAE,SAAS;iBACnB;gBACD,QAAQ,EAAE;oBACR,OAAO,EAAE,YAAY;iBACtB;aACF;SACF;KACF;CACF,CAAA;AACY,QAAA,oBAAoB,GAAe;IAC9C,GAAG,qBAAa;IAChB,OAAO,EAAE;QACP,YAAY,EAAE;YACZ,uBAAuB;YACvB;gBACE,OAAO,EAAE;oBACP,OAAO,EAAE,cAAc;iBACxB;gBACD,SAAS,EAAE;oBACT,OAAO,EAAE,QAAQ;iBAClB;gBACD,WAAW,EAAE;oBACX,OAAO,EAAE,eAAe;iBACzB;gBACD,MAAM,EAAE;oBACN,OAAO,EAAE,UAAU;iBACpB;gBACD,KAAK,EAAE;oBACL,OAAO,EAAE,YAAY;iBACtB;gBACD,UAAU,EAAE;oBACV,OAAO,EAAE,SAAS;iBACnB;gBACD,aAAa,EAAE;oBACb,OAAO,EAAE,YAAY;iBACtB;gBACD,YAAY,EAAE;oBACZ,OAAO,EAAE,WAAW;iBACrB;gBACD,KAAK,EAAE;oBACL,OAAO,EAAE,SAAS;iBACnB;gBACD,QAAQ,EAAE;oBACR,OAAO,EAAE,YAAY;iBACtB;aACF;SACF;KACF;CACF,CAAA"}
|
|
@@ -9,8 +9,10 @@ const action = {
|
|
|
9
9
|
defaultSubscription: 'type = "track"',
|
|
10
10
|
fields: {
|
|
11
11
|
client_id: { ...ga4_properties_1.client_id },
|
|
12
|
+
user_id: { ...ga4_properties_1.user_id },
|
|
12
13
|
currency: { ...ga4_properties_1.currency },
|
|
13
|
-
value: { ...ga4_properties_1.value }
|
|
14
|
+
value: { ...ga4_properties_1.value },
|
|
15
|
+
params: ga4_properties_1.params
|
|
14
16
|
},
|
|
15
17
|
perform: (request, { payload }) => {
|
|
16
18
|
if (payload.currency && !constants_1.CURRENCY_ISO_CODES.includes(payload.currency)) {
|
|
@@ -23,12 +25,14 @@ const action = {
|
|
|
23
25
|
method: 'POST',
|
|
24
26
|
json: {
|
|
25
27
|
client_id: payload.client_id,
|
|
28
|
+
user_id: payload.user_id,
|
|
26
29
|
events: [
|
|
27
30
|
{
|
|
28
31
|
name: 'generate_lead',
|
|
29
32
|
params: {
|
|
30
33
|
currency: payload.currency,
|
|
31
|
-
value: payload.value
|
|
34
|
+
value: payload.value,
|
|
35
|
+
...payload.params
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
38
|
]
|