@segment/action-destinations 3.82.1-alpha.3 → 3.83.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.
Files changed (142) hide show
  1. package/dist/destinations/cordial/addProductToCart/generated-types.d.ts +17 -0
  2. package/dist/destinations/cordial/addProductToCart/generated-types.js +3 -0
  3. package/dist/destinations/cordial/addProductToCart/generated-types.js.map +1 -0
  4. package/dist/destinations/cordial/addProductToCart/index.d.ts +5 -0
  5. package/dist/destinations/cordial/addProductToCart/index.js +116 -0
  6. package/dist/destinations/cordial/addProductToCart/index.js.map +1 -0
  7. package/dist/destinations/cordial/cordial-client.d.ts +6 -0
  8. package/dist/destinations/cordial/cordial-client.js +42 -0
  9. package/dist/destinations/cordial/cordial-client.js.map +1 -1
  10. package/dist/destinations/cordial/index.js +9 -3
  11. package/dist/destinations/cordial/index.js.map +1 -1
  12. package/dist/destinations/cordial/removeProductFromCart/generated-types.d.ts +7 -0
  13. package/dist/destinations/cordial/removeProductFromCart/generated-types.js +3 -0
  14. package/dist/destinations/cordial/removeProductFromCart/generated-types.js.map +1 -0
  15. package/dist/destinations/cordial/removeProductFromCart/index.d.ts +5 -0
  16. package/dist/destinations/cordial/removeProductFromCart/index.js +44 -0
  17. package/dist/destinations/cordial/removeProductFromCart/index.js.map +1 -0
  18. package/dist/destinations/cordial/upsertOrder/generated-types.d.ts +26 -0
  19. package/dist/destinations/cordial/upsertOrder/generated-types.js +3 -0
  20. package/dist/destinations/cordial/upsertOrder/generated-types.js.map +1 -0
  21. package/dist/destinations/cordial/upsertOrder/index.d.ts +5 -0
  22. package/dist/destinations/cordial/upsertOrder/index.js +179 -0
  23. package/dist/destinations/cordial/upsertOrder/index.js.map +1 -0
  24. package/dist/destinations/fullstory/generated-types.d.ts +3 -0
  25. package/dist/destinations/fullstory/generated-types.js +3 -0
  26. package/dist/destinations/fullstory/generated-types.js.map +1 -0
  27. package/dist/destinations/fullstory/identifyUser/generated-types.d.ts +9 -0
  28. package/dist/destinations/fullstory/identifyUser/generated-types.js +3 -0
  29. package/dist/destinations/fullstory/identifyUser/generated-types.js.map +1 -0
  30. package/dist/destinations/fullstory/identifyUser/index.d.ts +4 -0
  31. package/dist/destinations/fullstory/identifyUser/index.js +73 -0
  32. package/dist/destinations/fullstory/identifyUser/index.js.map +1 -0
  33. package/dist/destinations/fullstory/index.d.ts +4 -0
  34. package/dist/destinations/fullstory/index.js +56 -0
  35. package/dist/destinations/fullstory/index.js.map +1 -0
  36. package/dist/destinations/fullstory/request-params.d.ts +18 -0
  37. package/dist/destinations/fullstory/request-params.js +70 -0
  38. package/dist/destinations/fullstory/request-params.js.map +1 -0
  39. package/dist/destinations/fullstory/trackEvent/generated-types.d.ts +10 -0
  40. package/dist/destinations/fullstory/trackEvent/generated-types.js +3 -0
  41. package/dist/destinations/fullstory/trackEvent/generated-types.js.map +1 -0
  42. package/dist/destinations/fullstory/trackEvent/index.d.ts +5 -0
  43. package/dist/destinations/fullstory/trackEvent/index.js +79 -0
  44. package/dist/destinations/fullstory/trackEvent/index.js.map +1 -0
  45. package/dist/destinations/fullstory/vars.d.ts +3 -0
  46. package/dist/destinations/fullstory/vars.js +100 -0
  47. package/dist/destinations/fullstory/vars.js.map +1 -0
  48. package/dist/destinations/google-analytics-4/addPaymentInfo/generated-types.d.ts +1 -0
  49. package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +29 -20
  50. package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
  51. package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +1 -0
  52. package/dist/destinations/google-analytics-4/addToCart/index.js +27 -18
  53. package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
  54. package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +1 -0
  55. package/dist/destinations/google-analytics-4/addToWishlist/index.js +27 -18
  56. package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
  57. package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +1 -0
  58. package/dist/destinations/google-analytics-4/beginCheckout/index.js +28 -19
  59. package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
  60. package/dist/destinations/google-analytics-4/customEvent/generated-types.d.ts +1 -0
  61. package/dist/destinations/google-analytics-4/customEvent/index.js +25 -15
  62. package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
  63. package/dist/destinations/google-analytics-4/ga4-functions.d.ts +3 -0
  64. package/dist/destinations/google-analytics-4/ga4-functions.js +33 -1
  65. package/dist/destinations/google-analytics-4/ga4-functions.js.map +1 -1
  66. package/dist/destinations/google-analytics-4/ga4-properties.d.ts +1 -0
  67. package/dist/destinations/google-analytics-4/ga4-properties.js +9 -1
  68. package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -1
  69. package/dist/destinations/google-analytics-4/generateLead/generated-types.d.ts +1 -0
  70. package/dist/destinations/google-analytics-4/generateLead/index.js +26 -17
  71. package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
  72. package/dist/destinations/google-analytics-4/login/generated-types.d.ts +1 -0
  73. package/dist/destinations/google-analytics-4/login/index.js +26 -16
  74. package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
  75. package/dist/destinations/google-analytics-4/pageView/generated-types.d.ts +1 -0
  76. package/dist/destinations/google-analytics-4/pageView/index.js +28 -18
  77. package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
  78. package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +1 -0
  79. package/dist/destinations/google-analytics-4/purchase/index.js +32 -23
  80. package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
  81. package/dist/destinations/google-analytics-4/refund/generated-types.d.ts +1 -0
  82. package/dist/destinations/google-analytics-4/refund/index.js +32 -23
  83. package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
  84. package/dist/destinations/google-analytics-4/removeFromCart/generated-types.d.ts +1 -0
  85. package/dist/destinations/google-analytics-4/removeFromCart/index.js +27 -18
  86. package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
  87. package/dist/destinations/google-analytics-4/search/generated-types.d.ts +1 -0
  88. package/dist/destinations/google-analytics-4/search/index.js +26 -16
  89. package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
  90. package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +1 -0
  91. package/dist/destinations/google-analytics-4/selectItem/index.js +27 -18
  92. package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
  93. package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +1 -0
  94. package/dist/destinations/google-analytics-4/selectPromotion/index.js +30 -21
  95. package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
  96. package/dist/destinations/google-analytics-4/signUp/generated-types.d.ts +1 -0
  97. package/dist/destinations/google-analytics-4/signUp/index.js +26 -16
  98. package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
  99. package/dist/destinations/google-analytics-4/viewCart/generated-types.d.ts +1 -0
  100. package/dist/destinations/google-analytics-4/viewCart/index.js +27 -18
  101. package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
  102. package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +1 -0
  103. package/dist/destinations/google-analytics-4/viewItem/index.js +27 -18
  104. package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
  105. package/dist/destinations/google-analytics-4/viewItemList/generated-types.d.ts +1 -0
  106. package/dist/destinations/google-analytics-4/viewItemList/index.js +27 -18
  107. package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
  108. package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +1 -0
  109. package/dist/destinations/google-analytics-4/viewPromotion/index.js +30 -21
  110. package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
  111. package/dist/destinations/personas-messaging-sendgrid/sendEmail/generated-types.d.ts +0 -5
  112. package/dist/destinations/personas-messaging-sendgrid/sendEmail/index.js +0 -36
  113. package/dist/destinations/personas-messaging-sendgrid/sendEmail/index.js.map +1 -1
  114. package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js +4 -8
  115. package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js.map +1 -1
  116. package/dist/destinations/talon-one/index.js +5 -1
  117. package/dist/destinations/talon-one/index.js.map +1 -1
  118. package/dist/destinations/talon-one/t1-properties.d.ts +5 -0
  119. package/dist/destinations/talon-one/t1-properties.js +179 -1
  120. package/dist/destinations/talon-one/t1-properties.js.map +1 -1
  121. package/dist/destinations/talon-one/trackEvent/generated-types.d.ts +4 -0
  122. package/dist/destinations/talon-one/trackEvent/index.js +37 -2
  123. package/dist/destinations/talon-one/trackEvent/index.js.map +1 -1
  124. package/dist/destinations/talon-one/updateCustomerProfile/generated-types.d.ts +4 -0
  125. package/dist/destinations/talon-one/updateCustomerProfile/index.js +38 -3
  126. package/dist/destinations/talon-one/updateCustomerProfile/index.js.map +1 -1
  127. package/dist/destinations/talon-one/updateCustomerProfileV2/generated-types.d.ts +19 -0
  128. package/dist/destinations/talon-one/updateCustomerProfileV2/generated-types.js +3 -0
  129. package/dist/destinations/talon-one/updateCustomerProfileV2/generated-types.js.map +1 -0
  130. package/dist/destinations/talon-one/updateCustomerProfileV2/index.d.ts +5 -0
  131. package/dist/destinations/talon-one/updateCustomerProfileV2/index.js +36 -0
  132. package/dist/destinations/talon-one/updateCustomerProfileV2/index.js.map +1 -0
  133. package/dist/destinations/talon-one/updateCustomerProfilesAttributes/generated-types.d.ts +4 -0
  134. package/dist/destinations/talon-one/updateCustomerProfilesAttributes/index.js +36 -1
  135. package/dist/destinations/talon-one/updateCustomerProfilesAttributes/index.js.map +1 -1
  136. package/dist/destinations/talon-one/updateCustomerSession/generated-types.d.ts +47 -0
  137. package/dist/destinations/talon-one/updateCustomerSession/generated-types.js +3 -0
  138. package/dist/destinations/talon-one/updateCustomerSession/generated-types.js.map +1 -0
  139. package/dist/destinations/talon-one/updateCustomerSession/index.d.ts +5 -0
  140. package/dist/destinations/talon-one/updateCustomerSession/index.js +117 -0
  141. package/dist/destinations/talon-one/updateCustomerSession/index.js.map +1 -0
  142. package/package.json +4 -4
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const request_params_1 = require("../request-params");
4
+ const vars_1 = require("../vars");
5
+ const action = {
6
+ title: 'Identify User',
7
+ description: 'Sets user identity variables',
8
+ platform: 'cloud',
9
+ defaultSubscription: 'type = "identify"',
10
+ fields: {
11
+ userId: {
12
+ type: 'string',
13
+ required: true,
14
+ description: "The user's id",
15
+ label: 'User ID',
16
+ default: {
17
+ '@path': '$.userId'
18
+ }
19
+ },
20
+ anonymousId: {
21
+ type: 'string',
22
+ required: false,
23
+ description: "The user's anonymous id",
24
+ label: 'Anonymous ID',
25
+ default: {
26
+ '@path': '$.anonymousId'
27
+ }
28
+ },
29
+ displayName: {
30
+ type: 'string',
31
+ required: false,
32
+ description: "The user's display name",
33
+ label: 'Display Name',
34
+ default: {
35
+ '@path': '$.traits.name'
36
+ }
37
+ },
38
+ email: {
39
+ type: 'string',
40
+ required: false,
41
+ description: "The user's email",
42
+ label: 'Email',
43
+ default: {
44
+ '@path': '$.traits.email'
45
+ }
46
+ },
47
+ traits: {
48
+ type: 'object',
49
+ required: false,
50
+ description: 'The Segment traits to be forwarded to FullStory',
51
+ label: 'Traits',
52
+ default: {
53
+ '@path': '$.traits'
54
+ }
55
+ }
56
+ },
57
+ perform: (request, { payload, settings }) => {
58
+ const { traits, anonymousId, userId, email, displayName } = payload;
59
+ const normalizedTraits = vars_1.normalizePropertyNames(traits, { camelCase: true });
60
+ if (anonymousId) {
61
+ normalizedTraits.segmentAnonymousId_str = anonymousId;
62
+ }
63
+ const requestBody = {
64
+ ...normalizedTraits,
65
+ ...(email !== undefined && { email }),
66
+ ...(displayName !== undefined && { displayName })
67
+ };
68
+ const { url, options } = request_params_1.setUserPropertiesRequestParams(settings, userId, requestBody);
69
+ return request(url, options);
70
+ }
71
+ };
72
+ exports.default = action;
73
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/fullstory/identifyUser/index.ts"],"names":[],"mappings":";;AAEA,sDAAkE;AAClE,kCAAgD;AAEhD,MAAM,MAAM,GAA+B;IACzC,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,8BAA8B;IAC3C,QAAQ,EAAE,OAAO;IACjB,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,eAAe;YAC5B,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,yBAAyB;YACtC,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,yBAAyB;YACtC,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,kBAAkB;YAC/B,KAAK,EAAE,OAAO;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,gBAAgB;aAC1B;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,iDAAiD;YAC9D,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,OAAO,CAAA;QAEnE,MAAM,gBAAgB,GAAG,6BAAsB,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;QAE5E,IAAI,WAAW,EAAE;YACf,gBAAgB,CAAC,sBAAsB,GAAG,WAAW,CAAA;SACtD;QAGD,MAAM,WAAW,GAAG;YAClB,GAAG,gBAAgB;YACnB,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,CAAC;YACrC,GAAG,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,WAAW,EAAE,CAAC;SAClD,CAAA;QAED,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,+CAA8B,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,CAAA;QACtF,OAAO,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAC9B,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { DestinationDefinition } from '@segment/actions-core';
2
+ import type { Settings } from './generated-types';
3
+ declare const destination: DestinationDefinition<Settings>;
4
+ export default destination;
@@ -0,0 +1,56 @@
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 actions_core_1 = require("@segment/actions-core");
7
+ const identifyUser_1 = __importDefault(require("./identifyUser"));
8
+ const trackEvent_1 = __importDefault(require("./trackEvent"));
9
+ const request_params_1 = require("./request-params");
10
+ const destination = {
11
+ name: 'Fullstory (Actions)',
12
+ slug: 'actions-fullstory',
13
+ mode: 'cloud',
14
+ presets: [
15
+ {
16
+ name: 'Track Event',
17
+ subscribe: 'type = "track"',
18
+ partnerAction: 'trackEvent',
19
+ mapping: actions_core_1.defaultValues(trackEvent_1.default.fields)
20
+ },
21
+ {
22
+ name: 'Identify User',
23
+ subscribe: 'type = "identify"',
24
+ partnerAction: 'identifyUser',
25
+ mapping: actions_core_1.defaultValues(identifyUser_1.default.fields)
26
+ }
27
+ ],
28
+ authentication: {
29
+ scheme: 'custom',
30
+ fields: {
31
+ apiKey: {
32
+ label: 'API Key',
33
+ description: '[FullStory API key](https://help.fullstory.com/hc/en-us/articles/360052021773-Managing-API-Keys)',
34
+ type: 'password',
35
+ required: true
36
+ }
37
+ },
38
+ testAuthentication: (request, { settings }) => {
39
+ const { url, options } = request_params_1.listOperationsRequestParams(settings);
40
+ return request(url, options);
41
+ }
42
+ },
43
+ onDelete: async (request, { settings, payload }) => {
44
+ if (!payload.userId) {
45
+ throw new actions_core_1.IntegrationError('User Id is required for user deletion.');
46
+ }
47
+ const { url, options } = request_params_1.deleteUserRequestParams(settings, payload.userId);
48
+ return request(url, options);
49
+ },
50
+ actions: {
51
+ trackEvent: trackEvent_1.default,
52
+ identifyUser: identifyUser_1.default
53
+ }
54
+ };
55
+ exports.default = destination;
56
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/fullstory/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAuE;AAEvE,kEAAyC;AACzC,8DAAqC;AACrC,qDAAuF;AAEvF,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,OAAO;IACb,OAAO,EAAE;QACP;YACE,IAAI,EAAE,aAAa;YACnB,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,YAAY;YAC3B,OAAO,EAAE,4BAAa,CAAC,oBAAU,CAAC,MAAM,CAAC;SAC1C;QACD;YACE,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,cAAc;YAC7B,OAAO,EAAE,4BAAa,CAAC,sBAAY,CAAC,MAAM,CAAC;SAC5C;KACF;IACD,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,kGAAkG;gBAC/G,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;SACF;QAED,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC5C,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,4CAA2B,CAAC,QAAQ,CAAC,CAAA;YAC9D,OAAO,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QAC9B,CAAC;KACF;IAED,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QACjD,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,MAAM,IAAI,+BAAgB,CAAC,wCAAwC,CAAC,CAAA;SACrE;QACD,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,wCAAuB,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;QAC1E,OAAO,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAC9B,CAAC;IAED,OAAO,EAAE;QACP,UAAU,EAAV,oBAAU;QACV,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,18 @@
1
+ import type { RequestOptions } from '@segment/actions-core';
2
+ import type { Settings } from './generated-types';
3
+ interface RequestParams {
4
+ url: string;
5
+ options: RequestOptions;
6
+ }
7
+ export declare const listOperationsRequestParams: (settings: Settings) => RequestParams;
8
+ export declare const customEventRequestParams: (settings: Settings, requestValues: {
9
+ userId: string;
10
+ eventName: string;
11
+ eventData: {};
12
+ timestamp?: string;
13
+ useRecentSession?: boolean;
14
+ sessionUrl?: string;
15
+ }) => RequestParams;
16
+ export declare const setUserPropertiesRequestParams: (settings: Settings, userId: string, requestBody: Object) => RequestParams;
17
+ export declare const deleteUserRequestParams: (settings: Settings, userId: string) => RequestParams;
18
+ export {};
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteUserRequestParams = exports.setUserPropertiesRequestParams = exports.customEventRequestParams = exports.listOperationsRequestParams = void 0;
4
+ const apiBaseUrl = 'https://api.fullstory.com';
5
+ const defaultRequestParams = (settings, relativeUrl) => {
6
+ return {
7
+ url: `${apiBaseUrl}/${relativeUrl}`,
8
+ options: {
9
+ method: 'get',
10
+ headers: {
11
+ 'Content-Type': 'application/json',
12
+ Authorization: `Basic ${settings.apiKey}`
13
+ }
14
+ }
15
+ };
16
+ };
17
+ const listOperationsRequestParams = (settings) => defaultRequestParams(settings, `operations/v1?limit=1`);
18
+ exports.listOperationsRequestParams = listOperationsRequestParams;
19
+ const customEventRequestParams = (settings, requestValues) => {
20
+ const { userId, eventName, eventData, timestamp, useRecentSession, sessionUrl } = requestValues;
21
+ const defaultParams = defaultRequestParams(settings, `users/v1/individual/${encodeURIComponent(userId)}/customevent`);
22
+ const requestBody = {
23
+ event: {
24
+ event_name: eventName,
25
+ event_data: eventData
26
+ }
27
+ };
28
+ if (timestamp) {
29
+ requestBody.event.timestamp = timestamp;
30
+ }
31
+ if (useRecentSession) {
32
+ requestBody.event.use_recent_session = useRecentSession;
33
+ }
34
+ if (sessionUrl) {
35
+ requestBody.event.session_url = sessionUrl;
36
+ }
37
+ return {
38
+ ...defaultParams,
39
+ options: {
40
+ ...defaultParams.options,
41
+ method: 'post',
42
+ json: requestBody
43
+ }
44
+ };
45
+ };
46
+ exports.customEventRequestParams = customEventRequestParams;
47
+ const setUserPropertiesRequestParams = (settings, userId, requestBody) => {
48
+ const defaultParams = defaultRequestParams(settings, `users/v1/individual/${encodeURIComponent(userId)}/customvars`);
49
+ return {
50
+ ...defaultParams,
51
+ options: {
52
+ ...defaultParams.options,
53
+ method: 'post',
54
+ json: requestBody
55
+ }
56
+ };
57
+ };
58
+ exports.setUserPropertiesRequestParams = setUserPropertiesRequestParams;
59
+ const deleteUserRequestParams = (settings, userId) => {
60
+ const defaultParams = defaultRequestParams(settings, `users/v1/individual/${encodeURIComponent(userId)}`);
61
+ return {
62
+ ...defaultParams,
63
+ options: {
64
+ ...defaultParams.options,
65
+ method: 'delete'
66
+ }
67
+ };
68
+ };
69
+ exports.deleteUserRequestParams = deleteUserRequestParams;
70
+ //# sourceMappingURL=request-params.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-params.js","sourceRoot":"","sources":["../../../src/destinations/fullstory/request-params.ts"],"names":[],"mappings":";;;AAWA,MAAM,UAAU,GAAG,2BAA2B,CAAA;AAQ9C,MAAM,oBAAoB,GAAG,CAAC,QAAkB,EAAE,WAAmB,EAAiB,EAAE;IACtF,OAAO;QACL,GAAG,EAAE,GAAG,UAAU,IAAI,WAAW,EAAE;QACnC,OAAO,EAAE;YACP,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,SAAS,QAAQ,CAAC,MAAM,EAAE;aAC1C;SACF;KACF,CAAA;AACH,CAAC,CAAA;AAOM,MAAM,2BAA2B,GAAG,CAAC,QAAkB,EAAiB,EAAE,CAC/E,oBAAoB,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAAA;AAD5C,QAAA,2BAA2B,+BACiB;AAQlD,MAAM,wBAAwB,GAAG,CACtC,QAAkB,EAClB,aAOC,EACc,EAAE;IACjB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,GAAG,aAAa,CAAA;IAC/F,MAAM,aAAa,GAAG,oBAAoB,CAAC,QAAQ,EAAE,uBAAuB,kBAAkB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;IAErH,MAAM,WAAW,GAAwB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@ -0,0 +1,10 @@
1
+ export interface Payload {
2
+ userId: string;
3
+ name: string;
4
+ properties?: {
5
+ [k: string]: unknown;
6
+ };
7
+ timestamp?: string | number;
8
+ useRecentSession?: boolean;
9
+ sessionUrl?: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/fullstory/trackEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,79 @@
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 dayjs_1 = __importDefault(require("../../../lib/dayjs"));
7
+ const request_params_1 = require("../request-params");
8
+ const vars_1 = require("../vars");
9
+ const action = {
10
+ title: 'Track Event',
11
+ description: 'Track events',
12
+ platform: 'cloud',
13
+ defaultSubscription: 'type = "track"',
14
+ fields: {
15
+ userId: {
16
+ type: 'string',
17
+ required: true,
18
+ description: "The user's id",
19
+ label: 'User ID',
20
+ default: {
21
+ '@path': '$.userId'
22
+ }
23
+ },
24
+ name: {
25
+ description: 'The name of the event.',
26
+ label: 'Name',
27
+ required: true,
28
+ type: 'string',
29
+ default: {
30
+ '@path': '$.event'
31
+ }
32
+ },
33
+ properties: {
34
+ description: 'A JSON object containing additional information about the event that will be indexed by FullStory.',
35
+ label: 'Properties',
36
+ required: false,
37
+ type: 'object',
38
+ default: {
39
+ '@path': '$.properties'
40
+ }
41
+ },
42
+ timestamp: {
43
+ description: 'The date and time when the event occurred. If not provided, the current FullStory server time will be used.',
44
+ label: 'Timestamp',
45
+ required: false,
46
+ type: 'datetime',
47
+ default: {
48
+ '@path': '$.timestamp'
49
+ }
50
+ },
51
+ useRecentSession: {
52
+ description: "Set to true if the custom event should be attached to the user's most recent session. The most recent session must have had activity within the past 30 minutes.",
53
+ label: 'Use Recent Session',
54
+ required: false,
55
+ type: 'boolean'
56
+ },
57
+ sessionUrl: {
58
+ description: 'If known, the FullStory session playback URL to which the event should be attached, as returned by the FS.getCurrentSessionURL() client API.',
59
+ label: 'Session URL',
60
+ required: false,
61
+ type: 'string'
62
+ }
63
+ },
64
+ perform: (request, { payload, settings }) => {
65
+ const { userId, name, properties, timestamp, useRecentSession, sessionUrl } = payload;
66
+ const utcTimestamp = timestamp ? dayjs_1.default.utc(timestamp) : undefined;
67
+ const { url, options } = request_params_1.customEventRequestParams(settings, {
68
+ userId,
69
+ eventName: name,
70
+ eventData: vars_1.normalizePropertyNames(properties),
71
+ timestamp: utcTimestamp && utcTimestamp.isValid() ? utcTimestamp.toISOString() : undefined,
72
+ useRecentSession,
73
+ sessionUrl
74
+ });
75
+ return request(url, options);
76
+ }
77
+ };
78
+ exports.default = action;
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/fullstory/trackEvent/index.ts"],"names":[],"mappings":";;;;;AACA,+DAAsC;AAGtC,sDAA4D;AAC5D,kCAAgD;AAEhD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,cAAc;IAC3B,QAAQ,EAAE,OAAO;IACjB,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,eAAe;YAC5B,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,IAAI,EAAE;YACJ,WAAW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AO,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS;YAC1F,gBAAgB;YAChB,UAAU;SACX,CAAC,CAAA;QACF,OAAO,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAC9B,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const normalizePropertyNames: (obj?: {} | undefined, options?: {
2
+ camelCase?: boolean | undefined;
3
+ } | undefined) => Record<string, unknown>;
@@ -0,0 +1,100 @@
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
+ exports.normalizePropertyNames = void 0;
7
+ const camelCase_1 = __importDefault(require("lodash/camelCase"));
8
+ const isString = (x) => typeof x === 'string';
9
+ const isBool = (x) => typeof x === 'boolean';
10
+ const isReal = (x) => typeof x === 'number';
11
+ const isInt = (x) => typeof x === 'number' && x - Math.floor(x) === 0;
12
+ const isDate = (x) => {
13
+ if (!x) {
14
+ return false;
15
+ }
16
+ if (x.constructor === Date) {
17
+ return !isNaN(x);
18
+ }
19
+ return false;
20
+ };
21
+ const isArrayOf = (f) => {
22
+ return function (x) {
23
+ if (!(x instanceof Array)) {
24
+ return false;
25
+ }
26
+ for (let i = 0; i < x.length; i++) {
27
+ if (!f(x[i])) {
28
+ return false;
29
+ }
30
+ }
31
+ return true;
32
+ };
33
+ };
34
+ const isObject = (x) => x && typeof x === 'object';
35
+ const typeValidators = {
36
+ str: isString,
37
+ bool: isBool,
38
+ real: isReal,
39
+ int: isInt,
40
+ date: isDate,
41
+ strs: isArrayOf(isString),
42
+ bools: isArrayOf(isBool),
43
+ reals: isArrayOf(isReal),
44
+ ints: isArrayOf(isInt),
45
+ dates: isArrayOf(isDate),
46
+ objs: isArrayOf(isObject),
47
+ obj: isObject
48
+ };
49
+ const inferType = (value) => {
50
+ for (const t in typeValidators) {
51
+ if (typeValidators[t](value)) {
52
+ return t;
53
+ }
54
+ }
55
+ return null;
56
+ };
57
+ const isKnownTypeSuffix = (suffix) => !!typeValidators[suffix];
58
+ const camelCasePropertyName = (name) => {
59
+ const parts = name.split('_');
60
+ if (parts.length > 1) {
61
+ const typeSuffix = parts.pop();
62
+ if (typeSuffix && typeValidators[typeSuffix]) {
63
+ return camelCase_1.default(parts.join('_')) + '_' + typeSuffix;
64
+ }
65
+ }
66
+ return camelCase_1.default(name);
67
+ };
68
+ const typeSuffixPropertyName = (name, value) => {
69
+ const valueTypeName = typeof value;
70
+ if (valueTypeName === 'undefined') {
71
+ return name;
72
+ }
73
+ const lastUnderscore = name.lastIndexOf('_');
74
+ if (lastUnderscore === -1 || !isKnownTypeSuffix(name.substring(lastUnderscore + 1))) {
75
+ const maybeType = inferType(value);
76
+ if (maybeType === null) {
77
+ return name;
78
+ }
79
+ return `${name}_${maybeType}`;
80
+ }
81
+ return name;
82
+ };
83
+ const normalizePropertyNames = (obj, options) => {
84
+ if (!obj) {
85
+ return {};
86
+ }
87
+ const normalizePropertyName = (name, value) => {
88
+ let transformedName = name;
89
+ if (options?.camelCase) {
90
+ transformedName = camelCasePropertyName(name);
91
+ }
92
+ return typeSuffixPropertyName(transformedName, value);
93
+ };
94
+ return Object.entries(obj).reduce((acc, [key, value]) => ({
95
+ ...acc,
96
+ [normalizePropertyName(key, value)]: value
97
+ }), {});
98
+ };
99
+ exports.normalizePropertyNames = normalizePropertyNames;
100
+ //# sourceMappingURL=vars.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vars.js","sourceRoot":"","sources":["../../../src/destinations/fullstory/vars.ts"],"names":[],"mappings":";;;;;;AAAA,iEAAwC;AAExC,MAAM,QAAQ,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAA;AAElD,MAAM,MAAM,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,OAA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AAA;IAE5C,IAAI,cAAc,KAAK,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,EAAE;QAEnF,MAAM,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;QAClC,IAAI,SAAS,KAAK,IAAI,EAAE;YAEtB,OAAO,IAAI,CAAA;SACZ;QAED,OAAO,GAAG,IAAI,IAAI,SAAS,EAAE,CAAA;KAC9B;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAYM,MAAM,sBAAsB,GAAG,CAAC,GAAQ,EAAE,OAAiC,EAA2B,EAAE;IAC7G,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,EAAE,CAAA;KACV;IAED,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAAE,KAAc,EAAE,EAAE;QAC7D,IAAI,eAAe,GAAG,IAAI,CAAA;QAC1B,IAAI,OAAO,EAAE,SAAS,EAAE;YACtB,eAAe,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAA;SAC9C;QACD,OAAO,sBAAsB,CAAC,eAAe,EAAE,KAAK,CAAC,CAAA;IACvD,CAAC,CAAA;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAC/B,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;QACtB,GAAG,GAAG;QACN,CAAC,qBAAqB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK;KAC3C,CAAC,EACF,EAAE,CACH,CAAA;AACH,CAAC,CAAA;AApBY,QAAA,sBAAsB,0BAoBlC"}
@@ -1,6 +1,7 @@
1
1
  export interface Payload {
2
2
  client_id: string;
3
3
  user_id?: string;
4
+ timestamp_micros?: string;
4
5
  currency?: string;
5
6
  value?: number;
6
7
  coupon?: string;
@@ -10,6 +10,7 @@ const action = {
10
10
  fields: {
11
11
  client_id: { ...ga4_properties_1.client_id },
12
12
  user_id: { ...ga4_properties_1.user_id },
13
+ timestamp_micros: { ...ga4_properties_1.timestamp_micros },
13
14
  currency: { ...ga4_properties_1.currency },
14
15
  value: { ...ga4_properties_1.value },
15
16
  coupon: { ...ga4_properties_1.coupon },
@@ -22,7 +23,7 @@ const action = {
22
23
  engagement_time_msec: ga4_properties_1.engagement_time_msec,
23
24
  params: ga4_properties_1.params
24
25
  },
25
- perform: (request, { payload }) => {
26
+ perform: (request, { payload, features }) => {
26
27
  if (payload.items && !payload.items.length) {
27
28
  throw new actions_core_1.IntegrationError('Google requires one or more products in add_payment_info events.', 'Misconfigured required field', 400);
28
29
  }
@@ -47,27 +48,35 @@ const action = {
47
48
  return product;
48
49
  });
49
50
  }
51
+ if (features && features['actions-google-analytics-4-verify-params-feature']) {
52
+ ga4_functions_1.verifyParams(payload.params);
53
+ ga4_functions_1.verifyUserProps(payload.user_properties);
54
+ }
55
+ const request_object = {
56
+ client_id: payload.client_id,
57
+ user_id: payload.user_id,
58
+ events: [
59
+ {
60
+ name: 'add_payment_info',
61
+ params: {
62
+ currency: payload.currency,
63
+ value: payload.value,
64
+ coupon: payload.coupon,
65
+ payment_type: payload.payment_type,
66
+ items: googleItems,
67
+ engagement_time_msec: payload.engagement_time_msec,
68
+ ...payload.params
69
+ }
70
+ }
71
+ ],
72
+ ...ga4_properties_1.formatUserProperties(payload.user_properties)
73
+ };
74
+ if (features && features['actions-google-analytics-4-add-timestamp']) {
75
+ request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
76
+ }
50
77
  return request('https://www.google-analytics.com/mp/collect', {
51
78
  method: 'POST',
52
- json: {
53
- client_id: payload.client_id,
54
- user_id: payload.user_id,
55
- events: [
56
- {
57
- name: 'add_payment_info',
58
- params: {
59
- currency: payload.currency,
60
- value: payload.value,
61
- coupon: payload.coupon,
62
- payment_type: payload.payment_type,
63
- items: googleItems,
64
- engagement_time_msec: payload.engagement_time_msec,
65
- ...payload.params
66
- }
67
- }
68
- ],
69
- ...ga4_properties_1.formatUserProperties(payload.user_properties)
70
- }
79
+ json: request_object
71
80
  });
72
81
  }
73
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addPaymentInfo/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,oDAAiD;AACjD,sDAY0B;AAE1B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,0DAA0D;IACvE,mBAAmB,EAAE,mDAAmD;IACxE,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,MAAM,EAAE,EAAE,GAAG,uBAAM,EAAE;QACrB,YAAY,EAAE,EAAE,GAAG,6BAAY,EAAE;QACjC,KAAK,EAAE;YACL,GAAG,qCAAoB;YACvB,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE,gCAAe;QAChC,oBAAoB,EAAE,qCAAoB;QAC1C,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAGhC,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE;YAC1C,MAAM,IAAI,+BAAgB,CACxB,kEAAkE,EAClE,8BAA8B,EAC9B,GAAG,CACJ,CAAA;SACF;QAED,IAAI,OAAO,CAAC,QAAQ,EAAE;YACpB,8BAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;SACjC;QAGD,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,EAAE;YACnD,MAAM,IAAI,+BAAgB,CAAC,uCAAuC,EAAE,8BAA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,CAAC,OAAO,CAAC,eAAe,CAAC;aACjD;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addPaymentInfo/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,oDAAkG;AAClG,sDAa0B;AAE1B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,0DAA0D;IACvE,mBAAmB,EAAE,mDAAmD;IACxE,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QACzB,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE;QACnB,MAAM,EAAE,EAAE,GAAG,uBAAM,EAAE;QACrB,YAAY,EAAE,EAAE,GAAG,6BAAY,EAAE;QACjC,KAAK,EAAE;YACL,GAAG,qCAAoB;YACvB,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE,gCAAe;QAChC,oBAAoB,EAAE,qCAAoB;QAC1C,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAG1C,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE;YAC1C,MAAM,IAAI,+BAAgB,CACxB,kEAAkE,EAClE,8BAA8B,EAC9B,GAAG,CACJ,CAAA;SACF;QAED,IAAI,OAAO,CAAC,QAAQ,EAAE;YACpB,8BAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;SACjC;QAGD,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,E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Y,EAAE,OAAO,CAAC,YAAY;wBAClC,KAAK,EAAE,WAAW;wBAClB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;wBAClD,GAAG,OAAO,CAAC,MAAM;qBAClB;iBACF;aACF;YACD,GAAG,qCAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,cAAc;SACrB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,6 +1,7 @@
1
1
  export interface Payload {
2
2
  client_id: string;
3
3
  user_id?: string;
4
+ timestamp_micros?: string;
4
5
  currency?: string;
5
6
  items: {
6
7
  item_id?: string;
@@ -10,6 +10,7 @@ const action = {
10
10
  fields: {
11
11
  client_id: { ...ga4_properties_1.client_id },
12
12
  user_id: { ...ga4_properties_1.user_id },
13
+ timestamp_micros: { ...ga4_properties_1.timestamp_micros },
13
14
  currency: { ...ga4_properties_1.currency },
14
15
  items: {
15
16
  ...ga4_properties_1.items_single_products,
@@ -20,7 +21,7 @@ const action = {
20
21
  engagement_time_msec: ga4_properties_1.engagement_time_msec,
21
22
  params: ga4_properties_1.params
22
23
  },
23
- perform: (request, { payload }) => {
24
+ perform: (request, { payload, features }) => {
24
25
  let googleItems = [];
25
26
  if (payload.currency) {
26
27
  ga4_functions_1.verifyCurrency(payload.currency);
@@ -36,25 +37,33 @@ const action = {
36
37
  return product;
37
38
  });
38
39
  }
40
+ if (features && features['actions-google-analytics-4-verify-params-feature']) {
41
+ ga4_functions_1.verifyParams(payload.params);
42
+ ga4_functions_1.verifyUserProps(payload.user_properties);
43
+ }
44
+ const request_object = {
45
+ client_id: payload.client_id,
46
+ user_id: payload.user_id,
47
+ events: [
48
+ {
49
+ name: 'add_to_cart',
50
+ params: {
51
+ currency: payload.currency,
52
+ items: googleItems,
53
+ value: payload.value,
54
+ engagement_time_msec: payload.engagement_time_msec,
55
+ ...payload.params
56
+ }
57
+ }
58
+ ],
59
+ ...ga4_properties_1.formatUserProperties(payload.user_properties)
60
+ };
61
+ if (features && features['actions-google-analytics-4-add-timestamp']) {
62
+ request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
63
+ }
39
64
  return request('https://www.google-analytics.com/mp/collect', {
40
65
  method: 'POST',
41
- json: {
42
- client_id: payload.client_id,
43
- user_id: payload.user_id,
44
- events: [
45
- {
46
- name: 'add_to_cart',
47
- params: {
48
- currency: payload.currency,
49
- items: googleItems,
50
- value: payload.value,
51
- engagement_time_msec: payload.engagement_time_msec,
52
- ...payload.params
53
- }
54
- }
55
- ],
56
- ...ga4_properties_1.formatUserProperties(payload.user_properties)
57
- }
66
+ json: request_object
58
67
  });
59
68
  }
60
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,oDAAiD;AACjD,sDAU0B;AAE1B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,6CAA6C;IAC1D,mBAAmB,EAAE,4CAA4C;IACjE,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;YACL,GAAG,sCAAqB;YACxB,QAAQ,EAAE,IAAI;SACf;QACD,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE;QACnB,eAAe,EAAE,gCAAe;QAChC,oBAAoB,EAAE,qCAAoB;QAC1C,MAAM,EAA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