Skip to main content

New Shop Campaigns metrics and dimensions in ShopifyQL API version 2026-10

Starting in API version 2026-10, ShopifyQL adds Shop Campaigns fields to two schemas. The shop_campaign_insights schema adds a shop_campaign_orders metric and country and country_code dimensions. The sales schema adds four Shop Campaign dimensions, so you can break down sales by the campaign that drove them.

What changed

The shop_campaign_insights schema adds these fields:

FieldTypeDescription
shop_campaign_ordersMetricNumber of orders associated with Shop Campaigns.
countryDimensionBilling country for orders associated with Shop Campaigns.
country_codeDimensionTwo-letter ISO 3166-1 alpha-2 code for the billing country, such as US or CA.

For example, this query returns campaign orders and ad spend by country for the last 30 days:

FROM shop_campaign_insights SHOW shop_campaign_orders, shop_campaign_ad_spend GROUP BY country_code SINCE -30d

The sales schema adds these dimensions. Each one describes the Shop Campaign associated with the order:

FieldDescription
shop_campaign_nameName of the Shop Campaign.
shop_campaign_handleMerchant-facing handle of the Shop Campaign associated with the order.
shop_campaign_target_nameName of the customer segment the campaign targeted, such as New customers.
shop_campaign_currency_codeCurrency code for local monetary fields on the Shop Campaign order.

These dimensions work with any sales metric. For example:

FROM sales SHOW total_sales, orders GROUP BY shop_campaign_name SINCE -30d

Sales from orders that aren’t associated with a Shop Campaign return null for these dimensions, so they appear as a separate null group in grouped results.

Who’s affected

Apps that run ShopifyQL queries on version 2026-10 or later. Queries on 2026-07 and earlier don’t include these fields.

What to do

No action is required. To use the new fields:

  1. Update your GraphQL Admin API requests to version 2026-10.
  2. Add the fields to your ShopifyQL queries.
  3. Test against a development store that has at least one Shop Campaign with orders.

Related docs

Was this page helpful?