For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hello,
We have developed a Shopify app and are working to migrate our integration to web pixels to make it more reliable, but we have hit a blocker.
Our APIs require that we know the storefront's locale (Shopify.locale on the website) but we haven't found a way to access this information from the app web pixel context. We have tried using init.context.navigator.language, but just as the documentation says, we are getting the browser's language and not the store language.
We have found a workaround where we use app blocks to inject code which sends a custom event with Shopify.locale to the web pixel, but this means that the merchant who installs our app needs to go in and manually enable the theme app extension (Shopify requirement), which creates more friction and goes against our goal of having a plug-and-play integration.
Please let us know if there is a way to access this information from the app web pixel context. If not - it would be great if thie could be expose in the init object for the web pixel. I am sure we are not the only ones who need this information.
Thanks,
Yavor