Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello Shopify community,
I am working with Shopify's Custom Pixel and have encountered a localization issue that I'm hoping to get some assistance with. Specifically, when I subscribe to the 'product_viewed' event, I've noticed that the event.data.productVariant.title value is automatically localized based on the user's locale. For example, if a user is on the Italian locale, the product name is returned in Italian.
Here is a snippet of the code I am using:
analytics.subscribe('product_viewed', (event) => { const productPrice = event.data.productVariant.price.amount; const productTitle = event.data.productVariant.title; const payload = { event_name: event.name, event_data: { productPrice: productPrice, productTitle: productTitle, }, }; // ... rest of the code to handle the event });
My store's default language is Romanian and for consistency in my analytics, I need the product titles to always be in Romanian, regardless of the user's current locale.
Is there an API or a command that can be used to ensure that the product titles are always returned in the store's default language, rather than being localized?
Thank you in advance for your help!
Hi,
Use Shopify's storefront API to fetch product data in Romanian
Query example
{
productByHandle(handle: "your-product-handle") {
title
variants(first: 10) {
edges {
node {
title
}
}
}
}
}
I just found out that there is a property called untranslatedTitle which can be used, thank you.
If you find difficulty in coding you can go for a paid Shopify developer
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025