@segment/action-destinations 3.31.0 → 3.31.1-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.
Files changed (50) hide show
  1. package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +45 -135
  2. package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
  3. package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +1 -1
  4. package/dist/destinations/google-analytics-4/addToCart/index.js +38 -125
  5. package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
  6. package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +1 -1
  7. package/dist/destinations/google-analytics-4/addToWishlist/index.js +38 -123
  8. package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
  9. package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +1 -1
  10. package/dist/destinations/google-analytics-4/beginCheckout/index.js +42 -136
  11. package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
  12. package/dist/destinations/google-analytics-4/customEvent/index.js +2 -13
  13. package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
  14. package/dist/destinations/google-analytics-4/ga4-properties.d.ts +15 -0
  15. package/dist/destinations/google-analytics-4/ga4-properties.js +194 -0
  16. package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -0
  17. package/dist/destinations/google-analytics-4/generateLead/index.js +4 -23
  18. package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
  19. package/dist/destinations/google-analytics-4/login/index.js +2 -13
  20. package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
  21. package/dist/destinations/google-analytics-4/pageView/index.js +2 -13
  22. package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
  23. package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +1 -1
  24. package/dist/destinations/google-analytics-4/purchase/index.js +45 -169
  25. package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
  26. package/dist/destinations/google-analytics-4/refund/index.js +45 -147
  27. package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
  28. package/dist/destinations/google-analytics-4/removeFromCart/index.js +38 -123
  29. package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
  30. package/dist/destinations/google-analytics-4/search/index.js +2 -13
  31. package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
  32. package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +1 -1
  33. package/dist/destinations/google-analytics-4/selectItem/index.js +37 -113
  34. package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
  35. package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +4 -4
  36. package/dist/destinations/google-analytics-4/selectPromotion/index.js +47 -145
  37. package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
  38. package/dist/destinations/google-analytics-4/signUp/index.js +2 -13
  39. package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
  40. package/dist/destinations/google-analytics-4/viewCart/index.js +41 -123
  41. package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
  42. package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +1 -1
  43. package/dist/destinations/google-analytics-4/viewItem/index.js +38 -128
  44. package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
  45. package/dist/destinations/google-analytics-4/viewItemList/index.js +39 -113
  46. package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
  47. package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +4 -4
  48. package/dist/destinations/google-analytics-4/viewPromotion/index.js +47 -154
  49. package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
  50. package/package.json +3 -3
@@ -2,149 +2,59 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const actions_core_1 = require("@segment/actions-core");
4
4
  const constants_1 = require("../constants");
