Hi shopify community,
We run two e-comm stores dedicated to magnet fishing for two German speaking countries. Because the differences in language and geographic location are minimal, we have the same site loaded from a single server on two domains - www.bravior.de and www.bravior.at. It is a masked redirect. The two stores are 100% identical. The advantage is that we save hundreds of hours of work on manual changes and additional money on applications. It is a cost-effective solution. The disadvantage, of course, is that we cannot adapt the content to the country in question - Germany or Austria - as we need right now.
This issue can be resolved by displaying content by Geo location. This would be a reliable solution that would work for, let's say, 98%. So my question is: how to set the Geo location condition via liquid, that if the country is such, then display such content and if the country is different, then display different content?
Alternatively, what other way is there to set GEO content in such a specific case of masked redirect. If there is an app from Shopify app store, which do you recommend?
Solved! Go to the solution
This is indeed possible using IPStack, it will create a country variable that you can then use inside liquid as a conditional logic
Let me know if you need assistance
This is an accepted solution.
It won't be possible to change content based on location using liquid, but it will be possible using scripts. The easiest solution is to use a geolocation app such as https://apps.shopify.com/easylocation and use their API to fetch the users location and change content based on their location. If you are not technical, it will probably require a developer to work on this.
You could also redirect users to the appropriate website based on their location using the above app.