@segment/action-destinations 3.32.0 → 3.33.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 (51) hide show
  1. package/dist/destinations/google-analytics-4/addPaymentInfo/generated-types.d.ts +1 -1
  2. package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +8 -138
  3. package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
  4. package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +1 -1
  5. package/dist/destinations/google-analytics-4/addToCart/index.js +6 -127
  6. package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
  7. package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +1 -1
  8. package/dist/destinations/google-analytics-4/addToWishlist/index.js +6 -125
  9. package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
  10. package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +1 -1
  11. package/dist/destinations/google-analytics-4/beginCheckout/index.js +7 -138
  12. package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
  13. package/dist/destinations/google-analytics-4/customEvent/index.js +6 -14
  14. package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
  15. package/dist/destinations/google-analytics-4/ga4-properties.d.ts +17 -0
  16. package/dist/destinations/google-analytics-4/ga4-properties.js +276 -0
  17. package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -0
  18. package/dist/destinations/google-analytics-4/generateLead/index.js +4 -23
  19. package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
  20. package/dist/destinations/google-analytics-4/login/index.js +2 -13
  21. package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
  22. package/dist/destinations/google-analytics-4/pageView/index.js +2 -13
  23. package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
  24. package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +1 -1
  25. package/dist/destinations/google-analytics-4/purchase/index.js +11 -172
  26. package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
  27. package/dist/destinations/google-analytics-4/refund/index.js +9 -148
  28. package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
  29. package/dist/destinations/google-analytics-4/removeFromCart/index.js +6 -125
  30. package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
  31. package/dist/destinations/google-analytics-4/search/index.js +2 -13
  32. package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
  33. package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +1 -1
  34. package/dist/destinations/google-analytics-4/selectItem/index.js +4 -114
  35. package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
  36. package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +4 -4
  37. package/dist/destinations/google-analytics-4/selectPromotion/index.js +13 -145
  38. package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
  39. package/dist/destinations/google-analytics-4/signUp/index.js +2 -13
  40. package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
  41. package/dist/destinations/google-analytics-4/viewCart/index.js +6 -125
  42. package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
  43. package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +1 -1
  44. package/dist/destinations/google-analytics-4/viewItem/index.js +6 -130
  45. package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
  46. package/dist/destinations/google-analytics-4/viewItemList/index.js +4 -115
  47. package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
  48. package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +4 -4
  49. package/dist/destinations/google-analytics-4/viewPromotion/index.js +13 -154
  50. package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
  51. package/package.json +2 -2
@@ -2,24 +2,13 @@
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: 'Select Item',
7
8
  description: 'Send event when a user selects an item from a list',
8
9
  defaultSubscription: 'type = "track" and event = "Product Clicked"',
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
- },
11
+ client_id: { ...ga4_properties_1.client_id },
23
12
  item_list_name: {
24
13
  label: 'Item List Name',
25
14
  description: 'The name of the list in which the item was presented to the user.',
@@ -31,107 +20,8 @@ const action = {
31
20
  type: 'string'
32
21
  },
33
22
  items: {
34
- label: 'Products',
35
- description: 'The list of products in the event.',
36
- type: 'object',
37
- multiple: true,
38
- properties: {
39
- item_id: {
40
- label: 'Product ID',
41
- type: 'string',
42
- description: 'Identifier for the product being purchased.'
43
- },
44
- item_name: {
45
- label: 'Name',
46
- type: 'string',
47
- description: 'Name of the product being purchased.'
48
- },
49
- affiliation: {
50
- label: 'Affiliation',
51
- type: 'string',
52
- description: 'A product affiliation to designate a supplying company or brick and mortar store location.'
53
- },
54
- coupon: {
55
- label: 'Coupon',
56
- type: 'string',
57
- description: 'Coupon code used for a purchase.'
58
- },
59
- currency: {
60
- label: 'Currency',
61
- type: 'string',
62
- description: 'Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.'
63
- },
64
- discount: {
65
- label: 'Discount',
66
- type: 'number',
67
- description: 'Monetary value of discount associated with a purchase.'
68
- },
69
- index: {
70
- label: 'Index',
71
- type: 'number',
72
- description: 'The index of the item in a list.'
73
- },
74
- item_brand: {
75
- label: 'Brand',
76
- type: 'string',
77
- description: 'Brand associated with the product.'
78
- },
79
- item_category: {
80
- label: 'Category',
81
- type: 'string',
82
- description: 'Category of the product.'
83
- },
84
- item_category2: {
85
- label: 'Category2',
86
- type: 'string',
87
- description: 'The second category of the product.'
88
- },
89
- item_category3: {
90
- label: 'Category3',
91
- type: 'string',
92
- description: 'The third category of the product.'
93
- },
94
- item_category4: {
95
- label: 'Category4',
96
- type: 'string',
97
- description: 'The fourth category of the product.'
98
- },
99
- item_category5: {
100
- label: 'Category5',
101
- type: 'string',
102
- description: 'The fifth category of the product.'
103
- },
104
- item_list_id: {
105
- label: 'Item List Name',
106
- type: 'string',
107
- description: 'The ID of the list in which the item was presented to the user.'
108
- },
109
- item_list_name: {
110
- label: 'Item List Name',
111
- type: 'string',
112
- description: 'The name of the list in which the item was presented to the user.'
113
- },
114
- item_variant: {
115
- label: 'Variant',
116
- type: 'string',
117
- description: 'Variant of the product (e.g. Black).'
118
- },
119
- location_id: {
120
- label: 'Location ID',
121
- type: 'string',
122
- description: 'The location associated with the item.'
123
- },
124
- price: {
125
- label: 'Price',
126
- type: 'number',
127
- description: 'Price of the product being purchased, in units of the specified currency parameter.'
128
- },
129
- quantity: {
130
- label: 'Quantity',
131
- type: 'integer',
132
- description: 'Item quantity.'
133
- }
134
- }
23
+ ...ga4_properties_1.items_single_products,
24
+ required: true
135
25
  }
136
26
  },
