It took me a while trying the Wix native solution with the Routers unsuccessfully.
We finally resorted for a simple JSON query (below). Replace IP API with the site of your choice and json.query with the variable you want to retrieve.
M y issue with IP API is that the variables are between " ", unlike other sites (but I find them the most accurate). Any advice on how to get around this in Wix?
I tried ur code. But I am always getting a US ip and address even though I am accessing my site from different country. If I go directly to https://extreme-ip-lookup.com/json , I am getting the correct details. But If I go through the wix fetch api, I am getting wrong details. Do you know any solution for it?
UPDATE: I found what was the issue. I was running ur code in the backend files. Thas why it was showing everytime US address and IP. I moved the code into my site code section and everything is working as expected. Thanks