@segment/action-destinations 3.123.0 → 3.125.1-ga4-cloud.11

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 (154) hide show
  1. package/README.md +1 -1
  2. package/dist/destinations/actable-predictive/sendCustomEvent/index.js +1 -1
  3. package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -1
  4. package/dist/destinations/actable-predictive/sendEmailEvent/index.js +1 -1
  5. package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -1
  6. package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +1 -1
  7. package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -1
  8. package/dist/destinations/actable-predictive/sendWebEvent/index.js +1 -1
  9. package/dist/destinations/actable-predictive/sendWebEvent/index.js.map +1 -1
  10. package/dist/destinations/braze-cohorts/api/index.d.ts +15 -0
  11. package/dist/destinations/braze-cohorts/api/index.js +36 -0
  12. package/dist/destinations/braze-cohorts/api/index.js.map +1 -0
  13. package/dist/destinations/braze-cohorts/braze-cohorts-types.d.ts +10 -0
  14. package/dist/destinations/braze-cohorts/braze-cohorts-types.js +3 -0
  15. package/dist/destinations/braze-cohorts/braze-cohorts-types.js.map +1 -0
  16. package/dist/destinations/braze-cohorts/generated-types.d.ts +4 -0
  17. package/dist/destinations/braze-cohorts/generated-types.js +3 -0
  18. package/dist/destinations/braze-cohorts/generated-types.js.map +1 -0
  19. package/dist/destinations/braze-cohorts/index.d.ts +4 -0
  20. package/dist/destinations/braze-cohorts/index.js +53 -0
  21. package/dist/destinations/braze-cohorts/index.js.map +1 -0
  22. package/dist/destinations/braze-cohorts/syncAudiences/generated-types.d.ts +16 -0
  23. package/dist/destinations/braze-cohorts/syncAudiences/generated-types.js +3 -0
  24. package/dist/destinations/braze-cohorts/syncAudiences/generated-types.js.map +1 -0
  25. package/dist/destinations/braze-cohorts/syncAudiences/index.d.ts +5 -0
  26. package/dist/destinations/braze-cohorts/syncAudiences/index.js +158 -0
  27. package/dist/destinations/braze-cohorts/syncAudiences/index.js.map +1 -0
  28. package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +1 -0
  29. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +12 -0
  30. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
  31. package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.d.ts +1 -0
  32. package/dist/destinations/engage-messaging-twilio/sendSms/index.js +12 -0
  33. package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
  34. package/dist/destinations/facebook-conversions-api/addToCart/index.js +2 -1
  35. package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
  36. package/dist/destinations/facebook-conversions-api/custom/index.js +2 -1
  37. package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
  38. package/dist/destinations/facebook-conversions-api/generated-types.d.ts +1 -0
  39. package/dist/destinations/facebook-conversions-api/index.js +7 -1
  40. package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
  41. package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +2 -1
  42. package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
  43. package/dist/destinations/facebook-conversions-api/pageView/index.js +2 -1
  44. package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
  45. package/dist/destinations/facebook-conversions-api/purchase/index.js +2 -1
  46. package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
  47. package/dist/destinations/facebook-conversions-api/search/index.js +2 -1
  48. package/dist/destinations/facebook-conversions-api/search/index.js.map +1 -1
  49. package/dist/destinations/facebook-conversions-api/viewContent/index.js +2 -1
  50. package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
  51. package/dist/destinations/google-analytics-4/addPaymentInfo/generated-types.d.ts +3 -1
  52. package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +9 -3
  53. package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
  54. package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +3 -1
  55. package/dist/destinations/google-analytics-4/addToCart/index.js +9 -3
  56. package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
  57. package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +3 -1
  58. package/dist/destinations/google-analytics-4/addToWishlist/index.js +9 -3
  59. package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
  60. package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +3 -1
  61. package/dist/destinations/google-analytics-4/beginCheckout/index.js +9 -3
  62. package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
  63. package/dist/destinations/google-analytics-4/customEvent/generated-types.d.ts +3 -1
  64. package/dist/destinations/google-analytics-4/customEvent/index.js +9 -3
  65. package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
  66. package/dist/destinations/google-analytics-4/ga4-functions.d.ts +3 -0
  67. package/dist/destinations/google-analytics-4/ga4-functions.js +31 -1
  68. package/dist/destinations/google-analytics-4/ga4-functions.js.map +1 -1
  69. package/dist/destinations/google-analytics-4/ga4-properties.d.ts +2 -0
  70. package/dist/destinations/google-analytics-4/ga4-properties.js +17 -2
  71. package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -1
  72. package/dist/destinations/google-analytics-4/ga4-types.d.ts +14 -0
  73. package/dist/destinations/google-analytics-4/ga4-types.js +6 -0
  74. package/dist/destinations/google-analytics-4/ga4-types.js.map +1 -1
  75. package/dist/destinations/google-analytics-4/generateLead/generated-types.d.ts +3 -1
  76. package/dist/destinations/google-analytics-4/generateLead/index.js +9 -3
  77. package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
  78. package/dist/destinations/google-analytics-4/generated-types.d.ts +2 -1
  79. package/dist/destinations/google-analytics-4/index.js +8 -10
  80. package/dist/destinations/google-analytics-4/index.js.map +1 -1
  81. package/dist/destinations/google-analytics-4/login/generated-types.d.ts +3 -1
  82. package/dist/destinations/google-analytics-4/login/index.js +9 -3
  83. package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
  84. package/dist/destinations/google-analytics-4/pageView/generated-types.d.ts +3 -1
  85. package/dist/destinations/google-analytics-4/pageView/index.js +9 -3
  86. package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
  87. package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +3 -1
  88. package/dist/destinations/google-analytics-4/purchase/index.js +9 -3
  89. package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
  90. package/dist/destinations/google-analytics-4/refund/generated-types.d.ts +3 -1
  91. package/dist/destinations/google-analytics-4/refund/index.js +9 -3
  92. package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
  93. package/dist/destinations/google-analytics-4/removeFromCart/generated-types.d.ts +3 -1
  94. package/dist/destinations/google-analytics-4/removeFromCart/index.js +9 -3
  95. package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
  96. package/dist/destinations/google-analytics-4/search/generated-types.d.ts +3 -1
  97. package/dist/destinations/google-analytics-4/search/index.js +9 -3
  98. package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
  99. package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +3 -1
  100. package/dist/destinations/google-analytics-4/selectItem/index.js +9 -3
  101. package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
  102. package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +3 -1
  103. package/dist/destinations/google-analytics-4/selectPromotion/index.js +9 -3
  104. package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
  105. package/dist/destinations/google-analytics-4/signUp/generated-types.d.ts +3 -1
  106. package/dist/destinations/google-analytics-4/signUp/index.js +9 -3
  107. package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
  108. package/dist/destinations/google-analytics-4/viewCart/generated-types.d.ts +3 -1
  109. package/dist/destinations/google-analytics-4/viewCart/index.js +9 -3
  110. package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
  111. package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +3 -1
  112. package/dist/destinations/google-analytics-4/viewItem/index.js +9 -3
  113. package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
  114. package/dist/destinations/google-analytics-4/viewItemList/generated-types.d.ts +3 -1
  115. package/dist/destinations/google-analytics-4/viewItemList/index.js +9 -3
  116. package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
  117. package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +3 -1
  118. package/dist/destinations/google-analytics-4/viewPromotion/index.js +9 -3
  119. package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
  120. package/dist/destinations/index.js +2 -0
  121. package/dist/destinations/index.js.map +1 -1
  122. package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js +7 -1
  123. package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js.map +1 -1
  124. package/dist/destinations/vwo/generated-types.d.ts +3 -0
  125. package/dist/destinations/vwo/generated-types.js +3 -0
  126. package/dist/destinations/vwo/generated-types.js.map +1 -0
  127. package/dist/destinations/vwo/identifyUser/generated-types.d.ts +12 -0
  128. package/dist/destinations/vwo/identifyUser/generated-types.js +3 -0
  129. package/dist/destinations/vwo/identifyUser/generated-types.js.map +1 -0
  130. package/dist/destinations/vwo/identifyUser/index.d.ts +5 -0
  131. package/dist/destinations/vwo/identifyUser/index.js +80 -0
  132. package/dist/destinations/vwo/identifyUser/index.js.map +1 -0
  133. package/dist/destinations/vwo/index.d.ts +4 -0
  134. package/dist/destinations/vwo/index.js +60 -0
  135. package/dist/destinations/vwo/index.js.map +1 -0
  136. package/dist/destinations/vwo/pageVisit/generated-types.d.ts +10 -0
  137. package/dist/destinations/vwo/pageVisit/generated-types.js +3 -0
  138. package/dist/destinations/vwo/pageVisit/generated-types.js.map +1 -0
  139. package/dist/destinations/vwo/pageVisit/index.d.ts +5 -0
  140. package/dist/destinations/vwo/pageVisit/index.js +77 -0
  141. package/dist/destinations/vwo/pageVisit/index.js.map +1 -0
  142. package/dist/destinations/vwo/trackEvent/generated-types.d.ts +13 -0
  143. package/dist/destinations/vwo/trackEvent/generated-types.js +3 -0
  144. package/dist/destinations/vwo/trackEvent/generated-types.js.map +1 -0
  145. package/dist/destinations/vwo/trackEvent/index.d.ts +5 -0
  146. package/dist/destinations/vwo/trackEvent/index.js +86 -0
  147. package/dist/destinations/vwo/trackEvent/index.js.map +1 -0
  148. package/dist/destinations/vwo/types.d.ts +42 -0
  149. package/dist/destinations/vwo/types.js +3 -0
  150. package/dist/destinations/vwo/types.js.map +1 -0
  151. package/dist/destinations/vwo/utility.d.ts +13 -0
  152. package/dist/destinations/vwo/utility.js +59 -0
  153. package/dist/destinations/vwo/utility.js.map +1 -0
  154. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"pipedrive-client.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/pipedriveApi/pipedrive-client.ts"],"names":[],"mappings":";;;;;AAEA,qDAA4B;AAa5B,MAAM,cAAc,GAAqB;IACvC,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,cAAc;IACvB,YAAY,EAAE,mBAAmB;CAClC,CAAA;AAOD,MAAM,iBAAiB,GAAwB;IAC7C,GAAG,cAAc;IACjB,QAAQ,EAAE,gBAAgB;IAC1B,IAAI,EAAE,YAAY;CACnB,CAAA;AASD,MAAM,KAAK,GAAG,EAAE,CAAA;AAEhB,MAAM,eAAe;IAInB,YAAY,QAAkB,EAAE,OAAsB;QACpD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;IACzB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,IAAc,EAAE,SAAiB,EAAE,IAAa;QAC1D,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,IAAI,CAAA;SACZ;QACD,MAAM,YAAY,GAA+B;YAC/C,IAAI;YACJ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e,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QACtC,MAAM,OAAO,GAAG,WAAW,IAAI,CAAC,QAAQ,CAAC,MAAM,uBAAuB,CAAA;QACtE,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,OAAO,IAAI,IAAI,EAAE,EAAE;YACzC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,OAAgC;QACnD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;IAC1F,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,SAAoC;QACtD,OAAO,KAAK,EAAE,OAAsB,EAAE,EAAE,QAAQ,EAAmC,EAAE,EAAE;YACrF,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;YACrD,OAAO,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;QACpC,CAAC,CAAA;IACH,CAAC;CACF;AAED,kBAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"pipedrive-client.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/pipedriveApi/pipedrive-client.ts"],"names":[],"mappings":";;;;;AAEA,qDAA4B;AAa5B,MAAM,cAAc,GAAqB;IACvC,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,cAAc;IACvB,YAAY,EAAE,mBAAmB;CAClC,CAAA;AAED,MAAM,8BAA8B,GAAG;IACrC,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,eAAe;IACxB,YAAY,EAAE,oBAAoB;CACnC,CAAA;AAOD,MAAM,iBAAiB,GAAG;IACxB,GAAG,8BAA8B;IACjC,QAAQ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number;
