Show CMS content based on geolocation

Hi everybody!

My project is a beauty salons marketplace. There are cards shown on the main page of the website. Each card is the salon from CMS. I want to show nearby salons based on the visitor’s geolocation in a separate section called for example “Nearby salons” when a user visits the page.

How can I set up this using a custom code or maybe a special service?
Anyone experienced it? I would be grateful for any advice!
Thank you!

Yes it’s a bit of work to setup and there are some important caveats;

  • if you’re trying to make it easy to use, you’ll use geoIP lookups which are vague. In most places you won’t get the correct city, but you’ll generally get the correct state and the country is quite reliable.
  • if your salons are near to each other, you may not get a lot of value.
  • you can get better accuracy generally on most phone networks
  • you can get much better accuracy if you research how to use the browser’s location features, and if the user grants permission.

The basic design is this-

  • Translate all of your salon locations to a latitude and longitude
  • Get the user’s lat/long as accurately as you can
  • Calculate the distance for each, from the user
  • Sort ascending on that distance

Unfortunately there aren’t any magic solutions here, just a bunch of data prep and custom code.

If you don’t know how to code or don’t want to hire a dev, you might look into Jetboost’s new mapping solution, it may have some CMS integration and distance calc features if you’re lucky, for a monthly fee.

Yeah… of course the setup is complex. Thank you for your reply!


I noticed you might be seeking assistance, and I wanted to offer my help. If you’re open to paid support, I have the expertise to assist you with your needs.

Feel free to share more details about what you’re looking for, and we can discuss how I can provide valuable assistance.

Looking forward to the possibility of working together.

1 Like