Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.
Analytics API
The API for interacting with web pixels.
Anchor to StandardApiStandard Api
The base API object provided to purchase extension targets.
- Anchor to analyticsanalyticsanalyticsAnalyticsAnalyticsrequiredrequired
The methods for interacting with Web Pixels, such as emitting an event.
Analytics
- publish
Publish method to emit analytics events to [Web Pixels](/docs/apps/marketing).
(name: string, data: Record<string, unknown>) => Promise<boolean> - visitor
A method for capturing details about a visitor on the online store.
(data: { email?: string; phone?: string; }) => Promise<VisitorResult>
VisitorResult
Represents a visitor result.
VisitorSuccess | VisitorErrorVisitorSuccess
Represents a successful visitor result.
- type
Indicates that the visitor information was validated and submitted.
'success'
VisitorError
Represents an unsuccessful visitor result.
- message
A message that explains the error. This message is useful for debugging. It's **not** localized, and therefore should not be presented directly to the buyer.
string - type
Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property.
'error'