This guide explains how to integrate with the E-commerce Events system. Depending on your architecture, you can capture and process events either on the client side (Device Mode) or on the server side (Cloud Mode).Both integration modes allow your application to react to customer actions such as browsing products, adding items to the cart, or completing a purchase.By the end of this guide, you'll know how to:Choose the right integration mode
Capture and listen for events
Process event data in your application
Choose an Integration Mode#
Before integrating, determine which mode best fits your application's architecture.Device Mode#
Use Device Mode when you want to capture events directly from the user's browser or mobile application.This mode is best suited for:Marketing and attribution tracking
Personalization and UI reactions
Real-time behavioral tracking
Events are emitted in the browser and can be consumed by a storefront script such as tracker.js.
Cloud Mode#
Use Cloud Mode when your backend needs to react to events generated by the platform.Order and fulfillment workflows
Custom integrations with external services
Events are delivered directly from our servers to your App Functions, enabling secure server-to-server processing.
Device Mode Integration#
In Device Mode, events are captured on the client and emitted to your storefront script. Your application can then listen for these events and execute custom logic.1. Include the tracker.js Script#
Add your custom tracker.js script to the storefront so it can listen for and process emitted events.This script is typically loaded inside the HTML <head>.Your tracker.js file will contain the logic for capturing and handling events.
2. Listen for Events#
Once the script is loaded, you can listen for events using standard browser event listeners.Each event includes a payload containing contextual data about the user action.
3. Available Events#
The platform emits multiple E-commerce events representing different stages of the shopping journey.For the complete list of supported events, payload structures, and examples, see the Events documentation.
Cloud Mode Integration (App Functions)#
Cloud Mode allows you to process E-commerce events directly on the server through App Functions.Instead of relying on browser scripts, events are delivered from our platform to your backend, ensuring reliable and secure processing.Typical use cases include:Order processing workflows
Inventory synchronization
Integration with third-party systems
Data pipelines and analytics processing
To implement Cloud Mode, follow the setup guide: Modified at 2026-03-09 07:40:16