0

Does anyone know how to have a phone number & link to appear based on the visitors Geolocation or IP address? For instance, lets say I have 5 locations across 2 different states. I want to have the phone number in the header to show the phone number of the location that is closest to the person who is visiting the website.

Zerojjc
  • 21
  • 10

1 Answers1

0

You can pull some info from geolocation of the IP address. E.g. http://whois.arin.net/ui/

You can also ask the user's browser for their location: https://developers.google.com/web/fundamentals/native-hardware/user-location/

You would need to extend the above method using browser detection to include other browsers than just Chrome.