get_product_analytics
Get Shopify product sales analytics — units sold and revenue per product from ShopifyQL. Requires Shopify Plus or Advanced. NOTE: Views, add-to-cart, and purchase funnel counts are no longer available from ShopifyQL (Shopify removed these fields) — use get_marketing_performance for funnel analysis or get_analytics(ecommerce) for GA4-based product funnel data. Reports: summary (total units/revenue), top_products (ranked by revenue or units sold), product_detail (daily units/revenue for a specific product).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of results (default: 20) | |
| report | Yes | Report type | |
| sortBy | No | For top_products: sort field (default: revenue) | |
| _offset | No | Pagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page. | |
| endDate | No | End date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today). | |
| productId | No | For product_detail: Shopify product ID | |
| startDate | No | Start date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday. |