I have 3 websites in my current Magento installation and are as follows website1
Code: base, website2
Code: au, website3
Code: ca. Each website has one
store and one
store_view except for website3 which has 2
I want the users to be automatically navigated to a specific website based on their country. For example, all users with the country code
US to be navigated to website1.
I have checked that ipinfo.io provides country code through an API call as follow
# Get country ISO code as plaintext $ curl ipinfo.io/126.96.36.199/country?token=$TOKEN US
Can anyone help with its implementation for my Magento 2.2.6 instance?