Solved

How to show content based on GEO location?

michalc
Tourist
11 2 2

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?

Best regards,

Michal

Accepted Solutions (2)

eStoreSpeed
Explorer
43 6 12

This is an accepted solution.

Hi Michal,

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.

Best,

eStoreSpeedOptimization

Subscribe to Shopify speed improvement newsletter (we never spam)
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

View solution in original post

michalc
Tourist
11 2 2

This is an accepted solution.

Please send me an guide. I will try it myself and if it wont work, I will contant an Shopify expert.

View solution in original post

Replies 6 (6)

JHKCreate
Shopify Expert
3571 639 917

Hello Michal,

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

 

Thanks

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com
michalc
Tourist
11 2 2

This is an accepted solution.

Please send me an guide. I will try it myself and if it wont work, I will contant an Shopify expert.

o0ojohano0o
Tourist
3 0 0

Hello Michal! How did you end up with this issue? I aswell have a similar problem.

Saima-Babar
Shopify Partner
3 0 0

No, You didn't solve my problem... Please explain the code not recommend the app.

eStoreSpeed
Explorer
43 6 12

This is an accepted solution.

Hi Michal,

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.

Best,

eStoreSpeedOptimization

Subscribe to Shopify speed improvement newsletter (we never spam)
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

John_Wyldcode
Visitor
1 0 0

Hello there,

We have an app that will help you with exactly what you are looking for.

https://apps.shopify.com/advanced-geo-functions

Our Advanced Store Localization app is a flexible geo-targeting / geofencing solution for Shopify stores, allowing store owners to set country-specific products, pages, and currency, displaying content based on the shopper"s country.  It's also free to try for 7 days.

 

Hide products on your Shopify for specific countries!

Hide entire collections on your Shopify for specific countries!

Dozens of features!

 

For each zone, you can:

  • Select which products are displayed
  • Auto-redirect between regional products & collections
  • Filter per-product or by collections, types, vendors, tags
  • Select which pages are displayed
  • Block visitors based on their location
  • Country redirect
  • Multi-Store redirection
  • Display localized phone numbers and email addresses
  • Reorganize content on the page to mask localization effects
  • Display/Hide page sections per region
  • Execute custom JS

If you have questions, feel free to email us at info@e-dimensionz.com 

Have a great day!

John

e-dimensionz Inc