Shopify GraphQL Admin API Adds Analytics Targets Operations (2026‑04)
Add the four new GraphQL Admin API operations—analyticsTargets, analyticsTargetCreate, analyticsTargetUpdate, analyticsTargetsDelete—to create, read, update, and delete merchant analytics targets, and update your app to use API version 2026‑04.
Implement the new analyticsTargets operations in your app and migrate to API version 2026‑04 to support target creation, reading, updating, and deletion.
Summary
Shopify has introduced four new GraphQL Admin API operations—analyticsTargets, analyticsTargetCreate, analyticsTargetUpdate, and analyticsTargetsDelete—in API version 2026‑04, allowing developers to create, read, update, and delete merchant analytics targets programmatically. The new operations require read_reports and write_reports scopes, and the API automatically deduplicates targets by metric, date range, and filters, returning a userError if a duplicate is attempted. Status of each target (In progress, Achieved, Not achieved, Upcoming) is computed on query time based on the target’s date range and current metric value. Each target may include a single dimension‑based filter via a ShopifyQL WHERE clause using = or IN operators. Additionally, the API adds two new ColumnDataType enum values—UNITLESS_SCALAR for dimensionless numeric scores like p50_cls and MULTIPLIER for ratio values such as shop_campaign_return_on_ad_spend—replacing the previous FLOAT type for those metrics. These changes enable goal‑setting, reporting, and planning apps to fully synchronize with Shopify’s native target management, providing a consistent user experience across merchant dashboards and admin interfaces.
Key changes
- analyticsTargets query retrieves targets with pagination.
- analyticsTargetCreate mutation creates a target with metric, amount, period, and optional filter.
- analyticsTargetUpdate mutation modifies target fields such as metric, name, amount, period, or filters.
- analyticsTargetsDelete mutation removes a target; deleted targets cannot be recovered.
- Requires read_reports and write_reports scopes.
- Duplicate creation returns a userError; deduplication is based on metric, date range, and filters.
- Status field is auto‑computed (In progress, Achieved, Not achieved, Upcoming) at query time.