Unlock Shop Campaigns Insights with ShopifyQL

Shop Campaigns performance data is now queryable via ShopifyQL, giving developers and merchants deeper analytics without extra scopes. Learn what changed, who it impacts, and how to start pulling campaign metrics today.

Unlock Shop Campaigns Insights with ShopifyQL
5 sections

Shopify just opened a new window into advertising performance. The latest developer changelog adds the shop_campaign_insights schema to ShopifyQL, letting apps fetch campaign‑level metrics—like spend, sales, ROAS, and more—directly from the same query endpoint you already use. No new OAuth scopes, no extra integration steps, just a richer data set you can embed in dashboards, reports, or custom automations.

What Changed: shop_campaign_insights in ShopifyQL

The shop_campaign_insights schema is now part of the ShopifyQL ecosystem. It surfaces both campaign‑level and segment‑level metrics, supporting time dimensions from hourly to yearly and respecting the merchant’s shop timezone. In practice, you can query fields such as ad_spend, sales, orders, roas, average_order_value, and average_customer_acquisition_cost by campaign name, customer segment, or any date range you need.

Who Is Affected?

*Developers* building analytics, reporting, or marketing automation apps are the primary audience. If your app already uses the shopifyqlQuery field with the read_reports scope, you can start pulling campaign data immediately. *Merchants* benefit indirectly—any third‑party app that surfaces these insights will give them a clearer picture of ad spend efficiency, helping them allocate budgets smarter.

How to Query Shop Campaigns Data

The query works exactly like any other ShopifyQL request. Below is a minimal GraphQL example that fetches spend, sales, and ROAS for a specific campaign over the last 30 days. Note the use of triple‑quoted strings for readability; you can also build the query dynamically in your language of choice.

graphql

{

shopifyqlQuery(

query: """

SELECT campaign_name, ad_spend, sales, roas

FROM shop_campaign_insights

WHERE campaign_name = 'Summer Sale'

AND date >= '2024-06-01'

"""

) {

rows

}

}

The response returns a rows array where each element corresponds to a time bucket (hourly, daily, etc.) depending on the granularity you requested. From there you can feed the data into charts, CSV exports, or trigger alerts when ROAS dips below a threshold.

Embedding Metrics with Analytics Web Components

If you want to display campaign KPIs without managing a data store, Shopify’s new Analytics Web Components are a shortcut. Drop the <shopify-analytics-metric> tag into your app UI, point it at the shop_campaign_insights schema, and the component renders a live metric card—complete with timezone handling and automatic refresh.

html

<shopify-analytics-metric

schema="shop_campaign_insights"

metric="roas"

filter="campaign_name='Summer Sale'"

period="daily"

></shopify-analytics-metric>

Because the component pulls directly from Shopify’s analytics backend, you don’t need to store or cache the data yourself, reducing compliance overhead and simplifying your architecture.

Next Steps for Developers and Merchants

  • Update your app’s query library – Ensure you’re using the latest shopifyqlQuery endpoint version. No code changes are required if you already have a generic query wrapper, but add the new schema name to your whitelist if you enforce schema validation.
  • Test with real data – Use a development store that runs active Shop Campaigns. Run the sample query above and verify the shape of rows.
  • Add UI components – Consider the Analytics Web Component for quick dashboards or build custom React/Vue charts using the raw data.
  • Leverage Annotations – The Analytics Annotations API lets you tag charts with events like "campaign started" or "budget increased," giving merchants contextual insight right on the graph.
  • Merchants should reach out to their app partners and ask whether the app now surfaces Shop Campaigns metrics. If you build the reports yourself, schedule a walkthrough to show how ROAS trends correlate with ad spend changes—this builds trust and demonstrates the value of the new data.

    By tapping into shop_campaign_insights today, you future‑proof your analytics stack and give merchants the granular visibility they need to optimize advertising ROI.

    Ready to level up your analytics? Start querying the new schema now, embed live metrics with Web Components, and let your merchants make data‑driven campaign decisions faster than ever.

    Tags
    Sources

    Related Articles

    Shopify Storefronts Now Support UCP 2026‑08‑25 – What Developers Need to Know
    Platform Updates

    Shopify Storefronts Now Support UCP 2026‑08‑25 – What Developers Need to Know

    Shopify’s storefronts now advertise support for the Universal Commerce Protocol version 2026‑08‑25, enabling seamless capability negotiation for platforms and agents. Learn what changed, who’s impacted, and the exact steps you should take.

    September 4, 20263 min
    Staff Can Now View Customers’ Online Carts Directly in Shopify POS
    Platform Updates

    Staff Can Now View Customers’ Online Carts Directly in Shopify POS

    Shopify POS v11.14 now lets authorized staff see an identified customer’s abandoned online cart at checkout. Learn who this impacts, how to enable the permission, and actionable steps to boost in‑store conversions.

    September 3, 20263 min
    Hydrogen Developer Preview Unleashed: Variant Links, Cart Refresh, and Local HTTPS Made Simple
    Platform Updates

    Hydrogen Developer Preview Unleashed: Variant Links, Cart Refresh, and Local HTTPS Made Simple

    Shopify’s Hydrogen preview adds variant‑specific links, automatic cart refresh, and one‑command local HTTPS certificates—essential upgrades for developers building custom storefronts. Learn what changed, who’s impacted, and how to implement them today.

    September 3, 20264 min
    Instant Connectivity Insight: New POS Home Status Icon
    Platform Updates

    Instant Connectivity Insight: New POS Home Status Icon

    Shopify POS now shows a real‑time connectivity icon right on the Home screen, letting staff confirm device readiness before checkout. Learn what changed, who it impacts, and how to make the most of this seamless update.

    September 1, 20264 min