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!