Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.uselayers.com/llms.txt

Use this file to discover all available pages before exploring further.

  • Label: Products
  • Description: Catalog and performance metrics for products.
  • Default group key: product

Metrics

  • total_sales (USD)
    • Sales after discounts and before taxes/returns.
    • Example: SUM(total_sales)
  • quantity_purchased (items)
    • Number of items purchased.
    • Example: SUM(quantity_purchased)
  • view_sessions (sessions)
    • Sessions where the product was viewed.
    • Example: COUNT_DISTINCT(view_sessions)
  • cart_sessions (sessions)
    • Sessions where the product was added to cart.
  • quantity_added_to_cart (items)
    • Items added to cart from online store sessions.
  • product_impressions (events)
    • Tracked product_impression events captured when a product tile enters the shopper’s viewport.
    • Example: SHOW product_impressions
  • product_hovers (events)
    • Tracked product_hover events captured when a shopper hovers over a product tile on desktop.
    • Example: SHOW product_hovers
  • product_touches (events)
    • Tracked product_touch events captured when a shopper taps or long-presses a product tile on mobile.
    • Example: SHOW product_touches
  • hover_rate (rate)
    • Product hovers divided by product impressions. Useful for measuring tile-level interest on desktop.
    • Example: SHOW hover_rate
  • touch_rate (rate)
    • Product touches divided by product impressions. Useful for measuring tile-level interest on mobile.
    • Example: SHOW touch_rate
Engagement metrics depend on product_impression, product_hover, and product_touch events. The Storefront Pixel emits these automatically. Custom integrations must send them through the Tracking API.

Dimensions

  • geo_country: Two-letter country code.
  • geo_state: Up to three-letter province code.
  • geo_city: City name as captured.
  • marketing_source: UTM source.
  • marketing_medium: UTM medium.
  • marketing_campaign: UTM campaign.
  • device_type: Device category.
  • variant_id: Variant ID.

Product attributes (dynamic)

  • Usage: Use product_attributes.* to group or segment by dynamic product attributes defined in your catalog.
  • Examples:
    GROUP BY product_attributes.color
    GROUP BY product_attributes.size
    SEGMENT BY product_attributes.material
    

Examples

Sales by product (last 7 days)
FROM products
SHOW SUM(total_sales)
GROUP BY product_id
SINCE -7d
Views by campaign (this month)
FROM products
SHOW COUNT_DISTINCT(view_sessions)
GROUP BY marketing_campaign
SINCE this_month
Sales by color (past 30 days)
FROM products
SHOW SUM(total_sales)
GROUP BY product_attributes.color
SINCE past_30_days
Top products by impressions (last 30 days)
FROM products
SHOW product_impressions
GROUP BY product
SINCE -30d
Hover rate trend (last 30 days)
FROM products
SHOW hover_rate
SINCE -30d
COMPARE TO previous_period

Next steps