Salla Docs
Merchant
Merchant
  • Merchant API
  • Salla OAuth 2.0
  • Merchant Dashboard
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • App Functions
  • Billing System Salla partners
  • Report Builder
  • App Onboarding
  • Communication Apps
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Change Log
Salla CLI
Merchant
Merchant
  • Merchant API
  • Salla OAuth 2.0
  • Merchant Dashboard
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • App Functions
  • Billing System Salla partners
  • Report Builder
  • App Onboarding
  • Communication Apps
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Ecommerce Events
  • Overview
  • Getting Started
  • Device Mode
  • Cloud Mode
  • Custom Events
  • Events
    • Account Events
    • Cart & Checkout Events
    • Product Events
    • Promotion & Coupon Events
    • Wishlist Events
  1. Ecommerce Events

Getting Started

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:
Client-side analytics
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.
This mode is ideal for:
Order and fulfillment workflows
Backend automations
Data synchronization
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.
For a full setup walkthrough, see Usage – Device Mode.

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.
Example:
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:
Usage – Cloud Mode
Modified at 2026-03-09 07:40:16
Previous
Overview
Next
Device Mode