137
27
  perform: (request, { payload }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/selectItem/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AAKjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,oDAAoD;IACjE,mBAAmB,EAAE,8CAA8C;IACnE,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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O,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,KAAK,EAAE,WAAW;4BAClB,cAAc,EAAE,OAAO,CAAC,cAAc;4BACtC,YAAY,EAAE,OAAO,CAAC,YAAY;yBACnC;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/selectItem/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AAIjD,sDAAoE;AAEpE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,oDAAoD;IACjE,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,cAAc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;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -11,8 +11,6 @@ export interface Payload {
11
11
  affiliation?: string;
12
12
  coupon?: string;
13
13
  currency?: string;
14
- creative_name?: string;
15
- creative_slot?: string;
16
14
  discount?: number;
17
15
  index?: number;
18
16
  item_brand?: string;
@@ -26,8 +24,10 @@ export interface Payload {
26
24
  item_variant?: string;
27
25
  location_id?: string;
28
26
  price?: number;
29
- promotion_id?: string;
30
- promotion_name?: string;
31
27
  quantity?: number;
28
+ creative_name?: string;
29
+ creative_slot?: string;
30
+ promotion_name?: string;
31
+ promotion_id?: string;
32
32
  }[];
33
33
  }
@@ -2,169 +2,37 @@
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: 'Select Promotion',
7
8
  description: 'Send event when a user selects a promotion',
8
9
  defaultSubscription: 'type = "track" and event = "Promotion Clicked"',
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
- creative_name: {
24
- label: 'Creative Name',
25
- type: 'string',
26
- description: 'The name of the promotional creative.'
27
- },
28
- creative_slot: {
29
- label: 'Creative Slot',
30
- type: 'string',
31
- description: 'The name of the promotional creative slot associated with the event.'
32
- },
11
+ client_id: { ...ga4_properties_1.client_id },
12
+ creative_name: { ...ga4_properties_1.creative_name },
13
+ creative_slot: { ...ga4_properties_1.creative_slot, default: { '@path': '$.properties.creative' } },
33
14
  location_id: {
34
15
  label: 'Location ID',
35
16
  type: 'string',
36
17
  description: 'The ID of the location.'
37
18
  },
38
- promotion_id: {
39
- label: 'Promotion ID',
40
- type: 'string',
41
- description: 'The ID of the promotion associated with the event.'
42
- },
43
- promotion_name: {
44
- label: 'Promotion Name',
45
- type: 'string',
46
- description: 'The name of the promotion associated with the event.'
47
- },
19
+ promotion_id: { ...ga4_properties_1.promotion_id, default: { '@path': '$.properties.promotion_id' } },
20
+ promotion_name: { ...ga4_properties_1.promotion_name, default: { '@path': '$.properties.name' } },
48
21
  items: {
49
- label: 'Products',
50
- description: 'The list of products in the event.',
51
- type: 'object',
52
- multiple: true,
22
+ ...ga4_properties_1.items_single_products,
53
23
  properties: {
54
- item_id: {
55
- label: 'Product ID',
56
- type: 'string',
57
- description: 'Identifier for the product being purchased.'
58
- },
59
- item_name: {
60
- label: 'Name',
61
- type: 'string',
62
- description: 'Name of the product being purchased.'
63
- },
64
- affiliation: {
65
- label: 'Affiliation',
66
- type: 'string',
67
- description: 'A product affiliation to designate a supplying company or brick and mortar store location.'
68
- },
69
- coupon: {
70
- label: 'Coupon',
71
- type: 'string',
72
- description: 'Coupon code used for a purchase.'
73
- },
74
- currency: {
75
- label: 'Currency',
76
- type: 'string',
77
- description: 'Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.'
78
- },
24
+ ...ga4_properties_1.minimal_items.properties,
79
25
  creative_name: {
80
- label: 'Creative Name',
81
- type: 'string',
82
- description: 'The name of the promotional creative.'
26
+ ...ga4_properties_1.creative_name
83
27
  },
84
28
  creative_slot: {
85
- label: 'Creative Slot',
86
- type: 'string',
87
- description: 'The name of the promotional creative slot associated with the item.'
88
- },
89
- discount: {
90
- label: 'Discount',
91
- type: 'number',
92
- description: 'Monetary value of discount associated with a purchase.'
93
- },
94
- index: {
95
- label: 'Index',
96
- type: 'number',
97
- description: 'The index of the item in a list.'
98
- },
99
- item_brand: {
100
- label: 'Brand',
101
- type: 'string',
102
- description: 'Brand associated with the product.'
103
- },
104
- item_category: {
105
- label: 'Category',
106
- type: 'string',
107
- description: 'Category of the product.'
108
- },
109
- item_category2: {
110
- label: 'Category2',
111
- type: 'string',
112
- description: 'The second category of the product.'
113
- },
114
- item_category3: {
115
- label: 'Category3',
116
- type: 'string',
117
- description: 'The third category of the product.'
118
- },
119
- item_category4: {
120
- label: 'Category4',
121
- type: 'string',
122
- description: 'The fourth category of the product.'
123
- },
124
- item_category5: {
125
- label: 'Category5',
126
- type: 'string',
127
- description: 'The fifth category of the product.'
128
- },
129
- item_list_id: {
130
- label: 'Item List Name',
131
- type: 'string',
132
- description: 'The ID of the list in which the item was presented to the user.'
133
- },
134
- item_list_name: {
135
- label: 'Item List Name',
136
- type: 'string',
137
- description: 'The name of the list in which the item was presented to the user.'
138
- },
139
- item_variant: {
140
- label: 'Variant',
141
- type: 'string',
142
- description: 'Variant of the product (e.g. Black).'
143
- },
144
- location_id: {
145
- label: 'Location ID',
146
- type: 'string',
147
- description: 'The location associated with the item.'
148
- },
149
- price: {
150
- label: 'Price',
151
- type: 'number',
152
- description: 'Price of the product being purchased, in units of the specified currency parameter.'
153
- },
154
- promotion_id: {
155
- label: 'Promotion ID',
156
- type: 'string',
157
- description: 'The ID of the promotion associated with the item.'
29
+ ...ga4_properties_1.creative_slot
158
30
  },
159
31
  promotion_name: {
160
- label: 'Promotion Name',
161
- type: 'string',
162
- description: 'The name of the promotion associated with the item.'
32
+ ...ga4_properties_1.promotion_name
163
33
  },
164
- quantity: {
165
- label: 'Quantity',
166
- type: 'integer',
167
- description: 'Item quantity.'
34
+ promotion_id: {
35
+ ...ga4_properties_1.promotion_id
168
36
  }
169
37
  }
170
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/selectPromotion/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AAKjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,4CAA4C;IACzD,mBAAmB,EAAE,gDAAgD;IACrE,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,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,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,IAAI,OAAO,CAAC,YAAY,KAAK,SAAS,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,EAAE;oBAC9E,MAAM,IAAI,+BAAgB,CACxB,oDAAoD,EACpD,8BAA8B,EAC9B,GAAG,CACJ,CAAA;iBACF;gBAED,OAAO,OAA+B,CAAA;YACxC,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,aAAa,EAAE,OAAO,CAAC,aAAa;4BACpC,aAAa,EAAE,OAAO,CAAC,aAAa;4BACpC,WAAW,EAAE,OAAO,CAAC,WAAW;4BAChC,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,cAAc,EAAE,OAAO,CAAC,cAAc;4BACtC,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/selectPromotion/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AACjD,sDAQ0B;AAK1B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,4CAA4C;IACzD,mBAAmB,EAAE,gDAAgD;IACrE,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,aAAa,EAAE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C,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;iBAC/G;gBAED,IAAI,OAAO,CAAC,YAAY,KAAK,SAAS,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,EAAE;oBAC9E,MAAM,IAAI,+BAAgB,CACxB,oDAAoD,EACpD,8BAA8B,EAC9B,GAAG,CACJ,CAAA;iBACF;gBAED,OAAO,OAA+B,CAAA;YACxC,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,aAAa,EAAE,OAAO,CAAC,aAAa;4BACpC,aAAa,EAAE,OAAO,CAAC,aAAa;4BACpC,WAAW,EAAE,OAAO,CAAC,WAAW;4BAChC,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,cAAc,EAAE,OAAO,CAAC,cAAc;4BACtC,KAAK,EAAE,WAAW;yBACnB;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,23 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const ga4_properties_1 = require("../ga4-properties");
3
4
  const action = {
4
5
  title: 'Sign Up',
5
6
  description: 'Send event when a user signs up to measure the popularity of each sign-up method',
6
7
  defaultSubscription: 'type = "track" and event = "Signed Up"',
7
8
  fields: {
8
- client_id: {
9
- label: 'Client ID',
10
- description: 'Uniquely identifies a user instance of a web client.',
11
- type: 'string',
12
- required: true,
13
- default: {
14
- '@if': {
15
- exists: { '@path': '$.userId' },
16
- then: { '@path': '$.userId' },
17
- else: { '@path': '$.anonymousId' }
18
- }
19
- }
20
- },
9
+ client_id: { ...ga4_properties_1.client_id },
21
10
  method: {
22
11
  label: 'Method',
23
12
  description: 'The method used for sign up.',
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/signUp/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,kFAAkF;IAC/F,mBAAmB,EAAE,wCAAwC;IAC7D,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,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,8BAA8B;YAC3C,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,mBAAmB;aAC7B;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,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,SAAS;wBACf,MAAM,EAAE;4BACN,MAAM,EAAE,OAAO,CAAC,MAAM;yBACvB;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/signUp/index.ts"],"names":[],"mappings":";;AAGA,sDAA6C;AAE7C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,kFAAkF;IAC/F,mBAAmB,EAAE,wCAAwC;IAC7D,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,8BAA8B;YAC3C,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,mBAAmB;aAC7B;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,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,SAAS;wBACf,MAAM,EAAE;4BACN,MAAM,EAAE,OAAO,CAAC,MAAM;yBACvB;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -2,137 +2,18 @@
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: 'View Cart',
7
8
  description: 'Send event when a user views their cart',
8
9
  defaultSubscription: 'type = "track" and event = "Cart Viewed"',
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 purchase or items associated with the event, in 3-letter ISO 4217 format.'
27
- },
28
- value: {
29
- label: 'Value',
30
- type: 'number',
31
- description: 'The monetary value of the event.'
32
- },
11
+ client_id: { ...ga4_properties_1.client_id },
12
+ currency: { ...ga4_properties_1.currency },
13
+ value: { ...ga4_properties_1.value },
33
14
  items: {
34
- label: 'Products',
35
- description: 'The items for the event',
36
- type: 'object',
37
- multiple: true,
38
- 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
- }
135
- }
15
+ ...ga4_properties_1.items_multi_products,
16
+ required: true
136
17
  }
137
18
  },
138
19
  perform: (request, { payload }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/viewCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AAKjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,yCAAyC;IACtD,mBAAmB,EAAE,0CAA0C;IAC/D,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,2FAA2F;SACzG;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,kCAAkC;SAChD;QACD,KAAK,EAAE;YACL,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,QA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AC,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,WAAW;wBACjB,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
  currency?: string;
4
4
  value?: number;
5
- items?: {
5
+ items: {
6
6
  item_id?: string;
7
7
  item_name?: string;
8
8
  affiliation?: string;