Tags:
- Admin GraphQL API
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: , , , and .
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
, with support for pagination. - Update: Modify the metric, name, amount, time period, or filters.
- Delete: Remove targets using
. Deleted targets can't be recovered.
Key details
- Scope: Requires
andpermissions. - Deduplication: The API uniquely identifies each target by its metric, date range, and filters. Attempting to create a duplicate results in a
with 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
statement of ShopifyQL using=oroperators.
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 enum values
API version 2026-04 adds two new enum values to in :
: Represents a dimensionless numeric score with no associated unit. Applied to web performance metrics:,,,(Cumulative Layout Shift percentiles).: Represents a ratio or multiplier value (for example, 3.2x). Applied to(Return on ad spend).
These metrics previously returned . This change doesn't affect callers on API versions prior to 2026-04.