5
+ const ga4_properties_1 = require("../ga4-properties");
5
6
  const action = {
6
7
  title: 'Add Payment Info',
7
8
  description: 'Send event when a user submits their payment information',
8
9
  defaultSubscription: 'type = "track" and event = "Payment Info Entered"',
9
10
  fields: {
10
- client_id: {
11
- label: 'Client ID',
12
- description: 'Uniquely identifies a user instance of a web client.',
13
- type: 'string',
14
- required: true,
15
- default: {
16
- '@if': {
17
- exists: { '@path': '$.userId' },
18
- then: { '@path': '$.userId' },
19
- else: { '@path': '$.anonymousId' }
20
- }
21
- }
22
- },
23
- currency: {
24
- label: 'Currency',
25
- type: 'string',
26
- description: 'Currency of the items associated with the event, in 3-letter ISO 4217 format.'
27
- },
28
- value: {
29
- label: 'Value',
30
- type: 'string',
31
- description: 'The monetary value of the event.'
32
- },
33
- coupon: {
34
- label: 'Coupon',
35
- type: 'string',
36
- description: 'Coupon code used for a purchase.'
37
- },
38
- payment_type: {
39
- label: 'Payment Type',
40
- type: 'string',
41
- description: 'The chosen method of payment.',
42
- default: {
43
- '@path': '$.properties.payment_method'
44
- }
45
- },
11
+ client_id: { ...ga4_properties_1.client_id, required: true },
12
+ currency: { ...ga4_properties_1.currency },
13
+ value: { ...ga4_properties_1.value, type: 'string' },
14
+ coupon: { ...ga4_properties_1.coupon },
15
+ payment_type: { ...ga4_properties_1.payment_type },
46
16
  items: {
47
- label: 'Products',
48
- description: 'The list of products purchased.',
49
- type: 'object',
50
- multiple: true,
17
+ ...ga4_properties_1.items,
51
18
  required: true,
52
19
  properties: {
53
- item_id: {
54
- label: 'Product ID',
55
- type: 'string',
56
- description: 'Identifier for the product being purchased.'
57
- },
58
- item_name: {
59
- label: 'Name',
60
- type: 'string',
61
- description: 'Name of the product being purchased.'
62
- },
63
- affiliation: {
64
- label: 'Affiliation',
65
- type: 'string',
66
- description: 'A product affiliation to designate a supplying company or brick and mortar store location.'
67
- },
68
- coupon: {
69
- label: 'Coupon',
70
- type: 'string',
71
- description: 'Coupon code used for a purchase.'
72
- },
73
- currency: {
74
- label: 'Currency',
75
- type: 'string',
76
- description: 'Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.'
77
- },
78
- discount: {
79
- label: 'Discount',
80
- type: 'number',
81
- description: 'Monetary value of discount associated with a purchase.'
82
- },
83
- index: {
84
- label: 'Index',
85
- type: 'number',
86
- description: 'The index/position of the item in a list.'
87
- },
88
- item_brand: {
89
- label: 'Brand',
90
- type: 'string',
91
- description: 'Brand associated with the product.'
92
- },
93
- item_category: {
94
- label: 'Category',
95
- type: 'string',
96
- description: 'Product category.'
97
- },
98
- item_category2: {
99
- label: 'Category 2',
100
- type: 'string',
101
- description: 'Product category 2.'
102
- },
103
- item_category3: {
104
- label: 'Category 3',
105
- type: 'string',
106
- description: 'Product category 3.'
107
- },
108
- item_category4: {
109
- label: 'Category 4',
110
- type: 'string',
111
- description: 'Product category 4.'
112
- },
113
- item_category5: {
114
- label: 'Category 5',
115
- type: 'string',
116
- description: 'Product category 5.'
117
- },
118
- item_list_id: {
119
- label: 'Item List ID',
120
- type: 'string',
121
- description: 'The ID of the list in which the item was presented to the user.'
122
- },
123
- item_list_name: {
124
- label: 'Item List Name',
125
- type: 'string',
126
- description: 'The name of the list in which the item was presented to the user.'
127
- },
128
- item_variant: {
129
- label: 'Variant',
130
- type: 'string',
131
- description: 'Variant of the product (e.g. Black).'
132
- },
133
- location_id: {
134
- label: 'Location ID',
135
- type: 'string',
136
- description: 'The location associated with the item.'
137
- },
138
- price: {
139
- label: 'Price',
140
- type: 'number',
141
- description: 'Price of the product being purchased, in units of the specified currency parameter.'
142
- },
143
- quantity: {
144
- label: 'Quantity',
145
- type: 'integer',
146
- description: 'Item quantity.'
147
- }
20
+ ...ga4_properties_1.items.properties
21
+ },
22
+ default: {
23
+ '@arrayPath': [
24
+ '$.properties.products',
25
+ {
26
+ item_id: {
27
+ '@path': '$.product_id'
28
+ },
29
+ item_name: {
30
+ '@path': '$.name'
31
+ },
32
+ affiliation: {
33
+ '@path': '$.affiliation'
34
+ },
35
+ coupon: {
36
+ '@path': '$.coupon'
37
+ },
38
+ index: {
39
+ '@path': '$.position'
40
+ },
41
+ item_brand: {
42
+ '@path': '$.brand'
43
+ },
44
+ item_category: {
45
+ '@path': '$.category'
46
+ },
47
+ item_variant: {
48
+ '@path': '$.variant'
49
+ },
50
+ price: {
51
+ '@path': '$.price'
52
+ },
53
+ quantity: {
54
+ '@path': '$.quantity'
55
+ }
56
+ }
57
+ ]
148
58
  }
149
59
  }
150
60
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addPaymentInfo/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AAKjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,0DAA0D;IACvE,mBAAmB,EAAE,mDAAmD;IACxE,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,sDAAsD;YACnE,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,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,+EAA+E;SAC7F;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,kCAAkC;SAChD;QACD,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,kCAAkC;SAChD;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,+BAA+B;YAC5C,OAAO,EAAE;gBACP,OAAO,EAAE,6BAA6B;aACvC;SACF;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B,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,KAAK,EAAE,WAAW;yBACnB;qBACF;iBACF;aACF;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;AAC1E,4CAAiD;AAIjD,sDAA2F;AAE3F,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,QAAQ,EAAE,IAAI,EAAE;QAC3C,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QACzB,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE,IAAI,EAAE,QAAQ,EAAE;QACnC,MAAM,EAAE,EAAE,GAAG,uBAAM,EAAE;QACrB,YAAY,EAAE,EAAE,GAAG,6BAAY,EAAE;QACjC,KAAK,EAAE;YACL,GAAG,sBAAK;YACR,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE;gBACV,GAAG,sBAAK,CAAC,UAAU;aACpB;YACD,OAAO,EAAE;gBACP,YAAY,EAAE;oBACZ,uBAAuB;oBACvB;wBACE,OAAO,EAAE;4BACP,OAAO,EAAE,cAAc;yBACxB;wBACD,SAAS,EAAE;4BACT,OAAO,EAAE,QAAQ;yBAClB;wBACD,WAAW,EAAE;4BACX,OAAO,EAAE,eAAe;yBACzB;wBACD,MAAM,EAAE;4BACN,OAAO,EAAE,UAAU;yBACpB;wBACD,KAAK,EAAE;4BACL,OAAO,EAAE,YAAY;yBACtB;wBACD,UAAU,EAAE;4BACV,OAAO,EAAE,SAAS;yBACnB;wBACD,aAAa,EAAE;4BACb,OAAO,EAAE,YAAY;yBACtB;wBACD,YAAY,EAAE;4BACZ,OAAO,E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C,EAAE;oBACtE,MAAM,IAAI,+BAAgB,CAAC,GAAG,OAAO,CAAC,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;iBAC/G;gBAED,OAAO,OAAsB,CAAA;YAC/B,CAAC,CAAC,CAAA;SACH;QAED,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,kBAAkB;wBACxB,MAAM,EAAE;4BACN,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;4BACpB,MAAM,EAAE,OAAO,CAAC,MAAM;4BACtB,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,KAAK,EAAE,WAAW;yBACnB;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,7 +1,7 @@
1
1
  export interface Payload {
2
2
  client_id: string;
3
3
  currency?: string;
4
- items?: {
4
+ items: {
5
5
  item_id?: string;
6
6
  item_name?: string;
7
7
  affiliation?: string;
@@ -2,140 +2,53 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const actions_core_1 = require("@segment/actions-core");
4
4
  const constants_1 = require("../constants");
5
+ const ga4_properties_1 = require("../ga4-properties");
5
6
  const action = {
6
7
  title: 'Add to Cart',
7
8
  description: 'Send event when a user adds items to a cart',
8
9
  defaultSubscription: 'type = "track" and event = "Product Added"',
9
10
  fields: {
10
- client_id: {
11
- label: 'Client ID',
12
- description: 'Uniquely identifies a user instance of a web client.',
13
- type: 'string',
11
+ client_id: { ...ga4_properties_1.client_id, required: true },
12
+ currency: { ...ga4_properties_1.currency },
13
+ items: {
14
+ ...ga4_properties_1.items,
14
15
  required: true,
15
16
  default: {
16
- '@if': {
17
- exists: { '@path': '$.userId' },
18
- then: { '@path': '$.userId' },
19
- else: { '@path': '$.anonymousId' }
20
- }
21
- }
22
- },
23
- currency: {
24
- label: 'Currency',
25
- type: 'string',
26
- description: 'Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.'
27
- },
28
- items: {
29
- label: 'Products',
30
- description: 'The list of products in the event.',
31
- type: 'object',
32
- multiple: true,
33
- properties: {
34
- item_id: {
35
- label: 'Product ID',
36
- type: 'string',
37
- description: 'Identifier for the product being purchased.'
38
- },
39
- item_name: {
40
- label: 'Name',
41
- type: 'string',
42
- description: 'Name of the product being purchased.'
43
- },
44
- affiliation: {
45
- label: 'Affiliation',
46
- type: 'string',
47
- description: 'A product affiliation to designate a supplying company or brick and mortar store location.'
48
- },
49
- coupon: {
50
- label: 'Coupon',
51
- type: 'string',
52
- description: 'Coupon code used for a purchase.'
53
- },
54
- currency: {
55
- label: 'Currency',
56
- type: 'string',
57
- description: 'Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.'
58
- },
59
- discount: {
60
- label: 'Discount',
61
- type: 'number',
62
- description: 'Monetary value of discount associated with a purchase.'
63
- },
64
- index: {
65
- label: 'Index',
66
- type: 'number',
67
- description: 'The index of the item in a list.'
68
- },
69
- item_brand: {
70
- label: 'Brand',
71
- type: 'string',
72
- description: 'Brand associated with the product.'
73
- },
74
- item_category: {
75
- label: 'Category',
76
- type: 'string',
77
- description: 'Category of the product.'
78
- },
79
- item_category2: {
80
- label: 'Category2',
81
- type: 'string',
82
- description: 'The second category of the product.'
83
- },
84
- item_category3: {
85
- label: 'Category3',
86
- type: 'string',
87
- description: 'The third category of the product.'
88
- },
89
- item_category4: {
90
- label: 'Category4',
91
- type: 'string',
92
- description: 'The fourth category of the product.'
93
- },
94
- item_category5: {
95
- label: 'Category5',
96
- type: 'string',
97
- description: 'The fifth category of the product.'
98
- },
99
- item_list_id: {
100
- label: 'Item List Name',
101
- type: 'string',
102
- description: 'The ID of the list in which the item was presented to the user.'
103
- },
104
- item_list_name: {
105
- label: 'Item List Name',
106
- type: 'string',
107
- description: 'The name of the list in which the item was presented to the user.'
108
- },
109
- item_variant: {
110
- label: 'Variant',
111
- type: 'string',
112
- description: 'Variant of the product (e.g. Black).'
113
- },
114
- location_id: {
115
- label: 'Location ID',
116
- type: 'string',
117
- description: 'The location associated with the item.'
118
- },
119
- price: {
120
- label: 'Price',
121
- type: 'number',
122
- description: 'Price of the product being purchased, in units of the specified currency parameter.'
123
- },
124
- quantity: {
125
- label: 'Quantity',
126
- type: 'integer',
127
- description: 'Item quantity.'
128
- }
17
+ '@arrayPath': [
18
+ '$.properties',
19
+ {
20
+ item_id: {
21
+ '@path': '$.product_id'
22
+ },
23
+ item_name: {
24
+ '@path': '$.name'
25
+ },
26
+ affiliation: {
27
+ '@path': '$.affiliation'
28
+ },
29
+ coupon: {
30
+ '@path': '$.coupon'
31
+ },
32
+ item_brand: {
33
+ '@path': '$.brand'
34
+ },
35
+ item_category: {
36
+ '@path': '$.category'
37
+ },
38
+ item_variant: {
39
+ '@path': '$.variant'
40
+ },
41
+ price: {
42
+ '@path': '$.price'
43
+ },
44
+ quantity: {
45
+ '@path': '$.quantity'
46
+ }
47
+ }
48
+ ]
129
49
  }
130
50
  },
131
- value: {
132
- label: 'Value',
133
- type: 'number',
134
- description: 'The monetary value of the event, in units of the specified currency parameter.',
135
- default: {
136
- '@path': '$.properties.value'
137
- }
138
- }
51
+ value: { ...ga4_properties_1.value, default: { '@path': '$.properties.value' } }
139
52
  },
140
53
  perform: (request, { payload }) => {
141
54
  let googleItems = [];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,4CAAiD;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,6CAA6C;IAC1D,mBAAmB,EAAE,4CAA4C;IACjE,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAA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index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,4CAAiD;AACjD,sDAAqE;AAErE,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,QAAQ,EAAE,IAAI,EAAE;QAC3C,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QACzB,KAAK,EAAE;YACL,GAAG,sBAAK;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,YAAY,EAAE;oBACZ,cAAc;oBACd;wBACE,OAAO,EAAE;4BACP,OAAO,EAAE,cAAc;yBACxB;wBACD,SAAS,EAAE;4BACT,OAAO,EAAE,QAAQ;yBAClB;wBACD,WAAW,EAAE;4BACX,OAAO,EAAE,eAAe;yBACzB;wBACD,MAAM,EAAE;4BACN,OAAO,EAAE,UAAU;yBACpB;wBACD,UAAU,EAAE;4BACV,OAAO,EAAE,SAAS;yBACnB;wBACD,aAAa,EAAE;4BACb,OAAO,EAAE,YAAY;yBACtB;wBACD,YAAY,EAAE;4BACZ,OAAO,EAAE,WAAW;yBACrB;wBACD,KAAK,EAAE;4BACL,OAAO,EAAE,SAAS;yBACnB;wBACD,QAAQ,EAAE;4BACR,OAAO,EAAE,YAAY;yBACtB;qBACF;iBACF;aACF;SACF;QACD,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAAE;KAChE;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,IAAI,WAAW,GAAkB,EAAE,CAAA;QAEnC,IAAI,OAAO,CAAC,KAAK,EAAE;YACjB,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC1C,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;oBACpE,MAAM,IAAI,+BAAgB,CACxB,+EAA+E,EAC/E,8BAA8B,EAC9B,GAAG,CACJ,CAAA;iBACF;gBAED,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,8BAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBACtE,MAAM,IAAI,+BAAgB,CAAC,GAAG,OAAO,CAAC,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;iBAC/G;gBAED,OAAO,OAAsB,CAAA;YAC/B,CAAC,CAAC,CAAA;SACH;QAED,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,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;yBACrB;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,7 +1,7 @@
1
1
  export interface Payload {
2
2
  client_id: string;
3
3
  currency?: string;
4
- value?: string;
4
+ value?: number;
5
5
  items: {
6
6
  item_id?: string;
7
7
  item_name?: string;
@@ -2,136 +2,51 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const actions_core_1 = require("@segment/actions-core");
4
4
  const constants_1 = require("../constants");
5
+ const ga4_properties_1 = require("../ga4-properties");
5
6
  const action = {
6
7
  title: 'Add to Wishlist',
7
8
  description: 'Send event when a user adds items to a wishlist',
8
9
  defaultSubscription: 'type = "track" and event = "Product Added to Wishlist"',
9
10
  fields: {
10
- client_id: {
11
- label: 'Client ID',
12
- description: 'Uniquely identifies a user instance of a web client.',
13
- type: 'string',
14
- required: true,
15
- default: {
16
- '@if': {
17
- exists: { '@path': '$.userId' },
18
- then: { '@path': '$.userId' },
19
- else: { '@path': '$.anonymousId' }
20
- }
21
- }
22
- },
23
- currency: {
24
- label: 'Currency',
25
- type: 'string',
26
- description: 'Currency of the items associated with the event, in 3-letter ISO 4217 format.'
27
- },
28
- value: {
29
- label: 'Value',
30
- type: 'string',
31
- description: 'The monetary value of the event.'
32
- },
11
+ client_id: { ...ga4_properties_1.client_id, required: true },
12
+ currency: { ...ga4_properties_1.currency },
13
+ value: { ...ga4_properties_1.value },
33
14
  items: {
34
- label: 'Products',
35
- description: 'The list of products purchased.',
36
- type: 'object',
37
- multiple: true,
15
+ ...ga4_properties_1.items,
38
16
  required: true,
39
- properties: {
40
- item_id: {
41
- label: 'Product ID',
42
- type: 'string',
43
- description: 'Identifier for the product being purchased.'
44
- },
45
- item_name: {
46
- label: 'Name',
47
- type: 'string',
48
- description: 'Name of the product being purchased.'
49
- },
50
- affiliation: {
51
- label: 'Affiliation',
52
- type: 'string',
53
- description: 'A product affiliation to designate a supplying company or brick and mortar store location.'
54
- },
55
- coupon: {
56
- label: 'Coupon',
57
- type: 'string',
58
- description: 'Coupon code used for a purchase.'
59
- },
60
- currency: {
61
- label: 'Currency',
62
- type: 'string',
63
- description: 'Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.'
64
- },
65
- discount: {
66
- label: 'Discount',
67
- type: 'number',
68
- description: 'Monetary value of discount associated with a purchase.'
69
- },
70
- index: {
71
- label: 'Index',
72
- type: 'number',
73
- description: 'The index/position of the item in a list.'
74
- },
75
- item_brand: {
76
- label: 'Brand',
77
- type: 'string',
78
- description: 'Brand associated with the product.'
79
- },
80
- item_category: {
81
- label: 'Category',
82
- type: 'string',
83
- description: 'Product category.'
84
- },
85
- item_category2: {
86
- label: 'Category 2',
87
- type: 'string',
88
- description: 'Product category 2.'
89
- },
90
- item_category3: {
91
- label: 'Category 3',
92
- type: 'string',
93
- description: 'Product category 3.'
94
- },
95
- item_category4: {
96
- label: 'Category 4',
97
- type: 'string',
98
- description: 'Product category 4.'
99
- },
100
- item_category5: {
101
- label: 'Category 5',
102
- type: 'string',
103
- description: 'Product category 5.'
104
- },
105
- item_list_id: {
106
- label: 'Item List ID',
107
- type: 'string',
108
- description: 'The ID of the list in which the item was presented to the user.'
109
- },
110
- item_list_name: {
111
- label: 'Item List Name',
112
- type: 'string',
113
- description: 'The name of the list in which the item was presented to the user.'
114
- },
115
- item_variant: {
116
- label: 'Variant',
117
- type: 'string',
118
- description: 'Variant of the product (e.g. Black).'
119
- },
120
- location_id: {
121
- label: 'Location ID',
122
- type: 'string',
123
- description: 'The location associated with the item.'
124
- },
125
- price: {
126
- label: 'Price',
127
- type: 'number',
128
- description: 'Price of the product being purchased, in units of the specified currency parameter.'
129
- },
130
- quantity: {
131
- label: 'Quantity',
132
- type: 'integer',
133
- description: 'Item quantity.'
134
- }
17
+ default: {
18
+ '@arrayPath': [
19
+ '$.properties',
20
+ {
21
+ item_id: {
22
+ '@path': '$.product_id'
23
+ },
24
+ item_name: {
25
+ '@path': '$.name'
26
+ },
27
+ affiliation: {
28
+ '@path': '$.affiliation'
29
+ },
30
+ coupon: {
31
+ '@path': '$.coupon'
32
+ },
33
+ item_brand: {
34
+ '@path': '$.brand'
35
+ },
36
+ item_category: {
37
+ '@path': '$.category'
38
+ },
39
+ item_variant: {
40
+ '@path': '$.variant'
41
+ },
42
+ price: {
43
+ '@path': '$.price'
44
+ },
45
+ quantity: {
46
+ '@path': '$.quantity'
47
+ }
48
+ }
49
+ ]
135
50
  }
136
51
  }
137
52
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToWishlist/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AAKjD,MAAM,MAAM,GAAwC;IAClD,K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B,GAAG,CACJ,CAAA;iBACF;gBAED,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,8BAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBACtE,MAAM,IAAI,+BAAgB,CAAC,GAAG,OAAO,CAAC,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;iBAC/G;gBAED,OAAO,OAAsB,CAAA;YAC/B,CAAC,CAAC,CAAA;SACH;QAED,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,iBAAiB;wBACvB,MAAM,EAAE;4BACN,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;4BACpB,KAAK,EAAE,WAAW;yBACnB;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToWishlist/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AAIjD,sDAAqE;AAErE,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,QAAQ,EAAE,IAAI,EAAE;QAC3C,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QACzB,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE;QACnB,KAAK,EAAE;YACL,GAAG,sBAAK;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,YAAY,EAAE;oBACZ,cAAc;oBACd;wBACE,OAAO,EAAE;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,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC1C,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;oBACpE,MAAM,IAAI,+BAAgB,CACxB,+EAA+E,EAC/E,8BAA8B,EAC9B,GAAG,CACJ,CAAA;iBACF;gBAED,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,8BAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBACtE,MAAM,IAAI,+BAAgB,CAAC,GAAG,OAAO,CAAC,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;iBAC/G;gBAED,OAAO,OAAsB,CAAA;YAC/B,CAAC,CAAC,CAAA;SACH;QAED,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,iBAAiB;wBACvB,MAAM,EAAE;4BACN,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;4BACpB,KAAK,EAAE,WAAW;yBACnB;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -2,7 +2,7 @@ export interface Payload {
2
2
  client_id: string;
3
3
  coupon?: string;
4
4
  currency?: string;
5
- items?: {
5
+ items: {
6
6
  item_id?: string;
7
7
  item_name?: string;
8
8
  affiliation?: string;