See all services → Shopify Plus Partner
API Developer

Read and set metaobject analytics flags in Admin API

Admin API 2027-01 exposes the analyticsQueryable capability on metaobject definitions, so provisioning scripts can decide which custom data types reach analytics instead of someone toggling it by hand.

Executive summary

What changed

You can now read MetaobjectCapabilities.analyticsQueryable, which returns two booleans. The first, eligible, tells you whether the definition is allowed to use the capability at all: a definition qualifies when at least one of its fields uses an analytics-compatible type. The second, enabled, tells you whether it is currently switched on.

You can also set it at write time through analyticsQueryable on the metaobject capability create and update inputs, with the enabled flag inside. The MetaobjectCapabilityType enum gains ANALYTICS_QUERYABLE, and MetaobjectUserErrorCode gains CAPABILITY_NOT_ELIGIBLE for definitions that cannot turn it on.

The change is version-gated. Apps on earlier API versions do not see the field, the input, the enum value or the error code, and nothing about their existing behaviour changes.

Why it matters

Enterprise merchants model a surprising amount of their catalogue in metaobjects: care instructions, size and fit charts, ingredient panels, store locators, contract terms for B2B buyers. Until now, making any of that queryable in analytics was a manual, per-definition action in admin. Manual steps do not survive store cloning or environment promotion, so a new regional store or a rebuilt staging environment quietly ended up with a different reporting surface than production.

Putting the flag in the API means definition provisioning can be fully declarative. If you manage custom data as code, the analytics posture travels with the definition rather than living in a runbook. For merchants whose custom attributes originate upstream in a product information system, that also closes a gap between what the PIM pushes into Shopify and what the merchandising team can actually report on.

Role-specific impact

Use-case example

Real-world scenario

A merchant operating six regional stores maintains eleven metaobject definitions for product specification content. Promoting a definition set after each release meant a reviewer spending roughly twenty minutes per store re-enabling analytics on the definitions that needed it, about two hours of manual work per release. Folding the capability into the provisioning mutation removes that step entirely and removes the inconsistency it caused between markets.

Implementation checklist

  1. Decide which metaobject definitions genuinely need to be queryable in analytics.
  2. Move the app or provisioning script to GraphQL Admin API version 2027-01 or later.
  3. Add the capabilities block with analyticsQueryable to your definition read queries.
  4. Check eligible before attempting to enable the capability on any definition.
  5. Set analyticsQueryable.enabled in your create and update capability inputs.
  6. Handle CAPABILITY_NOT_ELIGIBLE in mutation user errors with a message that explains the field-type requirement.
  7. Add the flag to store provisioning scripts so new stores inherit it.
  8. Confirm in admin analytics that the expected definitions now appear.

FAQ

Q: Do we need to change anything if we stay on an earlier API version?

A: No. Earlier versions do not expose the field, input, enum value or error code, and existing apps keep working unchanged. This is only worth adopting if you want your app to control analytics queryability.

Q: Why would a metaobject definition be ineligible?

A: Eligibility requires at least one field using an analytics-compatible type. A definition built entirely from unsupported types reports eligible as false and returns CAPABILITY_NOT_ELIGIBLE if you try to enable it.

Resources

Metaobjects in Shopify apps

Need guidance? Talk to Makro.