Install the Event Collector
This package listens for and handles events sent from the Adobe Commerce Events SDK. It runs as a side effect and is meant to be a convenience for users who want to send events to Adobe Commerce for processing.
data-variant=info
data-slots=text
Installation
The collector can be used as a hosted script, or bundled in a JavaScript application. The script version is hosted on cdn, and the bundled version is hosted on npm.
-
Use the collector as a hosted script—Use the following snippet to load the script from the JSDelivr CDN.
<script src="https://cdn.jsdelivr.net/npm/@adobe/magento-storefront-event-collector@1/dist/index.js"></script> -
Use the bundled version—Run the following command to install the script as a dependency.
npm install @adobe/magento-storefront-event-collector
data-variant=info
data-slots=text
Quick Start
After loading the collector script, or importing the package as shown below, there is nothing else to configure.
import "@adobe/magento-storefront-event-collector";
The collector then begins listening for events. When these events are fired, the collector runs the associated handler and sends the event along with any relevant information to Adobe Commerce for further processing.
Support
If you have any questions or encounter any issues, reach out here: