Emitting Data
App users and app developers can publish custom customer events from online store theme liquid files, theme app extensions, checkout UI extensions and customer account UI extensions. When custom customer events are published they can be accessed by all custom pixels and app pixels.
Anchor to publishing-custom-eventsPublishing custom events
The analytics.publish
method is available in different contexts for publishing custom events. The analytics.publish
method takes an and some
as parameters. The object passed into the
field is shared with subscribers to the event using the
field. If you haven't set up a way for users to define custom transformation of payloads, then your app pixels might not be able to parse these custom fields. Custom pixels, though, can be changed by the users to translate custom fields to a service’s required format.
In Checkout and Customer Accounts, you can publish custom events from your UI extensions. For more information, refer to the analytics checkout extension point on the StandardApi.
To ensure the quality of standard events, partners and merchants cannot publish standard events. Shopify.analytics.publish
only exposes the method to publish custom events.
To avoid collision with standard events, custom events should be prefixed with the app name or a unique identifier. For example, .
Publishing Custom Events
Anchor to subscribing-to-custom-eventsSubscribing to custom events
You can subscribe to custom events like you would standard events. Anything published to the custom event is passed to the field.
Custom events can be published by users, other developers and even visitors from their browser console. Be mindful when processing any custom events.
Subscribing to Custom Events

Anchor to visitor-apiVisitor API
The analytics.visitor
method helps merchants to identify visitors to their store. The method is primarily intended for use cases involving visitor-provided information to aid Shopify, and app features that use the data to enhance the customer experience.
For example, if a visitor submits their email address to receive a 30% off coupon, then the email can be relayed to a Partner app using Server Pixels to power loyalty features. The storefront experience can be personalized based on existing information that the merchant already has about the customer. It's important to ensure that, when utilizing this API, all necessary notices and consent in the visitor's region are provided.
After integrating successfully, you’ll need to inform Partner Support for the data to be processed. Failure to do so will mean that the data is not utilized by the merchant’s shop.
App developers should provide an to identify themselves when they call the visitor API on the online store. Calling the visitor API without providing an
can degrade data quality, which makes it difficult for merchants to manage their data. To find your
, you can use the GraphQL Admin API. In UI Extensions, you don't need to provide an
because these are managed automatically.