Skip to main content

Product Events

Track user interactions with products to understand customer interests.

Product Viewed

Track when a user shows interest in a specific product (clicks, taps, views, or highlights):

Ometria.trackProductViewedEvent('product_id');

The product details must be uploaded to Ometria separately, e.g. using the Ometria data API, or an eCommerce platform integration (like Shopify), and the ids passed here must match the ids uploaded there.

Parameters:

ParameterTypeDescription
productIdstringThe unique identifier for the product

When to use:

  • User selects a product from search results
  • User browses a category and clicks on a specific item
  • User views a product detail page

Product Listing Viewed

Track when a user clicks, taps, views, or otherwise shows interest in a product listing. This includes search results, listings of products in a group, category, collection, or any other screen that presents a list of products.

For example, if a store sells clothing and the visitor taps on "Women's Footwear" to see products in that category, or searches for "blue jumper" and sees matching results.

Ometria.trackProductListingViewedEvent(listingType, listingAttributes);

Parameters:

ParameterTypeDescription
listingTypestringAny string to identify the listing page type. We recommend "category" for category pages or "search" for search results. Helps identify what kind of page was viewed.
listingAttributesobjectObject with type and id fields (see below).

Listing Attributes:

FieldTypeDescription
typestringAn attribute that exists in the Ometria database (e.g., "shoe-colour", "category")
idstringThe attribute identifier as it exists in the Ometria database (e.g., "red")

Both type and id are required to correctly specify attributes.

Example:

Ometria.trackProductListingViewedEvent('category', {
type: 'shoe-colour',
id: 'red',
});

When to use:

  • Search results pages
  • Category listings
  • Collection pages
  • Any screen showing multiple products