Track Shopify events using the Coveo AI Search & Discovery application

This is for:

Developer

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 application tracks commerce events. If you’re not using the application, see Custom implementations: Track events without the Coveo AI Search & Discovery application.

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.

Coveo app web pixel

The Coveo AI Search & Discovery application uses a web pixel to log certain commerce events based on your implementation approach.

Lifecycle

The Coveo AI Search & Discovery application:

Multi-market support (international domains)

You have three options when setting up domains for multi-market stores:

  1. Use subfolders

  2. Use a separate domain/subdomain

  3. 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.