3
+ }
@@ -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/vwo/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export interface Payload {
2
+ attributes: {
3
+ [k: string]: unknown;
4
+ };
5
+ vwoUuid: string;
6
+ page: {
7
+ [k: string]: unknown;
8
+ };
9
+ ip?: string;
10
+ userAgent: string;
11
+ timestamp: string;
12
+ }
@@ -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/vwo/identifyUser/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { 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,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utility_1 = require("../utility");
4
+ const action = {
5
+ title: 'Identify User',
6
+ description: "Maps segment's visitor traits to VWO visitors' attributes",
7
+ defaultSubscription: 'type = "identify"',
8
+ fields: {
9
+ attributes: {
10
+ description: 'A JSON object containing additional attributes that will be associated with the event.',
11
+ label: 'attributes',
12
+ required: true,
13
+ type: 'object',
14
+ default: {
15
+ '@path': '$.traits'
16
+ }
17
+ },
18
+ vwoUuid: {
19
+ description: 'VWO UUID',
20
+ label: 'VWO UUID',
21
+ required: true,
22
+ type: 'string',
23
+ default: {
24
+ '@path': '$.traits.vwo_uuid'
25
+ }
26
+ },
27
+ page: {
28
+ description: 'Page Context',
29
+ label: 'Page',
30
+ required: true,
31
+ type: 'object',
32
+ default: {
33
+ '@path': '$.context.page'
34
+ }
35
+ },
36
+ ip: {
37
+ description: 'IP Address',
38
+ label: 'IP Address',
39
+ required: false,
40
+ type: 'string',
41
+ default: {
42
+ '@path': '$.context.ip'
43
+ }
44
+ },
45
+ userAgent: {
46
+ description: 'User Agent',
47
+ label: 'User Agent',
48
+ required: true,
49
+ type: 'string',
50
+ default: {
51
+ '@path': '$.context.userAgent'
52
+ }
53
+ },
54
+ timestamp: {
55
+ description: 'Timestamp',
56
+ label: 'Timestamp',
57
+ required: true,
58
+ type: 'string',
59
+ default: {
60
+ '@path': '$.timestamp'
61
+ }
62
+ }
63
+ },
64
+ perform: (request, { settings, payload }) => {
65
+ const eventName = 'vwo_syncVisitorProp';
66
+ const attributes = payload.attributes;
67
+ delete attributes['vwo_uuid'];
68
+ const visitor = { props: utility_1.formatAttributes(attributes) };
69
+ const { headers, structuredPayload } = utility_1.formatPayload(eventName, payload, true);
70
+ structuredPayload.d.visitor = structuredPayload.d.event.props['$visitor'] = visitor;
71
+ const endpoint = `https://dev.visualwebsiteoptimizer.com/events/t?en=${eventName}&a=${settings.vwoAccountId}`;
72
+ return request(endpoint, {
73
+ method: 'POST',
74
+ json: structuredPayload,
75
+ headers
76
+ });
77
+ }
78
+ };
79
+ exports.default = action;
80
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/vwo/identifyUser/index.ts"],"names":[],"mappings":";;AAGA,wCAA4D;AAE5D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,2DAA2D;IACxE,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,UAAU,EAAE;YACV,WAAW,EAAE,wFAAwF;YACrG,KAAK,EAAE,YAAY;YACnB,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QAC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A;QAC9E,iBAAiB,CAAC,CAAC,CAAC,OAAO,GAAG,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,OAAO,CAAA;QACnF,MAAM,QAAQ,GAAG,sDAAsD,SAAS,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAA;QAC7G,OAAO,OAAO,CAAC,QAAQ,EAAE;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,iBAAiB;YACvB,OAAO;SACR,CAAC,CAAA;IACJ,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,60 @@
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 trackEvent_1 = __importDefault(require("./trackEvent"));
8
+ const identifyUser_1 = __importDefault(require("./identifyUser"));
9
+ const pageVisit_1 = __importDefault(require("./pageVisit"));
10
+ const destination = {
11
+ name: 'VWO Cloud Mode (Actions)',
12
+ slug: 'actions-vwo-cloud',
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
+ name: 'Page Visit',
29
+ subscribe: 'type = "page"',
30
+ partnerAction: 'pageVisit',
31
+ mapping: actions_core_1.defaultValues(pageVisit_1.default.fields)
32
+ }
33
+ ],
34
+ authentication: {
35
+ scheme: 'custom',
36
+ fields: {
37
+ vwoAccountId: {
38
+ label: 'Your VWO account ID, used for fetching your VWO async smart code. ',
39
+ description: 'Enter your VWO Account ID',
40
+ type: 'number',
41
+ required: true
42
+ }
43
+ },
44
+ testAuthentication: (_request, { settings }) => {
45
+ if (settings.vwoAccountId < 1 || settings.vwoAccountId.toString().length > 7) {
46
+ throw new Error('Invalid AccountID. Please check your AccountID');
47
+ }
48
+ else {
49
+ return true;
50
+ }
51
+ }
52
+ },
53
+ actions: {
54
+ trackEvent: trackEvent_1.default,
55
+ identifyUser: identifyUser_1.default,
56
+ pageVisit: pageVisit_1.default
57
+ }
58
+ };
59
+ exports.default = destination;
60
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/vwo/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAAqD;AAErD,8DAAqC;AACrC,kEAAyC;AACzC,4DAAmC;AAEnC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,0BAA0B;IAChC,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;QACD;YACE,IAAI,EAAE,YAAY;YAClB,SAAS,EAAE,eAAe;YAC1B,aAAa,EAAE,WAAW;YAC1B,OAAO,EAAE,4BAAa,CAAC,mBAAS,CAAC,MAAM,CAAC;SACzC;KACF;IACD,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,YAAY,EAAE;gBACZ,KAAK,EAAE,oEAAoE;gBAC3E,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC7C,IAAI,QAAQ,CAAC,YAAY,GAAG,CAAC,IAAI,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC5E,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;aAClE;iBAAM;gBACL,OAAO,IAAI,CAAA;aACZ;QACH,CAAC;KACF;IAED,OAAO,EAAE;QACP,UAAU,EAAV,oBAAU;QACV,YAAY,EAAZ,sBAAY;QACZ,SAAS,EAAT,mBAAS;KACV;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,10 @@
1
+ export interface Payload {
2
+ url: string;
3
+ vwoUuid: string;
4
+ page: {
5
+ [k: string]: unknown;
6
+ };
7
+ ip?: string;
8
+ userAgent: string;
9
+ timestamp: 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/vwo/pageVisit/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { 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,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utility_1 = require("../utility");
4
+ const action = {
5
+ title: 'Page Visit',
6
+ description: 'Sends page visit information to VWO',
7
+ fields: {
8
+ url: {
9
+ description: 'The URL of the page',
10
+ label: 'Page URL',
11
+ required: true,
12
+ type: 'string',
13
+ default: {
14
+ '@path': '$.context.page.url'
15
+ }
16
+ },
17
+ vwoUuid: {
18
+ description: 'VWO UUID',
19
+ label: 'VWO UUID',
20
+ required: true,
21
+ type: 'string',
22
+ default: {
23
+ '@path': '$.properties.vwo_uuid'
24
+ }
25
+ },
26
+ page: {
27
+ description: 'Page Context',
28
+ label: 'Page',
29
+ required: true,
30
+ type: 'object',
31
+ default: {
32
+ '@path': '$.context.page'
33
+ }
34
+ },
35
+ ip: {
36
+ description: 'IP Address',
37
+ label: 'IP Address',
38
+ required: false,
39
+ type: 'string',
40
+ default: {
41
+ '@path': '$.context.ip'
42
+ }
43
+ },
44
+ userAgent: {
45
+ description: 'User Agent',
46
+ label: 'User Agent',
47
+ required: true,
48
+ type: 'string',
49
+ default: {
50
+ '@path': '$.context.userAgent'
51
+ }
52
+ },
53
+ timestamp: {
54
+ description: 'Timestamp',
55
+ label: 'Timestamp',
56
+ required: true,
57
+ type: 'string',
58
+ default: {
59
+ '@path': '$.timestamp'
60
+ }
61
+ }
62
+ },
63
+ defaultSubscription: 'type = "page"',
64
+ perform: (request, { settings, payload }) => {
65
+ const eventName = 'vwo_pageView';
66
+ const { headers, structuredPayload } = utility_1.formatPayload(eventName, payload, false);
67
+ structuredPayload.d.event.props['url'] = payload.url;
68
+ const endpoint = `https://dev.visualwebsiteoptimizer.com/events/t?en=${eventName}&a=${settings.vwoAccountId}`;
69
+ return request(endpoint, {
70
+ method: 'POST',
71
+ json: structuredPayload,
72
+ headers
73
+ });
74
+ }
75
+ };
76
+ exports.default = action;
77
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/vwo/pageVisit/index.ts"],"names":[],"mappings":";;AAGA,wCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,qCAAqC;IAClD,MAAM,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E,OAAO,EAAE,KAAK,CAAC,CAAA;QAC/E,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,GAAG,CAAA;QACpD,MAAM,QAAQ,GAAG,sDAAsD,SAAS,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAA;QAC7G,OAAO,OAAO,CAAC,QAAQ,EAAE;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,iBAAiB;YACvB,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,13 @@
1
+ export interface Payload {
2
+ name: string;
3
+ properties?: {
4
+ [k: string]: unknown;
5
+ };
6
+ vwoUuid: string;
7
+ page: {
8
+ [k: string]: unknown;
9
+ };
10
+ ip?: string;
11
+ userAgent: string;
12
+ timestamp: string;
13
+ }
@@ -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/vwo/trackEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { 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,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utility_1 = require("../utility");
4
+ const action = {
5
+ title: 'Track Event',
6
+ description: 'Sends track events to VWO',
7
+ defaultSubscription: 'type = "track"',
8
+ fields: {
9
+ name: {
10
+ description: 'The name of the event.',
11
+ label: 'Name',
12
+ required: true,
13
+ type: 'string',
14
+ default: {
15
+ '@path': '$.event'
16
+ }
17
+ },
18
+ properties: {
19
+ description: 'A JSON object containing additional properties that will be associated with the event.',
20
+ label: 'Properties',
21
+ required: false,
22
+ type: 'object',
23
+ default: {
24
+ '@path': '$.properties'
25
+ }
26
+ },
27
+ vwoUuid: {
28
+ description: 'VWO UUID',
29
+ label: 'VWO UUID',
30
+ required: true,
31
+ type: 'string',
32
+ default: {
33
+ '@path': '$.properties.vwo_uuid'
34
+ }
35
+ },
36
+ page: {
37
+ description: 'Page Context',
38
+ label: 'Page',
39
+ required: true,
40
+ type: 'object',
41
+ default: {
42
+ '@path': '$.context.page'
43
+ }
44
+ },
45
+ ip: {
46
+ description: 'IP Address',
47
+ label: 'IP Address',
48
+ required: false,
49
+ type: 'string',
50
+ default: {
51
+ '@path': '$.context.ip'
52
+ }
53
+ },
54
+ userAgent: {
55
+ description: 'User Agent',
56
+ label: 'User Agent',
57
+ required: true,
58
+ type: 'string',
59
+ default: {
60
+ '@path': '$.context.userAgent'
61
+ }
62
+ },
63
+ timestamp: {
64
+ description: 'Timestamp',
65
+ label: 'Timestamp',
66
+ required: true,
67
+ type: 'string',
68
+ default: {
69
+ '@path': '$.timestamp'
70
+ }
71
+ }
72
+ },
73
+ perform: (request, { settings, payload }) => {
74
+ const sanitisedEventName = utility_1.sanitiseEventName(payload.name);
75
+ const { headers, structuredPayload } = utility_1.formatPayload(sanitisedEventName, payload, true, true);
76
+ structuredPayload.d.event.props.vwoMeta['ogName'] = payload.name;
77
+ const endpoint = `https://dev.visualwebsiteoptimizer.com/events/t?en=${sanitisedEventName}&a=${settings.vwoAccountId}`;
78
+ return request(endpoint, {
79
+ method: 'POST',
80
+ headers,
81
+ json: structuredPayload
82
+ });
83
+ }
84
+ };
85
+ exports.default = action;
86
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/vwo/trackEvent/index.ts"],"names":[],"mappings":";;AAGA,wCAA6D;AAE7D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,2BAA2B;IACxC,m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AAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,MAAM,kBAAkB,GAAG,2BAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QAC1D,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,GAAG,uBAAa,CAAC,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QAC7F,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAA;QAChE,MAAM,QAAQ,GAAG,sDAAsD,kBAAkB,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAA;QACtH,OAAO,OAAO,CAAC,QAAQ,EAAE;YACvB,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI,EAAE,iBAAiB;SACxB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,42 @@
1
+ export declare type vwoPayload = {
2
+ d: {
3
+ msgId: string;
4
+ visId: string;
5
+ event: {
6
+ props: {
7
+ vwo_og_event?: string;
8
+ page: {
9
+ [k: string]: unknown;
10
+ };
11
+ [k: string]: unknown;
12
+ isCustomEvent?: boolean;
13
+ vwoMeta: {
14
+ source: string;
15
+ ogName?: string;
16
+ [k: string]: unknown;
17
+ };
18
+ };
19
+ name: string;
20
+ time: number;
21
+ };
22
+ visitor?: {
23
+ [k: string]: unknown;
24
+ };
25
+ sessionId: number;
26
+ };
27
+ };
28
+ export declare type commonPayload = {
29
+ properties?: {
30
+ [k: string]: unknown;
31
+ };
32
+ attributes?: {
33
+ [k: string]: unknown;
34
+ };
35
+ vwoUuid: string;
36
+ page: {
37
+ [k: string]: unknown;
38
+ };
39
+ ip?: string;
40
+ userAgent: string;
41
+ timestamp: string;
42
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/vwo/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import type { commonPayload, vwoPayload } from './types';
2
+ export declare function formatPayload(name: string, payload: commonPayload, isCustomEvent: boolean, isTrack?: boolean): {
3
+ headers: {
4
+ [k: string]: string;
5
+ };
6
+ structuredPayload: vwoPayload;
7
+ };
8
+ export declare function sanitiseEventName(name: string): string;
9
+ export declare function formatAttributes(attributes: {
10
+ [k: string]: unknown;
11
+ } | undefined): {
12
+ [k: string]: unknown;
13
+ };
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatAttributes = exports.sanitiseEventName = exports.formatPayload = void 0;
4
+ function formatPayload(name, payload, isCustomEvent, isTrack = false) {
5
+ let formattedProperties = {};
6
+ const vwoUuid = payload.vwoUuid;
7
+ if (isTrack) {
8
+ formattedProperties = { ...payload.properties };
9
+ delete formattedProperties['vwo_uuid'];
10
+ }
11
+ const epochTime = new Date(payload.timestamp).valueOf();
12
+ const time = Math.floor(epochTime);
13
+ const sessionId = Math.floor(epochTime / 1000);
14
+ const page = {
15
+ ...payload.page,
16
+ referrerUrl: payload.page['referrer']
17
+ };
18
+ const structuredPayload = {
19
+ d: {
20
+ msgId: `${vwoUuid}-${sessionId}`,
21
+ visId: vwoUuid,
22
+ event: {
23
+ props: {
24
+ ...formattedProperties,
25
+ page,
26
+ isCustomEvent,
27
+ vwoMeta: {
28
+ source: 'segment.cloud',
29
+ metric: {}
30
+ }
31
+ },
32
+ name,
33
+ time
34
+ },
35
+ sessionId
36
+ }
37
+ };
38
+ const headers = {
39
+ 'User-Agent': payload.userAgent
40
+ };
41
+ if (payload.ip) {
42
+ headers['X-Forwarded-For'] = payload.ip;
43
+ }
44
+ return { headers, structuredPayload };
45
+ }
46
+ exports.formatPayload = formatPayload;
47
+ function sanitiseEventName(name) {
48
+ return 'segment_' + name;
49
+ }
50
+ exports.sanitiseEventName = sanitiseEventName;
51
+ function formatAttributes(attributes) {
52
+ const formattedAttributes = {};
53
+ for (const key in attributes) {
54
+ formattedAttributes[`segment_${key}`] = attributes[key];
55
+ }
56
+ return formattedAttributes;
57
+ }
58
+ exports.formatAttributes = formatAttributes;
59
+ //# sourceMappingURL=utility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utility.js","sourceRoot":"","sources":["../../../src/destinations/vwo/utility.ts"],"names":[],"mappings":";;;AAEA,SAAgB,aAAa,CAAC,IAAY,EAAE,OAAsB,EAAE,aAAsB,EAAE,OAAO,GAAG,KAAK;IACzG,IAAI,mBAAmB,GAA6B,EAAE,CAAA;IACtD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;IAC/B,IAAI,OAAO,EAAE;QACX,mBAAmB,GAAG,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAA;QAC/C,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAA;KACvC;IACD,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAA;IACvD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAClC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;IAC9C,MAAM,IAAI,GAAG;QACX,GAAG,OAAO,CAAC,IAAI;QACf,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC;KACtC,CAAA;IACD,MAAM,iBAAiB,GAAe;QACpC,CAAC,EAAE;YACD,KAAK,EAAE,GAAG,OAAO,IAAI,SAAS,EAAE;YAChC,KAAK,EAAE,OAAO;YACd,KAAK,EAAE;gBACL,KAAK,EAAE;oBACL,GAAG,mBAAmB;oBACtB,IAAI;oBACJ,aAAa;oBACb,OAAO,EAAE;wBACP,MAAM,EAAE,eAAe;wBACvB,MAAM,EAAE,EAAE;qBACX;iBACF;gBACD,IAAI;gBACJ,IAAI;aACL;YACD,SAAS;SACV;KACF,CAAA;IACD,MAAM,OAAO,GAA4B;QACvC,YAAY,EAAE,OAAO,CAAC,SAAS;KAChC,CAAA;IAED,IAAI,OAAO,CAAC,EAAE,EAAE;QACd,OAAO,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,EAAE,CAAA;KACxC;IACD,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAA;AACvC,CAAC;AA1CD,sCA0CC;AAED,SAAgB,iBAAiB,CAAC,IAAY;IAC5C,OAAO,UAAU,GAAG,IAAI,CAAA;AAC1B,CAAC;AAFD,8CAEC;AAED,SAAgB,gBAAgB,CAAC,UAAgD;IAC/E,MAAM,mBAAmB,GAA6B,EAAE,CAAA;IACxD,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;QAC5B,mBAAmB,CAAC,WAAW,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAA;KACxD;IACD,OAAO,mBAAmB,CAAA;AAC5B,CAAC;AAND,4CAMC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@segment/action-destinations",
3
3
  "description": "Destination Actions engine and definitions.",
4
- "version": "3.123.0",
4
+ "version": "3.125.1-ga4-cloud.11+f36abe28",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/segmentio/action-destinations",
@@ -38,8 +38,8 @@
38
38
  "dependencies": {
39
39
  "@amplitude/ua-parser-js": "^0.7.25",
40
40
  "@segment/a1-notation": "^2.1.4",
41
- "@segment/actions-core": "^3.47.0",
42
- "@segment/actions-shared": "^1.29.0",
41
+ "@segment/actions-core": "^3.48.0",
42
+ "@segment/actions-shared": "^1.30.0",
43
43
  "cheerio": "^1.0.0-rc.10",
44
44
  "dayjs": "^1.10.7",
45
45
  "escape-goat": "^3",
@@ -65,5 +65,5 @@
65
65
  "lcov"
66
66
  ]
67
67
  },
68
- "gitHead": "1da6d04d1c90d7020bf7af1ec6cdb3560e0a7672"
68
+ "gitHead": "f36abe28235ca3137a92b5e4b519e852f61bf707"
69
69
  }