Admin GraphQL API / New feature

Analytics metric targets are now
readable and writable via the GraphQL Admin API

Numeric goals (metric targets) like "$50K in total sales this quarter" can now be created, retrieved, updated, and deleted from your app using four new operations. You can work with the same targets merchants see in the admin, through the same API, the same rules, and the same validation.

What's on this page
  1. In 30 seconds: what's now possible
  2. How it works: the flow between your app and Shopify Analytics
  3. Four operations (CRUD)
  4. Key specs to know (scope / duplicates / status / filters)
  5. Status is calculated automatically
  6. Related: two enums added to ColumnDataType
  7. Five points developers should know
  8. Three use cases to put into practice
  9. A one-line summary for your pitch

1In 30 seconds: what's now possible

In Analytics, merchants set anumeric goal (metric target)like "$50K in total sales this quarter" and track progress on a gauge.
Now, those targets can be created, retrieved, updated, and deleted from your app via four GraphQL Admin API operations. Apps can use the same foundation that powers Targets in the admin.

Before: inside the admin only

Setting targets and checking progress happened entirely within Analytics in the Shopify admin. External goal-setting tools and BI tools couldn't touch them.

Now: two-way via the API

Apps can read and write targets, and targets created by an app appear on admin and dashboard gauges alongside those created by merchants.

2How it works: the flow between your app and Shopify Analytics

App Goal setting / BI / Planning read_reports / write_reports create/update read (progress) GraphQL Admin API analyticsTargetCreate analyticsTargets (read) analyticsTargetUpdate analyticsTargetsDelete Shopify Analytics The same target store Merchant's admin 68% Targets page Dashboard
Targets created by an app are displayedwith no distinction fromthose a merchant created by hand, on the dedicated gauge of the Targets list page and across dashboards. Regardless of origin, merchants can manage them consistently.

3Four operations (CRUD)

Create

analyticsTargetCreate

Create one by specifying a metric, target value, period, and an optional filter (e.g., limited to a specific sales channel or product).

Read

analyticsTargets

Retrieve a shop's targets. Supports pagination.

Update

analyticsTargetUpdate

Lets you change the metric, name, target value, period, and filter.

Delete

analyticsTargetsDelete

Delete a target.A deleted target cannot be restored.

analyticsTargetsDelete uses a plural name (targets). Since deletion is irreversible, it's safest to add a confirmation step in the UI.

4Specs worth knowing

ItemDetails
Scope read_reports and write_reports permissions are required.
Deduplication A target is uniquely identified by the combination of metric, period (date range), and filter. If you attempt to create a duplicate, you get back a userError that guides you to the necessary changes.
Status calculation From the period at query time and the current metric value, thestatus field (In progress / Achieved / Not achieved / Upcoming) is automatically derived by the API.
Filter Each target can have, in its ShopifyQL WHERE clause, one dimension-based filter. The operator is = or IN.
Because the dedup key is clearly "metric × period × filter,"idempotent sync logicis easy to build. The standard design is to fall back to an update rather than a create when the same three elements match.

5Status is calculated automatically

status is not a stored value; it's derived each time from the "period" at query time and the "current metric value." Your app doesn't need to compute or store the status itself.

Period (date range) + current metric value The API derives status Upcoming (not yet started) In progress (ongoing) Achieved (met) Not achieved (not met) The app just displays status as-is, nothing more

6Related: the two enums added to ColumnDataType

In API version 2026-04 ,ShopifyqlTableDataColumn 's ColumnDataType now has two new values added. Previously, FLOAT was the value returned by the affected metrics.Callers using a version earlier than 2026-04 are unaffected.

New enum

UNITLESS_SCALAR

A dimensionless score value with no unit. Applied to web performance metrics: p50_cls / p75_cls / p90_cls / p99_cls(the Cumulative Layout Shift percentile).

New enum

MULTIPLIER

A value representing a ratio or multiplier (e.g., 3.2x).shop_campaign_return_on_ad_spend(return on ad spend / ROAS) is where it applies.

Code that parses these metrics on the assumption of FLOAT will, when upgrading to 2026-04, need to add handling for UNITLESS_SCALAR / MULTIPLIER . Also review the display format ("3.2x", etc.) at the same time.

75 points developers should keep in mind

1. Two required scopes

Even for reads, read_reportsis required; for create, update, and delete, write_reports is required. Be sure to include them in your app's access scope request.

2. The unique key has three parts

Duplicates are detected by "metric × period × filter." Creating an already-existing key userError. Design your sync as "create if missing, update if present" and it won't collide.

3. status is read-only

In progress / Achieved / Not achieved / Upcoming are derived automatically at query time. Don't compute or store them yourself. They switch over naturally as the period or values change.

WHERE

4. One filter only; operators are = / IN

ShopifyQL's WHERE can hold only one dimension filter. ANDing multiple conditions isn't allowed. For per-sales-channel or per-product targets, create separate targets.

app admin

5. App-created targets and merchant-created targets are on the same footing

Targets your app creates also appear in the Targets list and dashboard with the same gauge, and merchants can edit or delete them directly.Assume they may be overwritten from outside your app, so design your sync to be idempotent and able to detect diffs.analyticsTargets supports pagination, so you can scan every record.

83 use cases you can put to work

Goal
USE CASE 1

Goal-setting app: suggest "smart default values" from past performance and benchmarks

Challenge
It's hard for merchants to set target values from scratch, and goals set on a hunch easily become hollow.
Solution
Based on past performance and industry benchmarks,analyticsTargetCreate auto-generates smart initial goals, suggesting the period and metrics together.
Impact
Merchants get well-grounded goals with no setup effort, and the goals they create show up right on the gauge in the admin.
Technical notes
"Metric × period × filter" is the dedup key. On re-suggestion, rather than creating, lean toward analyticsTargetUpdate and avoiduserError .
USE CASE 2

Reporting / BI tools: overlay "Shopify-aligned goals" onto your own visualizations

Challenge
Drawing your own goal lines on a BI dashboard clashes with the numbers in the Shopify admin, leaving merchants confused.
Solution
analyticsTargets lets you read the merchant's goals and overlay progress and achievement onto your own charts.
Impact
You can show goals and progress that match Shopify exactly, eliminating the number discrepancies between tools.
Technical notes
status is auto-derived by the API, so use it as-is instead of computing it yourself. For stores with many records, fetch them all with pagination.
Store A Store B Store C
USE CASE 3

Agency dashboard: set and monitor goals for multiple client stores in bulk

Challenge
Goal management for multiple client stores is done by hand, logging into each store's admin one by one.
Solution
Programmatically create, update, and monitor goals with 4 operations.analyticsTargets is fetched across stores, surfacing a consolidated view of the stores that are Not achieved.
Impact
Automates goal setting and progress tracking across stores; it can also be repurposed for alerts and weekly reports.
Technical notes
Each store first needs read_reports / write_reports granted; since deletion is irreversible, a cross-store bulk analyticsTargetsDelete must require a confirmation flow.

9One-line summary for your pitch

"Thenumeric goalsthat merchants set in Analytics — through the GraphQL Admin API's 4 operations, you can nowread and write them from your app."
Goal-setting / BI / planning / agency tools, in perfect sync with the admin,Perfectly matched targets and gaugescan be handled with the same API, rules, and validation."