Track events using the Coveo app for Shopify
Track events using the Coveo app for Shopify
usage analytics events are crucial for analyzing your storefront performance and power Coveo Machine Learning (Coveo ML) models. This page explains how the Coveo AI Search and Discovery app tracks commerce events. If you’re not using the app, see Custom implementations: Track events without the Coveo AI Search & Discovery app.
Types of events
There are four types of commerce events:
|
Note
Under the Coveo Event Protocol (EP), the Commerce API logs search events server-side automatically for you. |
How to track events
We highly recommend using Coveo Atomic or Coveo Headless, as these libraries simplify event tracking.
How you track events depends on the library you use:
-
Atomic
Atomic logs click events automatically.
The Coveo web pixel logs the remaining events—cart, product view, and purchase—automatically.
-
Headless
The Coveo web pixel automatically logs purchase events.
The appropriate Headless controllers log click, cart, and product view events.
-
To log click and product view events, see Displaying products.
-
To log cart events, see Managing the cart.
-
Coveo app web pixel
The Coveo AI Search & Discovery app uses a web pixel to log certain commerce events based on your implementation approach.
Lifecycle
The Coveo AI Search & Discovery app:
-
Deploys the web pixel when you synchronize your Shopify product catalog with Coveo.
-
Updates the web pixel to reflect the changes in your store when you manually synchronize your Shopify product catalog with Coveo.
-
Removes the web pixel when you unlink your Coveo organization from your store.
Multi-market support (international domains)
You have three options when setting up domains for multi-market stores:
-
Use subfolders
-
Use a separate domain/subdomain
-
Use primary market configuration
The Coveo web pixel only supports the first two options. If you select Use primary market configuration, the Coveo web pixel won’t be able to extract the tracking ID, resulting in data tracking problems.
Market and domain changes support
If you create or delete a new market, change a store domain, or change your multi-market domain setup, you must manually launch a sync of your Shopify product catalog with Coveo to update the Coveo web pixel. Otherwise, the Coveo web pixel won’t pick up on the updates.