Analytics metric targets now available in the GraphQL Admin API
You can now create and manage metric targets for merchants using four new GraphQL Admin API operations: analyticsTargets, analyticsTargetCreate, analyticsTargetUpdate, and analyticsTargetsDelete.
With targets, merchants can set numeric goals for analytics metrics, such as "achieve $50K in gross sales this quarter," and track their progress with a visual gauge. The API has been available to apps from the start, enabling you to build on the same foundation that supports targets in the Shopify admin.
Whether you're developing a goal-setting tool, a reporting dashboard, or a planning app, you can now read and write the same targets that merchants view in their analytics, using the same API, rules, and validation.
What you can do
- Create: Specify a metric, target amount, time period, and an optional filter (for example, limit to a specific sales channel or product).
- Read: Retrieve targets for a shop using
analyticsTargets, with support for pagination. - Update: Modify the metric, name, amount, time period, or filters.
- Delete: Remove targets using
analyticsTargetsDelete. Deleted targets can't be recovered.
Key details
- Scope: Requires
read_reportsandwrite_reportspermissions. - Deduplication: The API uniquely identifies each target by its metric, date range, and filters. Attempting to create a duplicate results in a
userErrorwith guidance on necessary changes. - Status computation: The API automatically derives the status field (In progress, Achieved, Not achieved, Upcoming) from the target's date range and current metric value at query time.
- Filters: Each target can have one dimension-based filter in the
WHEREstatement of ShopifyQL using=orINoperators.
Use cases
- Goal-setting apps: Create targets for merchants based on historical performance or industry benchmarks, providing smart defaults.
- Reporting and BI tools: Access merchant targets and display progress alongside your visualizations, ensuring consistency with Shopify.
- Planning and forecasting apps: Integrate external goals into Shopify Analytics, offering merchants a unified place to track all targets.
- Agency dashboards: Programmatically set and monitor targets across multiple client stores.
Targets created by your app appear alongside merchant-created targets in the Shopify admin, on the Targets index page with their own target gauge, and on merchant dashboards. Merchants can manage them consistently, regardless of their origin.
Related: new ColumnDataType enum values
API version 2026-04 adds two new enum values to ColumnDataType in ShopifyqlTableDataColumn:
UNITLESS_SCALAR: Represents a dimensionless numeric score with no associated unit. Applied to web performance metrics:p50_cls,p75_cls,p90_cls,p99_cls(Cumulative Layout Shift percentiles).MULTIPLIER: Represents a ratio or multiplier value (for example, 3.2x). Applied toshop_campaign_return_on_ad_spend(Return on ad spend).
These metrics previously returned FLOAT. This change doesn't affect callers on API versions prior to 2026-04.
Fetched May 26, 2026


