Hello all,
I’d like some advice on the best way to approach the adjustment of content depending on the users location.
I have several pages within my app that lists various different companies and the URL’s to said company. However, I need to be able to dynamically adjust the URL’s to the companies website in accordance with the visitors country.
For example, on the index page I have ‘company .com/en-gb’ listed for UK users but this needs to change to ‘company .com/en-us’ if the user is from the United States.
I’m aware of the possibility to get the visitors IP address and thus location but this means an several API calls on every page load unless there’s a way to limit the number of calls per visitor, so they get located in the US and remain there? This is only really an issue for non-signed up users as I store their country when they register.
If the above is possible, is doing so then applying conditions to the elements/database queries the best approach? I notice other applications typically redirect you to a different page.