Store change using "localization.country.iso_code" based on user location

Topic summary

Switching between two Shopify stores (e.g., US/AU) based on user location is the goal. The proposed approach is to read localization.country.iso_code and trigger a JavaScript redirect.

Key question: How accurate is localization.country.iso_code, and is it sufficient, or should a geo-location service/app be used?

One reply recommends using an app, but provides no technical reasoning or specifics. The original poster asks for the rationale, wondering if localization.country.iso_code is unreliable in some countries, and states a preference to avoid apps.

Technical term: localization.country.iso_code refers to the user’s country code (ISO format) exposed in Shopify themes.

No decisions or implementation steps were finalized. No evidence or examples were provided regarding accuracy or edge cases.

Status: Unresolved; the accuracy of localization.country.iso_code and the necessity of a dedicated geo-location app remain unanswered. No attachments, images, or code snippets are central to the discussion.

Summarized with AI on January 13. AI used: gpt-5.

Hi,

I need to shift between 2 shopify stores (ex US/AU) based on the user location.

Is it ok to use ‘localization.country.iso_code’ to check the country and redirect using javascript.

Is it always accurate? Or do i have to user geo location service or app.

Thank you!

Nal

Hi,

It is better to use app

Hi @Small_Task_Help ,

Is there any reason, Is the 'localization.country.iso_code" not returned correctly in all countries? I’m trying to avoid apps as much as possible.

Thank you!