Web Pixel Events not firing in Customer Account UI Extensions

Hey guys, hope you are doing great, question about the new Analytics API support for Customer Account UI extensions.

I created a web_pixel_extension, ran the webPixelCreate mutation, added write_pixels and read_customer_events to my scopes, and confirmed the pixel works fine on the storefront.

In the pixel code, I’m subscribing to:

  • all_events
  • customer-account-extension-loaded

I’m publishing the custom event from my Customer Account UI extension using the new analytics API (analytics.publish(…)), but nothing gets picked up by the pixel, neither the custom event nor any all_events.

One thing I noticed in the docs is this warning:

“Requires to connect a third-party domain to Shopify for your customer account pages.”

But when I go to the domain screen in the admin panel of my dev store, I just get a 404

Here’s the snippet I’m using in the Customer Account UI extension to publish the event:

analytics
  .publish(
    'customer-account-extension-loaded',
    {
      extensionName: 'My Extension',
    },
  )
  .then((result) => {
    if (result) {
      console.log(
        'succesfully published event, web pixels can now recieve this event',
      );
    } else {
      console.log('failed to publish event');
    }
  })
  .catch((error) => {
    console.log('failed to publish event');
    console.log('error', error);
  });

No errors in the console, just logs failed to publish event , so it seems like the event isn’t going through at all.

Has anyone been able to test this in a dev store?

  • Do pixels only work if a custom domain is configured?
  • Is there any current limitation with customer account pixel support on development stores?

Thanks!

1 Like

Hi Omar

If your dev store isn’t set up to use vanity domains, web-pixels won’t load at all. You should be able to setup your dev store with vanity domains though (some people have done it here).
Alternatively, I’d recommend creating a custom pixel on a shop using vanity domains and test that way.

Hello @Omar_Cardenas

I hope this message finds you well. The issue with the web pixel not functioning on your store is likely due to your custom account not being associated with a vanity domain. Additionally, the 404 error on the admin/domains page is a recognized issue with development stores, and our team is actively working to resolve it. This fix will enable domain setup for development stores. In the meantime, to test the analytics API, we recommend installing your app on a production store that has a custom domain.

Thank you for your understanding and patience.

Best regards,

Thank you @Hao_Li and @kpatel for the clarification!

That makes sense, I appreciate the context regarding the vanity domain requirement and the current 404 issue on the domains page for dev stores. Hopefully, a smoother testing flow will be available soon without needing workarounds or using production stores.

Looking forward to the fix, thanks again

1 Like