@adobe/magento-storefront-events-sdk 1.1.2 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +194 -1109
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +4 -1
- package/dist/types/ContextManager.d.ts +9 -117
- package/dist/types/contexts.d.ts +3 -0
- package/dist/types/types/contexts.d.ts +7 -4
- package/dist/types/types/schemas/dataServicesExtension.d.ts +3 -0
- package/dist/types/types/schemas/index.d.ts +3 -0
- package/dist/types/types/schemas/recommendationsExtension.d.ts +3 -0
- package/dist/types/types/schemas/searchExtension.d.ts +3 -0
- package/dist/types/types/schemas/shoppingCart.d.ts +1 -0
- package/package.json +2 -8
package/README.md
CHANGED
|
@@ -9,7 +9,16 @@
|
|
|
9
9
|
|
|
10
10
|
## Overview
|
|
11
11
|
|
|
12
|
-
This package serves as the foundation for eventing on
|
|
12
|
+
This package serves as the foundation for eventing on an [Adobe Commerce][magento] storefront. It provides access to a common data layer, and an event publishing and subscription service.
|
|
13
|
+
|
|
14
|
+
You can handle the events in a custom implementation, or use the [Magento Storefront Event Collector][collector] package that listens for events and sends them to Adobe Commerce edges for processing.
|
|
15
|
+
|
|
16
|
+
**Note:** When an event is published through the SDK, all subscribers to that event get notified. Defining a custom listener shouldn't preclude you from also running the Magento Storefront Event Collector.
|
|
17
|
+
|
|
18
|
+
Our context schemas are designed to simplify forwarding to two edges:
|
|
19
|
+
|
|
20
|
+
- Adobe Commerce Data Services (maintained by Adobe Engineering and used to power merchant performance dashboards)
|
|
21
|
+
- [Adobe Experience Platform](https://business.adobe.com/products/experience-platform/adobe-experience-platform.html) (requires a subscription and additional merchant [setup](https://experienceleague.adobe.com/docs/experience-platform/edge/fundamentals/datastreams.html?lang=en); data can be used by merchants inside the Adobe Experience Platform for detailed analytics, targeted merchandising, real time customer data profiles, and more)
|
|
13
22
|
|
|
14
23
|
## Installation
|
|
15
24
|
|
|
@@ -42,18 +51,38 @@ Below is a code example of how to get started.
|
|
|
42
51
|
|
|
43
52
|
```javascript
|
|
44
53
|
import mse from "@adobe/magento-storefront-events-sdk";
|
|
45
|
-
|
|
54
|
+
// handler - can go in a different module
|
|
55
|
+
function addToCartHandler(event) {
|
|
56
|
+
// do something with the event
|
|
57
|
+
}
|
|
46
58
|
// subscribe to events
|
|
47
|
-
mse.subscribe.
|
|
59
|
+
mse.subscribe.addToCart(addToCartHandler);
|
|
48
60
|
|
|
49
61
|
// set context data
|
|
50
|
-
|
|
62
|
+
const shoppingCartContext = {
|
|
63
|
+
id: "1",
|
|
64
|
+
items: [
|
|
65
|
+
{
|
|
66
|
+
id: "shoppingCart",
|
|
67
|
+
product: {
|
|
68
|
+
productId: 111111,
|
|
69
|
+
sku: "ts001",
|
|
70
|
+
pricing: {
|
|
71
|
+
regularPrice: 20.0,
|
|
72
|
+
currencyCode: "USD",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
quantity: 1,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
mse.context.setShoppingCart(shoppingCartContext);
|
|
51
80
|
|
|
52
81
|
// publish events
|
|
53
|
-
mse.publish.
|
|
82
|
+
mse.publish.addToCart();
|
|
54
83
|
|
|
55
84
|
// unsubscribe from events
|
|
56
|
-
mse.unsubscribe.
|
|
85
|
+
mse.unsubscribe.addToCart(addToCartHandler);
|
|
57
86
|
```
|
|
58
87
|
|
|
59
88
|
## API Reference
|
|
@@ -62,1378 +91,434 @@ The SDK API is broken down into four major parts: [Context][context], [Publish][
|
|
|
62
91
|
|
|
63
92
|
### Context
|
|
64
93
|
|
|
65
|
-
These
|
|
66
|
-
|
|
67
|
-
#### `mse.context.getAEP`
|
|
68
|
-
|
|
69
|
-
Gets the `AEP` ([Adobe Experience Platform](https://business.adobe.com/products/experience-platform/adobe-experience-platform.html)) context.
|
|
70
|
-
|
|
71
|
-
```javascript
|
|
72
|
-
mse.context.getAEP();
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
#### `mse.context.getCategory`
|
|
76
|
-
|
|
77
|
-
Gets the `Category` context.
|
|
78
|
-
|
|
79
|
-
```javascript
|
|
80
|
-
mse.context.getCategory();
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
#### `mse.context.getCustomUrl`
|
|
84
|
-
|
|
85
|
-
Gets the `CustomUrl` context.
|
|
86
|
-
|
|
87
|
-
```javascript
|
|
88
|
-
mse.context.getCustomUrl();
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
#### `mse.context.getEventForwarding`
|
|
92
|
-
|
|
93
|
-
Gets the `EventForwarding` context.
|
|
94
|
-
|
|
95
|
-
```javascript
|
|
96
|
-
mse.context.getEventForwarding();
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
#### `mse.context.getMagentoExtension`
|
|
100
|
-
|
|
101
|
-
Gets the `MagentoExtension` context.
|
|
102
|
-
|
|
103
|
-
```javascript
|
|
104
|
-
mse.context.getMagentoExtension();
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
#### `mse.context.getOrder`
|
|
108
|
-
|
|
109
|
-
Gets the `Order` context.
|
|
110
|
-
|
|
111
|
-
```javascript
|
|
112
|
-
mse.context.getOrder();
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
#### `mse.context.getPage`
|
|
116
|
-
|
|
117
|
-
Gets the `Page` context.
|
|
118
|
-
|
|
119
|
-
```javascript
|
|
120
|
-
mse.context.getPage();
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
#### `mse.context.getProduct`
|
|
124
|
-
|
|
125
|
-
Gets the `Product` context.
|
|
126
|
-
|
|
127
|
-
```javascript
|
|
128
|
-
mse.context.getProduct();
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
#### `mse.context.getRecommendations`
|
|
132
|
-
|
|
133
|
-
Gets the `Recommendations` context.
|
|
134
|
-
|
|
135
|
-
```javascript
|
|
136
|
-
mse.context.getRecommendations();
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
#### `mse.context.getReferrerUrl`
|
|
140
|
-
|
|
141
|
-
Gets the `ReferrerUrl` context.
|
|
142
|
-
|
|
143
|
-
```javascript
|
|
144
|
-
mse.context.getReferrerUrl();
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
#### `mse.context.getSearchInput`
|
|
94
|
+
These setters can be used to specify context in the `mse`:
|
|
148
95
|
|
|
149
|
-
|
|
96
|
+
#### `setAEP`
|
|
150
97
|
|
|
151
98
|
```javascript
|
|
152
|
-
mse.context.
|
|
99
|
+
mse.context.setAEP(aepCtx);
|
|
153
100
|
```
|
|
154
101
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
Gets the `SearchResults` context.
|
|
158
|
-
|
|
159
|
-
```javascript
|
|
160
|
-
mse.context.getSearchResults();
|
|
161
|
-
```
|
|
102
|
+
Sets the `AEP` which can be used by event handlers to forward events to the Adobe Experience Platform. A client must have an AEP subscription and provide a valid [IMS Org Id and Datastream Id](https://experienceleague.adobe.com/docs/experience-platform/edge/fundamentals/datastreams.html?lang=en).
|
|
162
103
|
|
|
163
|
-
|
|
104
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/aep.ts)
|
|
105
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L25)
|
|
164
106
|
|
|
165
|
-
|
|
107
|
+
#### `setCategory`
|
|
166
108
|
|
|
167
109
|
```javascript
|
|
168
|
-
mse.context.
|
|
110
|
+
mse.context.setCategory(categoryCtx);
|
|
169
111
|
```
|
|
170
112
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
Gets the `ShoppingCart` context.
|
|
174
|
-
|
|
175
|
-
```javascript
|
|
176
|
-
mse.context.getShoppingCart();
|
|
177
|
-
```
|
|
113
|
+
Sets the `Category` context.
|
|
178
114
|
|
|
179
|
-
|
|
115
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/category.ts)
|
|
116
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L31)
|
|
180
117
|
|
|
181
|
-
|
|
118
|
+
#### `setCustomUrl`
|
|
182
119
|
|
|
183
120
|
```javascript
|
|
184
|
-
mse.context.
|
|
121
|
+
mse.context.setCustomUrl(customUrlCtx);
|
|
185
122
|
```
|
|
186
123
|
|
|
187
|
-
|
|
124
|
+
Sets the `CustomUrl` context.
|
|
188
125
|
|
|
189
|
-
|
|
126
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/customUrl.ts)
|
|
127
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L40)
|
|
190
128
|
|
|
191
|
-
|
|
192
|
-
| ------ | :------: | ------------- |
|
|
193
|
-
| `name` | Yes | Context name. |
|
|
129
|
+
#### `setEventForwarding`
|
|
194
130
|
|
|
195
131
|
```javascript
|
|
196
|
-
mse.context.
|
|
132
|
+
mse.context.setEventForwarding(eventForwardingCtx);
|
|
197
133
|
```
|
|
198
134
|
|
|
199
|
-
|
|
135
|
+
Sets the `EventForwarding` context. Tells a handler if it should forward events to Adobe Commerce DataSolutions (`snowplow: true`), Adobe Experience Platform (`aep: true`), or both.
|
|
200
136
|
|
|
201
|
-
|
|
137
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/eventForwarding.ts)
|
|
138
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L47)
|
|
202
139
|
|
|
203
|
-
|
|
204
|
-
| --------- | :------: | -------------- |
|
|
205
|
-
| `context` | Yes | `AEP` context. |
|
|
140
|
+
#### `setMagentoExtension` @deprecated
|
|
206
141
|
|
|
207
142
|
```javascript
|
|
208
|
-
mse.context.
|
|
143
|
+
mse.context.setMagentoExtension(magentoExtensionCtx);
|
|
209
144
|
```
|
|
210
145
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
Sets the `Category` context.
|
|
214
|
-
|
|
215
|
-
| Name | Required | Description |
|
|
216
|
-
| --------- | :------: | ------------------- |
|
|
217
|
-
| `context` | Yes | `Category` context. |
|
|
218
|
-
|
|
219
|
-
```javascript
|
|
220
|
-
mse.context.setCategory(categoryCtx);
|
|
221
|
-
```
|
|
146
|
+
Sets the `MagentoExtension` context. Includes Data Services extension version.
|
|
222
147
|
|
|
223
|
-
|
|
148
|
+
This field is deprecated. `setDataServicesExtension` should be used instead.
|
|
224
149
|
|
|
225
|
-
|
|
150
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/magentoExtension.ts)
|
|
151
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L55)
|
|
226
152
|
|
|
227
|
-
|
|
228
|
-
| --------- | :------: | -------------------- |
|
|
229
|
-
| `context` | Yes | `CustomUrl` context. |
|
|
153
|
+
#### `setDataServicesExtension`
|
|
230
154
|
|
|
231
155
|
```javascript
|
|
232
|
-
mse.context.
|
|
156
|
+
mse.context.setDataServicesExtension(dataServicesExtensionCtx);
|
|
233
157
|
```
|
|
234
158
|
|
|
235
|
-
|
|
159
|
+
Sets the `DataServicesExtension` context. Includes Data Services extension version.
|
|
236
160
|
|
|
237
|
-
|
|
161
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/dataServicesExtension.ts)
|
|
238
162
|
|
|
239
|
-
|
|
240
|
-
| --------- | :------: | -------------------------- |
|
|
241
|
-
| `context` | Yes | `EventForwarding` context. |
|
|
163
|
+
#### `setOrder`
|
|
242
164
|
|
|
243
165
|
```javascript
|
|
244
|
-
mse.context.
|
|
166
|
+
mse.context.setOrder(orderCtx);
|
|
245
167
|
```
|
|
246
168
|
|
|
247
|
-
|
|
169
|
+
Sets the `Order` context.
|
|
248
170
|
|
|
249
|
-
|
|
171
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/order.ts)
|
|
172
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L62)
|
|
250
173
|
|
|
251
|
-
|
|
252
|
-
| --------- | :------: | --------------------------- |
|
|
253
|
-
| `context` | Yes | `MagentoExtension` context. |
|
|
174
|
+
#### `setPage`
|
|
254
175
|
|
|
255
176
|
```javascript
|
|
256
|
-
mse.context.
|
|
177
|
+
mse.context.setPage(pageCtx);
|
|
257
178
|
```
|
|
258
179
|
|
|
259
|
-
|
|
180
|
+
Sets the `Page` context.
|
|
260
181
|
|
|
261
|
-
|
|
182
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/page.ts)
|
|
183
|
+
- [context example](<(https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L76)>)
|
|
262
184
|
|
|
263
|
-
|
|
264
|
-
| --------- | :------: | ---------------- |
|
|
265
|
-
| `context` | Yes | `Order` context. |
|
|
185
|
+
#### `setProduct`
|
|
266
186
|
|
|
267
187
|
```javascript
|
|
268
|
-
mse.context.
|
|
188
|
+
mse.context.setProduct(productCtx);
|
|
269
189
|
```
|
|
270
190
|
|
|
271
|
-
|
|
191
|
+
Sets the `Product` context.
|
|
272
192
|
|
|
273
|
-
|
|
193
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/product.ts)
|
|
194
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L88)
|
|
274
195
|
|
|
275
|
-
|
|
276
|
-
| --------- | :------: | --------------- |
|
|
277
|
-
| `context` | Yes | `Page` context. |
|
|
196
|
+
#### `setRecommendations`
|
|
278
197
|
|
|
279
198
|
```javascript
|
|
280
|
-
mse.context.
|
|
199
|
+
mse.context.setRecommendations(recommendationsCtx);
|
|
281
200
|
```
|
|
282
201
|
|
|
283
|
-
|
|
202
|
+
Sets the `Recommendations` context.
|
|
284
203
|
|
|
285
|
-
|
|
204
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/recommendations.ts)
|
|
205
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L105)
|
|
286
206
|
|
|
287
|
-
|
|
288
|
-
| --------- | :------: | ------------------ |
|
|
289
|
-
| `context` | Yes | `Product` context. |
|
|
207
|
+
#### `setRecommendationsExtension`
|
|
290
208
|
|
|
291
209
|
```javascript
|
|
292
|
-
mse.context.
|
|
210
|
+
mse.context.setRecommendationsExtension(recommendationsExtensionCtx);
|
|
293
211
|
```
|
|
294
212
|
|
|
295
|
-
|
|
213
|
+
Sets the `RecommendationsExtension` context. Includes Recommendations extension version.
|
|
296
214
|
|
|
297
|
-
|
|
215
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/recommendationsExtension.ts)
|
|
298
216
|
|
|
299
|
-
|
|
300
|
-
| --------- | :------: | -------------------------- |
|
|
301
|
-
| `context` | Yes | `Recommendations` context. |
|
|
217
|
+
#### `setReferrerUrl`
|
|
302
218
|
|
|
303
219
|
```javascript
|
|
304
|
-
mse.context.
|
|
220
|
+
mse.context.setReferrerUrl(referrerUrlCtx);
|
|
305
221
|
```
|
|
306
222
|
|
|
307
|
-
#### `mse.context.setReferrerUrl`
|
|
308
|
-
|
|
309
223
|
Sets the `ReferrerUrl` context.
|
|
310
224
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
225
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/referrerUrl.ts)
|
|
226
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L230)
|
|
227
|
+
|
|
228
|
+
#### `setSearchExtension`
|
|
314
229
|
|
|
315
230
|
```javascript
|
|
316
|
-
mse.context.
|
|
231
|
+
mse.context.setSearchExtension(searchExtensionCtx);
|
|
317
232
|
```
|
|
318
233
|
|
|
319
|
-
|
|
234
|
+
Sets the `SearchExtension` context. Includes Live Search extension version.
|
|
320
235
|
|
|
321
|
-
|
|
236
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/searchExtension.ts)
|
|
322
237
|
|
|
323
|
-
|
|
324
|
-
| --------- | :------: | ---------------------- |
|
|
325
|
-
| `context` | Yes | `SearchInput` context. |
|
|
238
|
+
#### `setSearchInput`
|
|
326
239
|
|
|
327
240
|
```javascript
|
|
328
241
|
mse.context.setSearchInput(searchInputCtx);
|
|
329
242
|
```
|
|
330
243
|
|
|
331
|
-
|
|
244
|
+
Sets the `SearchInput` context.
|
|
332
245
|
|
|
333
|
-
|
|
246
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/searchInput.ts)
|
|
247
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L237)
|
|
334
248
|
|
|
335
|
-
|
|
336
|
-
| --------- | :------: | ------------------------ |
|
|
337
|
-
| `context` | Yes | `SearchResults` context. |
|
|
249
|
+
#### `setSearchResults`
|
|
338
250
|
|
|
339
251
|
```javascript
|
|
340
252
|
mse.context.setSearchResults(searchResultsCtx);
|
|
341
253
|
```
|
|
342
254
|
|
|
343
|
-
|
|
255
|
+
Sets the `SearchResults` context.
|
|
344
256
|
|
|
345
|
-
|
|
257
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/searchResults.ts)
|
|
258
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L255)
|
|
346
259
|
|
|
347
|
-
|
|
348
|
-
| --------- | :------: | ------------------ |
|
|
349
|
-
| `context` | Yes | `Shopper` context. |
|
|
260
|
+
#### `setShopper`
|
|
350
261
|
|
|
351
262
|
```javascript
|
|
352
263
|
mse.context.setShopper(shopperCtx);
|
|
353
264
|
```
|
|
354
265
|
|
|
355
|
-
|
|
266
|
+
Sets the `Shopper` context.
|
|
356
267
|
|
|
357
|
-
|
|
268
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/shopper.ts)
|
|
269
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L294)
|
|
358
270
|
|
|
359
|
-
|
|
360
|
-
| --------- | :------: | ----------------------- |
|
|
361
|
-
| `context` | Yes | `ShoppingCart` context. |
|
|
271
|
+
#### `setShoppingCart`
|
|
362
272
|
|
|
363
273
|
```javascript
|
|
364
274
|
mse.context.setShoppingCart(shoppingCartCtx);
|
|
365
275
|
```
|
|
366
276
|
|
|
367
|
-
|
|
277
|
+
Sets the `ShoppingCart` context.
|
|
368
278
|
|
|
369
|
-
|
|
279
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/shoppingCart.ts)
|
|
280
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L298)
|
|
370
281
|
|
|
371
|
-
|
|
372
|
-
| --------- | :------: | ----------------------------- |
|
|
373
|
-
| `context` | Yes | `StorefrontInstance` context. |
|
|
282
|
+
#### `setStorefrontInstance`
|
|
374
283
|
|
|
375
284
|
```javascript
|
|
376
285
|
mse.context.setStorefrontInstance(storefrontCtx);
|
|
377
286
|
```
|
|
378
287
|
|
|
379
|
-
|
|
288
|
+
Sets the `StorefrontInstance` context. This context is used when forwarding data to Adobe Commerce Data Services to identify the Adobe Commerce instance associated with the data.
|
|
380
289
|
|
|
381
|
-
|
|
290
|
+
- [context schema definition](https://github.com/adobe/magento-storefront-events-sdk/blob/main/src/types/schemas/storefrontInstance.ts)
|
|
291
|
+
- [context example](https://github.com/adobe/magento-storefront-events-sdk/blob/main/tests/mocks.ts#L345)
|
|
382
292
|
|
|
383
|
-
|
|
384
|
-
| --------- | :------: | --------------- |
|
|
385
|
-
| `name` | Yes | Context name. |
|
|
386
|
-
| `context` | Yes | Custom context. |
|
|
293
|
+
#### `setContext`
|
|
387
294
|
|
|
388
295
|
```javascript
|
|
389
|
-
mse.context.setContext(ctx);
|
|
296
|
+
mse.context.setContext(name, ctx);
|
|
390
297
|
```
|
|
391
298
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
These functions publish events which notify all of the subscribers.
|
|
395
|
-
|
|
396
|
-
#### `mse.publish.addToCart`
|
|
397
|
-
|
|
398
|
-
Publishes the `addToCart` event.
|
|
299
|
+
Sets a custom `Context`.
|
|
399
300
|
|
|
400
|
-
|
|
401
|
-
| --------- | :------: | --------------- |
|
|
402
|
-
| `context` | No | Custom context. |
|
|
301
|
+
These getters are available for accessing context data:
|
|
403
302
|
|
|
404
303
|
```javascript
|
|
405
|
-
mse.
|
|
304
|
+
mse.context.getAEP();
|
|
305
|
+
mse.context.getCategory();
|
|
306
|
+
mse.context.getContext(name);
|
|
307
|
+
mse.context.getCustomUrl();
|
|
308
|
+
mse.context.getEventForwarding();
|
|
309
|
+
mse.context.getMagentoExtension();
|
|
310
|
+
mse.context.getDataServicesExtension();
|
|
311
|
+
mse.context.getOrder();
|
|
312
|
+
mse.context.getPage();
|
|
313
|
+
mse.context.getProduct();
|
|
314
|
+
mse.context.getRecommendations();
|
|
315
|
+
mse.context.getReferrerUrl();
|
|
316
|
+
mse.context.getProduct();
|
|
317
|
+
mse.context.getRecommendations();
|
|
318
|
+
mse.context.getRecommendationsExtension();
|
|
319
|
+
mse.context.getSearchExtension();
|
|
320
|
+
mse.context.getSearchInput();
|
|
321
|
+
mse.context.getSearchResults();
|
|
322
|
+
mse.context.getShopper();
|
|
323
|
+
mse.context.getShoppingCart();
|
|
406
324
|
```
|
|
407
325
|
|
|
408
|
-
|
|
326
|
+
### Publish
|
|
409
327
|
|
|
410
|
-
|
|
328
|
+
These functions publish events which notify all subscribers:
|
|
411
329
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
330
|
+
```javascript
|
|
331
|
+
// requires shoppingCart ctx to be set
|
|
332
|
+
mse.publish.addToCart();
|
|
333
|
+
```
|
|
415
334
|
|
|
416
335
|
```javascript
|
|
417
336
|
mse.publish.customUrl(ctx);
|
|
418
337
|
```
|
|
419
338
|
|
|
420
|
-
#### `mse.publish.initiateCheckout`
|
|
421
|
-
|
|
422
|
-
Publishes the `initiateCheckout` event.
|
|
423
|
-
|
|
424
|
-
| Name | Required | Description |
|
|
425
|
-
| --------- | :------: | --------------- |
|
|
426
|
-
| `context` | No | Custom context. |
|
|
427
|
-
|
|
428
339
|
```javascript
|
|
429
340
|
mse.publish.initiateCheckout(ctx);
|
|
430
341
|
```
|
|
431
342
|
|
|
432
|
-
#### `mse.publish.instantPurchase`
|
|
433
|
-
|
|
434
|
-
Publishes the `instantPurchase` event.
|
|
435
|
-
|
|
436
|
-
| Name | Required | Description |
|
|
437
|
-
| --------- | :------: | --------------- |
|
|
438
|
-
| `context` | No | Custom context. |
|
|
439
|
-
|
|
440
343
|
```javascript
|
|
344
|
+
// requires shoppingCart ctx and productCtx to be set
|
|
441
345
|
mse.publish.instantPurchase(ctx);
|
|
442
346
|
```
|
|
443
347
|
|
|
444
|
-
#### `mse.publish.pageActivitySummary`
|
|
445
|
-
|
|
446
|
-
Publishes the `pageActivitySummary` event.
|
|
447
|
-
|
|
448
|
-
| Name | Required | Description |
|
|
449
|
-
| --------- | :------: | --------------- |
|
|
450
|
-
| `context` | No | Custom context. |
|
|
451
|
-
|
|
452
348
|
```javascript
|
|
453
349
|
mse.publish.pageActivitySummary(ctx);
|
|
454
350
|
```
|
|
455
351
|
|
|
456
|
-
#### `mse.publish.pageView`
|
|
457
|
-
|
|
458
|
-
Publishes the `pageView` event.
|
|
459
|
-
|
|
460
|
-
| Name | Required | Description |
|
|
461
|
-
| --------- | :------: | --------------- |
|
|
462
|
-
| `context` | No | Custom context. |
|
|
463
|
-
|
|
464
352
|
```javascript
|
|
465
353
|
mse.publish.pageView(ctx);
|
|
466
354
|
```
|
|
467
355
|
|
|
468
|
-
#### `mse.publish.placeOrder`
|
|
469
|
-
|
|
470
|
-
Publishes the `placeOrder` event.
|
|
471
|
-
|
|
472
|
-
| Name | Required | Description |
|
|
473
|
-
| --------- | :------: | --------------- |
|
|
474
|
-
| `context` | No | Custom context. |
|
|
475
|
-
|
|
476
356
|
```javascript
|
|
357
|
+
// requires shoppingCart ctx and orderContext to be set
|
|
477
358
|
mse.publish.placeOrder(ctx);
|
|
478
359
|
```
|
|
479
360
|
|
|
480
|
-
#### `mse.publish.productPageView`
|
|
481
|
-
|
|
482
|
-
Publishes the `productPageView` event.
|
|
483
|
-
|
|
484
|
-
| Name | Required | Description |
|
|
485
|
-
| --------- | :------: | --------------- |
|
|
486
|
-
| `context` | No | Custom context. |
|
|
487
|
-
|
|
488
361
|
```javascript
|
|
362
|
+
// requires shoppingCart ctx and productCtx to be set
|
|
489
363
|
mse.publish.productPageView(ctx);
|
|
490
364
|
```
|
|
491
365
|
|
|
492
|
-
#### `mse.publish.recsItemAddToCartClick`
|
|
493
|
-
|
|
494
|
-
Publishes the `recsItemAddToCartClick` event.
|
|
495
|
-
|
|
496
|
-
| Name | Required | Description |
|
|
497
|
-
| ----------- | :------: | ------------------------ |
|
|
498
|
-
| `unitId` | Yes | Recommendations unit id. |
|
|
499
|
-
| `productId` | Yes | Recommended product id. |
|
|
500
|
-
| `context` | No | Custom context. |
|
|
501
|
-
|
|
502
366
|
```javascript
|
|
367
|
+
// requires recommendationsContext to be set
|
|
503
368
|
mse.publish.recsItemAddToCartClick(unitId, productId, ctx);
|
|
504
369
|
```
|
|
505
370
|
|
|
506
|
-
#### `mse.publish.recsItemClick`
|
|
507
|
-
|
|
508
|
-
Publishes the `recsItemClick` event.
|
|
509
|
-
|
|
510
|
-
| Name | Required | Description |
|
|
511
|
-
| ----------- | :------: | ------------------------ |
|
|
512
|
-
| `unitId` | Yes | Recommendations unit id. |
|
|
513
|
-
| `productId` | Yes | Recommended product id. |
|
|
514
|
-
| `context` | No | Custom context. |
|
|
515
|
-
|
|
516
371
|
```javascript
|
|
372
|
+
// requires recommendationsContext to be set
|
|
517
373
|
mse.publish.recsItemClick(unitId, productId, ctx);
|
|
518
374
|
```
|
|
519
375
|
|
|
520
|
-
#### `mse.publish.recsRequestSent`
|
|
521
|
-
|
|
522
|
-
Publishes the `recsRequestSent` event.
|
|
523
|
-
|
|
524
|
-
| Name | Required | Description |
|
|
525
|
-
| --------- | :------: | --------------- |
|
|
526
|
-
| `context` | No | Custom context. |
|
|
527
|
-
|
|
528
376
|
```javascript
|
|
529
377
|
mse.publish.recsRequestSent(ctx);
|
|
530
378
|
```
|
|
531
379
|
|
|
532
|
-
#### `mse.publish.recsResponseReceived`
|
|
533
|
-
|
|
534
|
-
Publishes the `recsResponseReceived` event.
|
|
535
|
-
|
|
536
|
-
| Name | Required | Description |
|
|
537
|
-
| --------- | :------: | --------------- |
|
|
538
|
-
| `context` | No | Custom context. |
|
|
539
|
-
|
|
540
380
|
```javascript
|
|
541
381
|
mse.publish.recsResponseReceived(ctx);
|
|
542
382
|
```
|
|
543
383
|
|
|
544
|
-
#### `mse.publish.recsUnitRender`
|
|
545
|
-
|
|
546
|
-
Publishes the `recsUnitRender` event.
|
|
547
|
-
|
|
548
|
-
| Name | Required | Description |
|
|
549
|
-
| --------- | :------: | ------------------------ |
|
|
550
|
-
| `unitId` | Yes | Recommendations unit id. |
|
|
551
|
-
| `context` | No | Custom context. |
|
|
552
|
-
|
|
553
384
|
```javascript
|
|
385
|
+
// requires recommendationsContext to be set
|
|
554
386
|
mse.publish.recsUnitRender(unitId, ctx);
|
|
555
387
|
```
|
|
556
388
|
|
|
557
|
-
#### `mse.publish.recsUnitView`
|
|
558
|
-
|
|
559
|
-
Publishes the `recsUnitView` event.
|
|
560
|
-
|
|
561
|
-
| Name | Required | Description |
|
|
562
|
-
| --------- | :------: | ------------------------ |
|
|
563
|
-
| `unitId` | Yes | Recommendations unit id. |
|
|
564
|
-
| `context` | No | Custom context. |
|
|
565
|
-
|
|
566
389
|
```javascript
|
|
390
|
+
// requires recommendationsContext to be set
|
|
567
391
|
mse.publish.recsUnitView(unitId, ctx);
|
|
568
392
|
```
|
|
569
393
|
|
|
570
|
-
#### `mse.publish.referrerUrl`
|
|
571
|
-
|
|
572
|
-
Publishes the `referrerUrl` event.
|
|
573
|
-
|
|
574
|
-
| Name | Required | Description |
|
|
575
|
-
| --------- | :------: | --------------- |
|
|
576
|
-
| `context` | No | Custom context. |
|
|
577
|
-
|
|
578
394
|
```javascript
|
|
579
395
|
mse.publish.referrerUrl(ctx);
|
|
580
396
|
```
|
|
581
397
|
|
|
582
|
-
#### `mse.publish.removeFromCart`
|
|
583
|
-
|
|
584
|
-
Publishes the `removeFromCart` event.
|
|
585
|
-
|
|
586
|
-
| Name | Required | Description |
|
|
587
|
-
| --------- | :------: | --------------- |
|
|
588
|
-
| `context` | No | Custom context. |
|
|
589
|
-
|
|
590
398
|
```javascript
|
|
591
399
|
mse.publish.removeFromCart(ctx);
|
|
592
400
|
```
|
|
593
401
|
|
|
594
|
-
#### `mse.publish.searchCategoryClick`
|
|
595
|
-
|
|
596
|
-
Publishes the `searchCategoryClick` event.
|
|
597
|
-
|
|
598
|
-
| Name | Required | Description |
|
|
599
|
-
| -------------- | :------: | --------------- |
|
|
600
|
-
| `searchUnitId` | Yes | Search unit id. |
|
|
601
|
-
| `name` | Yes | Category name. |
|
|
602
|
-
| `context` | No | Custom context. |
|
|
603
|
-
|
|
604
402
|
```javascript
|
|
403
|
+
// requires searchResultsContext to be set
|
|
605
404
|
mse.publish.searchCategoryClick(searchUnitId, name, ctx);
|
|
606
405
|
```
|
|
607
406
|
|
|
608
|
-
#### `mse.publish.searchProductClick`
|
|
609
|
-
|
|
610
|
-
Publishes the `searchProductClick` event.
|
|
611
|
-
|
|
612
|
-
| Name | Required | Description |
|
|
613
|
-
| -------------- | :------: | --------------- |
|
|
614
|
-
| `searchUnitId` | Yes | Search unit id. |
|
|
615
|
-
| `sku` | Yes | Product sku. |
|
|
616
|
-
| `context` | No | Custom context. |
|
|
617
|
-
|
|
618
407
|
```javascript
|
|
408
|
+
// requires searchResultsContext to be set
|
|
619
409
|
mse.publish.searchProductClick(searchUnitId, sku, ctx);
|
|
620
410
|
```
|
|
621
411
|
|
|
622
|
-
#### `mse.publish.searchRequestSent`
|
|
623
|
-
|
|
624
|
-
Publishes the `searchRequestSent` event.
|
|
625
|
-
|
|
626
|
-
| Name | Required | Description |
|
|
627
|
-
| -------------- | :------: | --------------- |
|
|
628
|
-
| `searchUnitId` | Yes | Search unit id. |
|
|
629
|
-
| `context` | No | Custom context. |
|
|
630
|
-
|
|
631
412
|
```javascript
|
|
413
|
+
// requires searchInputContext to be set
|
|
632
414
|
mse.publish.searchRequestSent(searchUnitId, ctx);
|
|
633
415
|
```
|
|
634
416
|
|
|
635
|
-
#### `mse.publish.searchResponseReceived`
|
|
636
|
-
|
|
637
|
-
Publishes the `searchResponseReceived` event.
|
|
638
|
-
|
|
639
|
-
| Name | Required | Description |
|
|
640
|
-
| -------------- | :------: | --------------- |
|
|
641
|
-
| `searchUnitId` | Yes | Search unit id. |
|
|
642
|
-
| `context` | No | Custom context. |
|
|
643
|
-
|
|
644
417
|
```javascript
|
|
418
|
+
// requires searchResultsContext to be set
|
|
645
419
|
mse.publish.searchResponseReceived(searchUnitId, ctx);
|
|
646
420
|
```
|
|
647
421
|
|
|
648
|
-
#### `mse.publish.searchResultsView`
|
|
649
|
-
|
|
650
|
-
Publishes the `searchResultsView` event.
|
|
651
|
-
|
|
652
|
-
| Name | Required | Description |
|
|
653
|
-
| -------------- | :------: | --------------- |
|
|
654
|
-
| `searchUnitId` | Yes | Search unit id. |
|
|
655
|
-
| `context` | No | Custom context. |
|
|
656
|
-
|
|
657
422
|
```javascript
|
|
423
|
+
// requires searchResultsContext to be set
|
|
658
424
|
mse.publish.searchResultsView(searchUnitId, ctx);
|
|
659
425
|
```
|
|
660
426
|
|
|
661
|
-
#### `mse.publish.searchSuggestionClick`
|
|
662
|
-
|
|
663
|
-
Publishes the `searchSuggestionClick` event.
|
|
664
|
-
|
|
665
|
-
| Name | Required | Description |
|
|
666
|
-
| -------------- | :------: | ----------------- |
|
|
667
|
-
| `searchUnitId` | Yes | Search unit id. |
|
|
668
|
-
| `suggestion` | Yes | Query suggestion. |
|
|
669
|
-
| `context` | No | Custom context. |
|
|
670
|
-
|
|
671
427
|
```javascript
|
|
428
|
+
// requires searchResultsContext to be set
|
|
672
429
|
mse.publish.searchSuggestionClick(searchUnitId, suggestion, ctx);
|
|
673
430
|
```
|
|
674
431
|
|
|
675
|
-
#### `mse.publish.shoppingCartView`
|
|
676
|
-
|
|
677
|
-
Publishes the `shoppingCartView` event.
|
|
678
|
-
|
|
679
|
-
| Name | Required | Description |
|
|
680
|
-
| --------- | :------: | --------------- |
|
|
681
|
-
| `context` | No | Custom context. |
|
|
682
|
-
|
|
683
432
|
```javascript
|
|
433
|
+
// requires shoppingCartContext to be set
|
|
684
434
|
mse.publish.shoppingCartView(ctx);
|
|
685
435
|
```
|
|
686
436
|
|
|
687
|
-
#### `mse.publish.signIn`
|
|
688
|
-
|
|
689
|
-
Publishes the `signIn` event.
|
|
690
|
-
|
|
691
|
-
| Name | Required | Description |
|
|
692
|
-
| --------- | :------: | --------------- |
|
|
693
|
-
| `context` | No | Custom context. |
|
|
694
|
-
|
|
695
437
|
```javascript
|
|
696
438
|
mse.publish.signIn(ctx);
|
|
697
439
|
```
|
|
698
440
|
|
|
699
|
-
#### `mse.publish.signOut`
|
|
700
|
-
|
|
701
|
-
Publishes the `signOut` event.
|
|
702
|
-
|
|
703
|
-
| Name | Required | Description |
|
|
704
|
-
| --------- | :------: | --------------- |
|
|
705
|
-
| `context` | No | Custom context. |
|
|
706
|
-
|
|
707
441
|
```javascript
|
|
708
442
|
mse.publish.signOut(ctx);
|
|
709
443
|
```
|
|
710
444
|
|
|
711
|
-
#### `mse.publish.updateCart`
|
|
712
|
-
|
|
713
|
-
Publishes the `updateCart` event.
|
|
714
|
-
|
|
715
|
-
| Name | Required | Description |
|
|
716
|
-
| --------- | :------: | --------------- |
|
|
717
|
-
| `context` | No | Custom context. |
|
|
718
|
-
|
|
719
445
|
```javascript
|
|
720
446
|
mse.publish.updateCart(ctx);
|
|
721
447
|
```
|
|
722
448
|
|
|
723
449
|
### Subscribe
|
|
724
450
|
|
|
725
|
-
These functions subscribe to events
|
|
726
|
-
|
|
727
|
-
#### `mse.subscribe.addToCart`
|
|
728
|
-
|
|
729
|
-
Subscribes to the `addToCart` event.
|
|
730
|
-
|
|
731
|
-
| Name | Required | Description |
|
|
732
|
-
| --------- | :------: | ----------------- |
|
|
733
|
-
| `handler` | Yes | Event handler. |
|
|
734
|
-
| `options` | No | Listener options. |
|
|
451
|
+
These functions subscribe to events:
|
|
735
452
|
|
|
736
453
|
```javascript
|
|
737
454
|
mse.subscribe.addToCart(handler, options);
|
|
455
|
+
mse.subscribe.customUrl(handler, options);
|
|
456
|
+
mse.subscribe.dataLayerChange(handler, options);
|
|
457
|
+
mse.subscribe.dataLayerEvent(handler, options);
|
|
458
|
+
mse.subscribe.initiateCheckout(handler, options);
|
|
459
|
+
mse.subscribe.instantPurchase(handler, options);
|
|
460
|
+
mse.subscribe.pageActivitySummary(handler, options);
|
|
461
|
+
mse.subscribe.pageView(handler, options);
|
|
462
|
+
mse.subscribe.placeOrder(handler, options);
|
|
463
|
+
mse.subscribe.productPageView(handler, options);
|
|
464
|
+
mse.subscribe.recsItemAddToCartClick(handler, options);
|
|
465
|
+
mse.subscribe.recsItemClick(handler, options);
|
|
466
|
+
mse.subscribe.recsRequestSent(handler, options);
|
|
467
|
+
mse.subscribe.recsResponseReceived(handler, options);
|
|
468
|
+
mse.subscribe.recsUnitRender(handler, options);
|
|
469
|
+
mse.subscribe.recsUnitView(handler, options);
|
|
470
|
+
mse.subscribe.referrerUrl(handler, options);
|
|
471
|
+
mse.subscribe.removeFromCart(handler, options);
|
|
472
|
+
mse.subscribe.searchCategoryClick(handler, options);
|
|
473
|
+
mse.subscribe.searchProductClick(handler, options);
|
|
474
|
+
mse.subscribe.searchRequestSent(handler, options);
|
|
475
|
+
mse.subscribe.searchResponseReceived(handler, options);
|
|
476
|
+
mse.subscribe.searchResultsView(handler, options);
|
|
477
|
+
mse.subscribe.searchSuggestionClick(handler, options);
|
|
478
|
+
mse.subscribe.shoppingCartView(handler, options);
|
|
479
|
+
mse.subscribe.signIn(handler, options);
|
|
480
|
+
mse.subscribe.signOut(handler, options);
|
|
481
|
+
mse.subscribe.updateCart(handler, options);
|
|
738
482
|
```
|
|
739
483
|
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
Subscribes to the `customUrl` event.
|
|
484
|
+
### Unsubscribe
|
|
743
485
|
|
|
744
|
-
|
|
745
|
-
| --------- | :------: | ----------------- |
|
|
746
|
-
| `handler` | Yes | Event handler. |
|
|
747
|
-
| `options` | No | Listener options. |
|
|
748
|
-
|
|
749
|
-
```javascript
|
|
750
|
-
mse.subscribe.customUrl(handler, options);
|
|
751
|
-
```
|
|
752
|
-
|
|
753
|
-
#### `mse.subscribe.dataLayerChange`
|
|
754
|
-
|
|
755
|
-
Subscribes to the `dataLayerChange` event.
|
|
756
|
-
|
|
757
|
-
| Name | Required | Description |
|
|
758
|
-
| --------- | :------: | ----------------- |
|
|
759
|
-
| `handler` | Yes | Event handler. |
|
|
760
|
-
| `options` | No | Listener options. |
|
|
761
|
-
|
|
762
|
-
```javascript
|
|
763
|
-
mse.subscribe.dataLayerChange(handler, options);
|
|
764
|
-
```
|
|
765
|
-
|
|
766
|
-
#### `mse.subscribe.dataLayerEvent`
|
|
767
|
-
|
|
768
|
-
Subscribes to the `dataLayerEvent` event.
|
|
769
|
-
|
|
770
|
-
| Name | Required | Description |
|
|
771
|
-
| --------- | :------: | ----------------- |
|
|
772
|
-
| `handler` | Yes | Event handler. |
|
|
773
|
-
| `options` | No | Listener options. |
|
|
774
|
-
|
|
775
|
-
```javascript
|
|
776
|
-
mse.subscribe.dataLayerEvent(handler, options);
|
|
777
|
-
```
|
|
778
|
-
|
|
779
|
-
#### `mse.subscribe.initiateCheckout`
|
|
780
|
-
|
|
781
|
-
Subscribes to the `initiateCheckout` event.
|
|
782
|
-
|
|
783
|
-
| Name | Required | Description |
|
|
784
|
-
| --------- | :------: | ----------------- |
|
|
785
|
-
| `handler` | Yes | Event handler. |
|
|
786
|
-
| `options` | No | Listener options. |
|
|
787
|
-
|
|
788
|
-
```javascript
|
|
789
|
-
mse.subscribe.initiateCheckout(handler, options);
|
|
790
|
-
```
|
|
791
|
-
|
|
792
|
-
#### `mse.subscribe.instantPurchase`
|
|
793
|
-
|
|
794
|
-
Subscribes to the `instantPurchase` event.
|
|
795
|
-
|
|
796
|
-
| Name | Required | Description |
|
|
797
|
-
| --------- | :------: | ----------------- |
|
|
798
|
-
| `handler` | Yes | Event handler. |
|
|
799
|
-
| `options` | No | Listener options. |
|
|
800
|
-
|
|
801
|
-
```javascript
|
|
802
|
-
mse.subscribe.instantPurchase(handler, options);
|
|
803
|
-
```
|
|
804
|
-
|
|
805
|
-
#### `mse.subscribe.pageActivitySummary`
|
|
806
|
-
|
|
807
|
-
Subscribes to the `pageActivitySummary` event.
|
|
808
|
-
|
|
809
|
-
| Name | Required | Description |
|
|
810
|
-
| --------- | :------: | ----------------- |
|
|
811
|
-
| `handler` | Yes | Event handler. |
|
|
812
|
-
| `options` | No | Listener options. |
|
|
813
|
-
|
|
814
|
-
```javascript
|
|
815
|
-
mse.subscribe.pageActivitySummary(handler, options);
|
|
816
|
-
```
|
|
817
|
-
|
|
818
|
-
#### `mse.subscribe.pageView`
|
|
819
|
-
|
|
820
|
-
Subscribes to the `pageView` event.
|
|
821
|
-
|
|
822
|
-
| Name | Required | Description |
|
|
823
|
-
| --------- | :------: | ----------------- |
|
|
824
|
-
| `handler` | Yes | Event handler. |
|
|
825
|
-
| `options` | No | Listener options. |
|
|
826
|
-
|
|
827
|
-
```javascript
|
|
828
|
-
mse.subscribe.pageView(handler, options);
|
|
829
|
-
```
|
|
830
|
-
|
|
831
|
-
#### `mse.subscribe.placeOrder`
|
|
832
|
-
|
|
833
|
-
Subscribes to the `placeOrder` event.
|
|
834
|
-
|
|
835
|
-
| Name | Required | Description |
|
|
836
|
-
| --------- | :------: | ----------------- |
|
|
837
|
-
| `handler` | Yes | Event handler. |
|
|
838
|
-
| `options` | No | Listener options. |
|
|
839
|
-
|
|
840
|
-
```javascript
|
|
841
|
-
mse.subscribe.placeOrder(handler, options);
|
|
842
|
-
```
|
|
843
|
-
|
|
844
|
-
#### `mse.subscribe.productPageView`
|
|
845
|
-
|
|
846
|
-
Subscribes to the `productPageView` event.
|
|
847
|
-
|
|
848
|
-
| Name | Required | Description |
|
|
849
|
-
| --------- | :------: | ----------------- |
|
|
850
|
-
| `handler` | Yes | Event handler. |
|
|
851
|
-
| `options` | No | Listener options. |
|
|
852
|
-
|
|
853
|
-
```javascript
|
|
854
|
-
mse.subscribe.productPageView(handler, options);
|
|
855
|
-
```
|
|
856
|
-
|
|
857
|
-
#### `mse.subscribe.recsItemAddToCartClick`
|
|
858
|
-
|
|
859
|
-
Subscribes to the `recsItemAddToCartClick` event.
|
|
860
|
-
|
|
861
|
-
| Name | Required | Description |
|
|
862
|
-
| --------- | :------: | ----------------- |
|
|
863
|
-
| `handler` | Yes | Event handler. |
|
|
864
|
-
| `options` | No | Listener options. |
|
|
865
|
-
|
|
866
|
-
```javascript
|
|
867
|
-
mse.subscribe.recsItemAddToCartClick(handler, options);
|
|
868
|
-
```
|
|
869
|
-
|
|
870
|
-
#### `mse.subscribe.recsItemClick`
|
|
871
|
-
|
|
872
|
-
Subscribes to the `recsItemClick` event.
|
|
873
|
-
|
|
874
|
-
| Name | Required | Description |
|
|
875
|
-
| --------- | :------: | ----------------- |
|
|
876
|
-
| `handler` | Yes | Event handler. |
|
|
877
|
-
| `options` | No | Listener options. |
|
|
878
|
-
|
|
879
|
-
```javascript
|
|
880
|
-
mse.subscribe.recsItemClick(handler, options);
|
|
881
|
-
```
|
|
882
|
-
|
|
883
|
-
#### `mse.subscribe.recsRequestSent`
|
|
884
|
-
|
|
885
|
-
Subscribes to the `recsRequestSent` event.
|
|
886
|
-
|
|
887
|
-
| Name | Required | Description |
|
|
888
|
-
| --------- | :------: | ----------------- |
|
|
889
|
-
| `handler` | Yes | Event handler. |
|
|
890
|
-
| `options` | No | Listener options. |
|
|
891
|
-
|
|
892
|
-
```javascript
|
|
893
|
-
mse.subscribe.recsRequestSent(handler, options);
|
|
894
|
-
```
|
|
895
|
-
|
|
896
|
-
#### `mse.subscribe.recsResponseReceived`
|
|
897
|
-
|
|
898
|
-
Subscribes to the `recsResponseReceived` event.
|
|
899
|
-
|
|
900
|
-
| Name | Required | Description |
|
|
901
|
-
| --------- | :------: | ----------------- |
|
|
902
|
-
| `handler` | Yes | Event handler. |
|
|
903
|
-
| `options` | No | Listener options. |
|
|
904
|
-
|
|
905
|
-
```javascript
|
|
906
|
-
mse.subscribe.recsResponseReceived(handler, options);
|
|
907
|
-
```
|
|
908
|
-
|
|
909
|
-
#### `mse.subscribe.recsUnitRender`
|
|
910
|
-
|
|
911
|
-
Subscribes to the `recsUnitRender` event.
|
|
912
|
-
|
|
913
|
-
| Name | Required | Description |
|
|
914
|
-
| --------- | :------: | ----------------- |
|
|
915
|
-
| `handler` | Yes | Event handler. |
|
|
916
|
-
| `options` | No | Listener options. |
|
|
917
|
-
|
|
918
|
-
```javascript
|
|
919
|
-
mse.subscribe.recsUnitRender(handler, options);
|
|
920
|
-
```
|
|
921
|
-
|
|
922
|
-
#### `mse.subscribe.recsUnitView`
|
|
923
|
-
|
|
924
|
-
Subscribes to the `recsUnitView` event.
|
|
925
|
-
|
|
926
|
-
| Name | Required | Description |
|
|
927
|
-
| --------- | :------: | ----------------- |
|
|
928
|
-
| `handler` | Yes | Event handler. |
|
|
929
|
-
| `options` | No | Listener options. |
|
|
930
|
-
|
|
931
|
-
```javascript
|
|
932
|
-
mse.subscribe.recsUnitView(handler, options);
|
|
933
|
-
```
|
|
934
|
-
|
|
935
|
-
#### `mse.subscribe.referrerUrl`
|
|
936
|
-
|
|
937
|
-
Subscribes to the `referrerUrl` event.
|
|
938
|
-
|
|
939
|
-
| Name | Required | Description |
|
|
940
|
-
| --------- | :------: | ----------------- |
|
|
941
|
-
| `handler` | Yes | Event handler. |
|
|
942
|
-
| `options` | No | Listener options. |
|
|
943
|
-
|
|
944
|
-
```javascript
|
|
945
|
-
mse.subscribe.referrerUrl(handler, options);
|
|
946
|
-
```
|
|
947
|
-
|
|
948
|
-
#### `mse.subscribe.removeFromCart`
|
|
949
|
-
|
|
950
|
-
Subscribes to the `removeFromCart` event.
|
|
951
|
-
|
|
952
|
-
| Name | Required | Description |
|
|
953
|
-
| --------- | :------: | ----------------- |
|
|
954
|
-
| `handler` | Yes | Event handler. |
|
|
955
|
-
| `options` | No | Listener options. |
|
|
956
|
-
|
|
957
|
-
```javascript
|
|
958
|
-
mse.subscribe.removeFromCart(handler, options);
|
|
959
|
-
```
|
|
960
|
-
|
|
961
|
-
#### `mse.subscribe.searchCategoryClick`
|
|
962
|
-
|
|
963
|
-
Subscribes to the `searchCategoryClick` event.
|
|
964
|
-
|
|
965
|
-
| Name | Required | Description |
|
|
966
|
-
| --------- | :------: | ----------------- |
|
|
967
|
-
| `handler` | Yes | Event handler. |
|
|
968
|
-
| `options` | No | Listener options. |
|
|
969
|
-
|
|
970
|
-
```javascript
|
|
971
|
-
mse.subscribe.searchCategoryClick(handler, options);
|
|
972
|
-
```
|
|
973
|
-
|
|
974
|
-
#### `mse.subscribe.searchProductClick`
|
|
975
|
-
|
|
976
|
-
Subscribes to the `searchProductClick` event.
|
|
977
|
-
|
|
978
|
-
| Name | Required | Description |
|
|
979
|
-
| --------- | :------: | ----------------- |
|
|
980
|
-
| `handler` | Yes | Event handler. |
|
|
981
|
-
| `options` | No | Listener options. |
|
|
982
|
-
|
|
983
|
-
```javascript
|
|
984
|
-
mse.subscribe.searchProductClick(handler, options);
|
|
985
|
-
```
|
|
986
|
-
|
|
987
|
-
#### `mse.subscribe.searchRequestSent`
|
|
988
|
-
|
|
989
|
-
Subscribes to the `searchRequestSent` event.
|
|
990
|
-
|
|
991
|
-
| Name | Required | Description |
|
|
992
|
-
| --------- | :------: | ----------------- |
|
|
993
|
-
| `handler` | Yes | Event handler. |
|
|
994
|
-
| `options` | No | Listener options. |
|
|
995
|
-
|
|
996
|
-
```javascript
|
|
997
|
-
mse.subscribe.searchRequestSent(handler, options);
|
|
998
|
-
```
|
|
999
|
-
|
|
1000
|
-
#### `mse.subscribe.searchResponseReceived`
|
|
1001
|
-
|
|
1002
|
-
Subscribes to the `searchResponseReceived` event.
|
|
1003
|
-
|
|
1004
|
-
| Name | Required | Description |
|
|
1005
|
-
| --------- | :------: | ----------------- |
|
|
1006
|
-
| `handler` | Yes | Event handler. |
|
|
1007
|
-
| `options` | No | Listener options. |
|
|
1008
|
-
|
|
1009
|
-
```javascript
|
|
1010
|
-
mse.subscribe.searchResponseReceived(handler, options);
|
|
1011
|
-
```
|
|
1012
|
-
|
|
1013
|
-
#### `mse.subscribe.searchResultsView`
|
|
1014
|
-
|
|
1015
|
-
Subscribes to the `searchResultsView` event.
|
|
1016
|
-
|
|
1017
|
-
| Name | Required | Description |
|
|
1018
|
-
| --------- | :------: | ----------------- |
|
|
1019
|
-
| `handler` | Yes | Event handler. |
|
|
1020
|
-
| `options` | No | Listener options. |
|
|
1021
|
-
|
|
1022
|
-
```javascript
|
|
1023
|
-
mse.subscribe.searchResultsView(handler, options);
|
|
1024
|
-
```
|
|
1025
|
-
|
|
1026
|
-
#### `mse.subscribe.searchSuggestionClick`
|
|
1027
|
-
|
|
1028
|
-
Subscribes to the `searchSuggestionClick` event.
|
|
1029
|
-
|
|
1030
|
-
| Name | Required | Description |
|
|
1031
|
-
| --------- | :------: | ----------------- |
|
|
1032
|
-
| `handler` | Yes | Event handler. |
|
|
1033
|
-
| `options` | No | Listener options. |
|
|
1034
|
-
|
|
1035
|
-
```javascript
|
|
1036
|
-
mse.subscribe.searchSuggestionClick(handler, options);
|
|
1037
|
-
```
|
|
1038
|
-
|
|
1039
|
-
#### `mse.subscribe.shoppingCartView`
|
|
1040
|
-
|
|
1041
|
-
Subscribes to the `shoppingCartView` event.
|
|
1042
|
-
|
|
1043
|
-
| Name | Required | Description |
|
|
1044
|
-
| --------- | :------: | ----------------- |
|
|
1045
|
-
| `handler` | Yes | Event handler. |
|
|
1046
|
-
| `options` | No | Listener options. |
|
|
1047
|
-
|
|
1048
|
-
```javascript
|
|
1049
|
-
mse.subscribe.shoppingCartView(handler, options);
|
|
1050
|
-
```
|
|
1051
|
-
|
|
1052
|
-
#### `mse.subscribe.signIn`
|
|
1053
|
-
|
|
1054
|
-
Subscribes to the `signIn` event.
|
|
1055
|
-
|
|
1056
|
-
| Name | Required | Description |
|
|
1057
|
-
| --------- | :------: | ----------------- |
|
|
1058
|
-
| `handler` | Yes | Event handler. |
|
|
1059
|
-
| `options` | No | Listener options. |
|
|
1060
|
-
|
|
1061
|
-
```javascript
|
|
1062
|
-
mse.subscribe.signIn(handler, options);
|
|
1063
|
-
```
|
|
1064
|
-
|
|
1065
|
-
#### `mse.subscribe.signOut`
|
|
1066
|
-
|
|
1067
|
-
Subscribes to the `signOut` event.
|
|
1068
|
-
|
|
1069
|
-
| Name | Required | Description |
|
|
1070
|
-
| --------- | :------: | ----------------- |
|
|
1071
|
-
| `handler` | Yes | Event handler. |
|
|
1072
|
-
| `options` | No | Listener options. |
|
|
1073
|
-
|
|
1074
|
-
```javascript
|
|
1075
|
-
mse.subscribe.signOut(handler, options);
|
|
1076
|
-
```
|
|
1077
|
-
|
|
1078
|
-
#### `mse.subscribe.updateCart`
|
|
1079
|
-
|
|
1080
|
-
Subscribes to the `updateCart` event.
|
|
1081
|
-
|
|
1082
|
-
| Name | Required | Description |
|
|
1083
|
-
| --------- | :------: | ----------------- |
|
|
1084
|
-
| `handler` | Yes | Event handler. |
|
|
1085
|
-
| `options` | No | Listener options. |
|
|
1086
|
-
|
|
1087
|
-
```javascript
|
|
1088
|
-
mse.subscribe.updateCart(handler, options);
|
|
1089
|
-
```
|
|
1090
|
-
|
|
1091
|
-
### Unsubscribe
|
|
1092
|
-
|
|
1093
|
-
These functions unsubscribe from events.
|
|
1094
|
-
|
|
1095
|
-
#### `mse.unsubscribe.addToCart`
|
|
1096
|
-
|
|
1097
|
-
Unsubscribes from the `addToCart` event.
|
|
1098
|
-
|
|
1099
|
-
| Name | Required | Description |
|
|
1100
|
-
| --------- | :------: | -------------- |
|
|
1101
|
-
| `handler` | Yes | Event handler. |
|
|
486
|
+
These functions unsubscribe from events:
|
|
1102
487
|
|
|
1103
488
|
```javascript
|
|
1104
489
|
mse.unsubscribe.addToCart(handler);
|
|
1105
|
-
```
|
|
1106
|
-
|
|
1107
|
-
#### `mse.unsubscribe.customUrl`
|
|
1108
|
-
|
|
1109
|
-
Unsubscribes from the `customUrl` event.
|
|
1110
|
-
|
|
1111
|
-
| Name | Required | Description |
|
|
1112
|
-
| --------- | :------: | -------------- |
|
|
1113
|
-
| `handler` | Yes | Event handler. |
|
|
1114
|
-
|
|
1115
|
-
```javascript
|
|
1116
490
|
mse.unsubscribe.customUrl(handler);
|
|
1117
|
-
```
|
|
1118
|
-
|
|
1119
|
-
#### `mse.unsubscribe.dataLayerChange`
|
|
1120
|
-
|
|
1121
|
-
Unsubscribes from the `dataLayerChange` event.
|
|
1122
|
-
|
|
1123
|
-
| Name | Required | Description |
|
|
1124
|
-
| --------- | :------: | -------------- |
|
|
1125
|
-
| `handler` | Yes | Event handler. |
|
|
1126
|
-
|
|
1127
|
-
```javascript
|
|
1128
491
|
mse.unsubscribe.dataLayerChange(handler);
|
|
1129
|
-
```
|
|
1130
|
-
|
|
1131
|
-
#### `mse.unsubscribe.dataLayerEvent`
|
|
1132
|
-
|
|
1133
|
-
Unsubscribes from the `dataLayerEvent` event.
|
|
1134
|
-
|
|
1135
|
-
| Name | Required | Description |
|
|
1136
|
-
| --------- | :------: | -------------- |
|
|
1137
|
-
| `handler` | Yes | Event handler. |
|
|
1138
|
-
|
|
1139
|
-
```javascript
|
|
1140
492
|
mse.unsubscribe.dataLayerEvent(handler);
|
|
1141
|
-
```
|
|
1142
|
-
|
|
1143
|
-
#### `mse.unsubscribe.initiateCheckout`
|
|
1144
|
-
|
|
1145
|
-
Unsubscribes from the `initiateCheckout` event.
|
|
1146
|
-
|
|
1147
|
-
| Name | Required | Description |
|
|
1148
|
-
| --------- | :------: | -------------- |
|
|
1149
|
-
| `handler` | Yes | Event handler. |
|
|
1150
|
-
|
|
1151
|
-
```javascript
|
|
1152
493
|
mse.unsubscribe.initiateCheckout(handler);
|
|
1153
|
-
```
|
|
1154
|
-
|
|
1155
|
-
#### `mse.unsubscribe.instantPurchase`
|
|
1156
|
-
|
|
1157
|
-
Unsubscribes from the `instantPurchase` event.
|
|
1158
|
-
|
|
1159
|
-
| Name | Required | Description |
|
|
1160
|
-
| --------- | :------: | -------------- |
|
|
1161
|
-
| `handler` | Yes | Event handler. |
|
|
1162
|
-
|
|
1163
|
-
```javascript
|
|
1164
494
|
mse.unsubscribe.instantPurchase(handler);
|
|
1165
|
-
```
|
|
1166
|
-
|
|
1167
|
-
#### `mse.unsubscribe.pageActivitySummary`
|
|
1168
|
-
|
|
1169
|
-
Unsubscribes from the `pageActivitySummary` event.
|
|
1170
|
-
|
|
1171
|
-
| Name | Required | Description |
|
|
1172
|
-
| --------- | :------: | -------------- |
|
|
1173
|
-
| `handler` | Yes | Event handler. |
|
|
1174
|
-
|
|
1175
|
-
```javascript
|
|
1176
495
|
mse.unsubscribe.pageActivitySummary(handler);
|
|
1177
|
-
```
|
|
1178
|
-
|
|
1179
|
-
#### `mse.unsubscribe.pageView`
|
|
1180
|
-
|
|
1181
|
-
Unsubscribes from the `pageView` event.
|
|
1182
|
-
|
|
1183
|
-
| Name | Required | Description |
|
|
1184
|
-
| --------- | :------: | -------------- |
|
|
1185
|
-
| `handler` | Yes | Event handler. |
|
|
1186
|
-
|
|
1187
|
-
```javascript
|
|
1188
496
|
mse.unsubscribe.pageView(handler);
|
|
1189
|
-
```
|
|
1190
|
-
|
|
1191
|
-
#### `mse.unsubscribe.placeOrder`
|
|
1192
|
-
|
|
1193
|
-
Unsubscribes from the `placeOrder` event.
|
|
1194
|
-
|
|
1195
|
-
| Name | Required | Description |
|
|
1196
|
-
| --------- | :------: | -------------- |
|
|
1197
|
-
| `handler` | Yes | Event handler. |
|
|
1198
|
-
|
|
1199
|
-
```javascript
|
|
1200
497
|
mse.unsubscribe.placeOrder(handler);
|
|
1201
|
-
```
|
|
1202
|
-
|
|
1203
|
-
#### `mse.unsubscribe.productPageView`
|
|
1204
|
-
|
|
1205
|
-
Unsubscribes from the `productPageView` event.
|
|
1206
|
-
|
|
1207
|
-
| Name | Required | Description |
|
|
1208
|
-
| --------- | :------: | -------------- |
|
|
1209
|
-
| `handler` | Yes | Event handler. |
|
|
1210
|
-
|
|
1211
|
-
```javascript
|
|
1212
498
|
mse.unsubscribe.productPageView(handler);
|
|
1213
|
-
```
|
|
1214
|
-
|
|
1215
|
-
#### `mse.unsubscribe.recsItemAddToCartClick`
|
|
1216
|
-
|
|
1217
|
-
Unsubscribes from the `recsItemAddToCartClick` event.
|
|
1218
|
-
|
|
1219
|
-
| Name | Required | Description |
|
|
1220
|
-
| --------- | :------: | -------------- |
|
|
1221
|
-
| `handler` | Yes | Event handler. |
|
|
1222
|
-
|
|
1223
|
-
```javascript
|
|
1224
499
|
mse.unsubscribe.recsItemAddToCartClick(handler);
|
|
1225
|
-
```
|
|
1226
|
-
|
|
1227
|
-
#### `mse.unsubscribe.recsItemClick`
|
|
1228
|
-
|
|
1229
|
-
Unsubscribes from the `recsItemClick` event.
|
|
1230
|
-
|
|
1231
|
-
| Name | Required | Description |
|
|
1232
|
-
| --------- | :------: | -------------- |
|
|
1233
|
-
| `handler` | Yes | Event handler. |
|
|
1234
|
-
|
|
1235
|
-
```javascript
|
|
1236
500
|
mse.unsubscribe.recsItemClick(handler);
|
|
1237
|
-
```
|
|
1238
|
-
|
|
1239
|
-
#### `mse.unsubscribe.recsRequestSent`
|
|
1240
|
-
|
|
1241
|
-
Unsubscribes from the `recsRequestSent` event.
|
|
1242
|
-
|
|
1243
|
-
| Name | Required | Description |
|
|
1244
|
-
| --------- | :------: | -------------- |
|
|
1245
|
-
| `handler` | Yes | Event handler. |
|
|
1246
|
-
|
|
1247
|
-
```javascript
|
|
1248
501
|
mse.unsubscribe.recsRequestSent(handler);
|
|
1249
|
-
```
|
|
1250
|
-
|
|
1251
|
-
#### `mse.unsubscribe.recsResponseReceived`
|
|
1252
|
-
|
|
1253
|
-
Unsubscribes from the `recsResponseReceived` event.
|
|
1254
|
-
|
|
1255
|
-
| Name | Required | Description |
|
|
1256
|
-
| --------- | :------: | -------------- |
|
|
1257
|
-
| `handler` | Yes | Event handler. |
|
|
1258
|
-
|
|
1259
|
-
```javascript
|
|
1260
502
|
mse.unsubscribe.recsResponseReceived(handler);
|
|
1261
|
-
```
|
|
1262
|
-
|
|
1263
|
-
#### `mse.unsubscribe.recsUnitRender`
|
|
1264
|
-
|
|
1265
|
-
Unsubscribes from the `recsUnitRender` event.
|
|
1266
|
-
|
|
1267
|
-
| Name | Required | Description |
|
|
1268
|
-
| --------- | :------: | -------------- |
|
|
1269
|
-
| `handler` | Yes | Event handler. |
|
|
1270
|
-
|
|
1271
|
-
```javascript
|
|
1272
503
|
mse.unsubscribe.recsUnitRender(handler);
|
|
1273
|
-
```
|
|
1274
|
-
|
|
1275
|
-
#### `mse.unsubscribe.recsUnitView`
|
|
1276
|
-
|
|
1277
|
-
Unsubscribes from the `recsUnitView` event.
|
|
1278
|
-
|
|
1279
|
-
| Name | Required | Description |
|
|
1280
|
-
| --------- | :------: | -------------- |
|
|
1281
|
-
| `handler` | Yes | Event handler. |
|
|
1282
|
-
|
|
1283
|
-
```javascript
|
|
1284
504
|
mse.unsubscribe.recsUnitView(handler);
|
|
1285
|
-
```
|
|
1286
|
-
|
|
1287
|
-
#### `mse.unsubscribe.referrerUrl`
|
|
1288
|
-
|
|
1289
|
-
Unsubscribes from the `referrerUrl` event.
|
|
1290
|
-
|
|
1291
|
-
| Name | Required | Description |
|
|
1292
|
-
| --------- | :------: | -------------- |
|
|
1293
|
-
| `handler` | Yes | Event handler. |
|
|
1294
|
-
|
|
1295
|
-
```javascript
|
|
1296
505
|
mse.unsubscribe.referrerUrl(handler);
|
|
1297
|
-
```
|
|
1298
|
-
|
|
1299
|
-
#### `mse.unsubscribe.removeFromCart`
|
|
1300
|
-
|
|
1301
|
-
Unsubscribes from the `removeFromCart` event.
|
|
1302
|
-
|
|
1303
|
-
| Name | Required | Description |
|
|
1304
|
-
| --------- | :------: | -------------- |
|
|
1305
|
-
| `handler` | Yes | Event handler. |
|
|
1306
|
-
|
|
1307
|
-
```javascript
|
|
1308
506
|
mse.unsubscribe.removeFromCart(handler);
|
|
1309
|
-
```
|
|
1310
|
-
|
|
1311
|
-
#### `mse.unsubscribe.searchCategoryClick`
|
|
1312
|
-
|
|
1313
|
-
Unsubscribes from the `searchCategoryClick` event.
|
|
1314
|
-
|
|
1315
|
-
| Name | Required | Description |
|
|
1316
|
-
| --------- | :------: | -------------- |
|
|
1317
|
-
| `handler` | Yes | Event handler. |
|
|
1318
|
-
|
|
1319
|
-
```javascript
|
|
1320
507
|
mse.unsubscribe.searchCategoryClick(handler);
|
|
1321
|
-
```
|
|
1322
|
-
|
|
1323
|
-
#### `mse.unsubscribe.searchProductClick`
|
|
1324
|
-
|
|
1325
|
-
Unsubscribes from the `searchProductClick` event.
|
|
1326
|
-
|
|
1327
|
-
| Name | Required | Description |
|
|
1328
|
-
| --------- | :------: | -------------- |
|
|
1329
|
-
| `handler` | Yes | Event handler. |
|
|
1330
|
-
|
|
1331
|
-
```javascript
|
|
1332
508
|
mse.unsubscribe.searchProductClick(handler);
|
|
1333
|
-
```
|
|
1334
|
-
|
|
1335
|
-
#### `mse.unsubscribe.searchRequestSent`
|
|
1336
|
-
|
|
1337
|
-
Unsubscribes from the `searchRequestSent` event.
|
|
1338
|
-
|
|
1339
|
-
| Name | Required | Description |
|
|
1340
|
-
| --------- | :------: | -------------- |
|
|
1341
|
-
| `handler` | Yes | Event handler. |
|
|
1342
|
-
|
|
1343
|
-
```javascript
|
|
1344
509
|
mse.unsubscribe.searchRequestSent(handler);
|
|
1345
|
-
```
|
|
1346
|
-
|
|
1347
|
-
#### `mse.unsubscribe.searchResponseReceived`
|
|
1348
|
-
|
|
1349
|
-
Unsubscribes from the `searchResponseReceived` event.
|
|
1350
|
-
|
|
1351
|
-
| Name | Required | Description |
|
|
1352
|
-
| --------- | :------: | -------------- |
|
|
1353
|
-
| `handler` | Yes | Event handler. |
|
|
1354
|
-
|
|
1355
|
-
```javascript
|
|
1356
510
|
mse.unsubscribe.searchResponseReceived(handler);
|
|
1357
|
-
```
|
|
1358
|
-
|
|
1359
|
-
#### `mse.unsubscribe.searchResultsView`
|
|
1360
|
-
|
|
1361
|
-
Unsubscribes from the `searchResultsView` event.
|
|
1362
|
-
|
|
1363
|
-
| Name | Required | Description |
|
|
1364
|
-
| --------- | :------: | -------------- |
|
|
1365
|
-
| `handler` | Yes | Event handler. |
|
|
1366
|
-
|
|
1367
|
-
```javascript
|
|
1368
511
|
mse.unsubscribe.searchResultsView(handler);
|
|
1369
|
-
```
|
|
1370
|
-
|
|
1371
|
-
#### `mse.unsubscribe.searchSuggestionClick`
|
|
1372
|
-
|
|
1373
|
-
Unsubscribes from the `searchSuggestionClick` event.
|
|
1374
|
-
|
|
1375
|
-
| Name | Required | Description |
|
|
1376
|
-
| --------- | :------: | -------------- |
|
|
1377
|
-
| `handler` | Yes | Event handler. |
|
|
1378
|
-
|
|
1379
|
-
```javascript
|
|
1380
512
|
mse.unsubscribe.searchSuggestionClick(handler);
|
|
1381
|
-
```
|
|
1382
|
-
|
|
1383
|
-
#### `mse.unsubscribe.shoppingCartView`
|
|
1384
|
-
|
|
1385
|
-
Unsubscribes from the `shoppingCartView` event.
|
|
1386
|
-
|
|
1387
|
-
| Name | Required | Description |
|
|
1388
|
-
| --------- | :------: | -------------- |
|
|
1389
|
-
| `handler` | Yes | Event handler. |
|
|
1390
|
-
|
|
1391
|
-
```javascript
|
|
1392
513
|
mse.unsubscribe.shoppingCartView(handler);
|
|
1393
|
-
```
|
|
1394
|
-
|
|
1395
|
-
#### `mse.unsubscribe.signIn`
|
|
1396
|
-
|
|
1397
|
-
Unsubscribes from the `signIn` event.
|
|
1398
|
-
|
|
1399
|
-
| Name | Required | Description |
|
|
1400
|
-
| --------- | :------: | -------------- |
|
|
1401
|
-
| `handler` | Yes | Event handler. |
|
|
1402
|
-
|
|
1403
|
-
```javascript
|
|
1404
514
|
mse.unsubscribe.signIn(handler);
|
|
1405
|
-
```
|
|
1406
|
-
|
|
1407
|
-
#### `mse.unsubscribe.signOut`
|
|
1408
|
-
|
|
1409
|
-
Unsubscribes from the `signOut` event.
|
|
1410
|
-
|
|
1411
|
-
| Name | Required | Description |
|
|
1412
|
-
| --------- | :------: | -------------- |
|
|
1413
|
-
| `handler` | Yes | Event handler. |
|
|
1414
|
-
|
|
1415
|
-
```javascript
|
|
1416
515
|
mse.unsubscribe.signOut(handler);
|
|
1417
|
-
```
|
|
1418
|
-
|
|
1419
|
-
#### `mse.unsubscribe.updateCart`
|
|
1420
|
-
|
|
1421
|
-
Unsubscribes from the `updateCart` event.
|
|
1422
|
-
|
|
1423
|
-
| Name | Required | Description |
|
|
1424
|
-
| --------- | :------: | -------------- |
|
|
1425
|
-
| `handler` | Yes | Event handler. |
|
|
1426
|
-
|
|
1427
|
-
```javascript
|
|
1428
516
|
mse.unsubscribe.updateCart(handler);
|
|
1429
517
|
```
|
|
1430
518
|
|
|
1431
519
|
## Support
|
|
1432
520
|
|
|
1433
|
-
If you have any questions or encounter any issues, please reach out
|
|
1434
|
-
|
|
1435
|
-
- [GitHub][issues]
|
|
1436
|
-
- [Zendesk][zendesk]
|
|
521
|
+
If you have any questions or encounter any issues, please reach out on [GitHub][issues].
|
|
1437
522
|
|
|
1438
523
|
[npm]: https://npmjs.com/package/@adobe/magento-storefront-events-sdk
|
|
1439
524
|
[version-badge]: https://img.shields.io/npm/v/@adobe/magento-storefront-events-sdk.svg?style=flat-square
|