How to Store and Retrieve Data Using Webpixel?

Hi there,
I am working with Webpixel. Where is the data stored when it is sent to Webpixel, and how can I retrieve that data?
Eg:

 import {
  useApi
} from '@shopify/ui-extensions-react/checkout';

export function useAnalytics () {
  const { analytics } = useApi();

  analytics.publish('custom-product-added', {});
}

I also looking a way to retrieve data of Webpixel from Checkout UI Extension

The events, and related data, can be accessed by any other custom and app pixels.

Read more about it here: Emitting Data

1 Like

Thank you for your response,

But i need to retrieve data to so it at app admin, not emitting data.

@curzey linked the right documentation. analytics.publish only passes the payload to Web Pixels (sandboxed tracking scripts) on the same page. It is not stored anywhere by design.

It is just made available to merchants (custom pixels) and partners (app pixels) for further processing and tracking, through third party services, like Google Analytics or any backend server.

If you’d like your app to retrieve this data in the admin, you’ll have to setup your own backend to store the data for that shop and retrieve it in the admin.

1 Like

Thank you @emileber for sharing information about WebPixel.

1 Like