How detect visitor location???

Highlighted
New Member
1 0 0

 Hi all,
 I want to detect visitor location, for respective countries, open the desired subdomain(language) and currency.
Help me to find any solutions?

0 Likes
Highlighted
Shopify Partner
112 3 20

Hi,

There are many IP geolocation services you can choose from.

Here is a list, but these are not the only ones: https://underconstructionpage.com/free-paid-geoip-services/

 

Bogdan | WebShopAssist
User friendly apps with top-rated support
- SKUGen the SKU generator
- DPD Integration
0 Likes
Highlighted
Tourist
5 0 1

Please also advise on how to implement this in Shopify Code. 

like where to add it. I tried to add other custom code, but nothing works in shopify. 

0 Likes
Highlighted
Shopify Expert
3677 550 888

Hi,

follow this:

1. Go to Online Store->Theme->Edit code
2. Asset->theme.js->paste bellow code in bottom of file

 

 

$.get("https://ipinfo.io/json", function (response) {
    //here you get details in response.
}, "jsonp");

 

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
Shopify Partner
46 0 9

Hi, could you explain a little bit more this? Thanks

0 Likes
Highlighted
Shopify Expert
3677 550 888

Run my above code and you get response with current location info so you can store in db or whatever you want. when your customer visit page his API get info of current location. 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
1 Like
Highlighted
Tourist
21 0 3

Hi Everyone!!

 

A relatively simple and efficient solution is to use IP geolocation  JQuery SDK for this purpose.

  • You need a valid 'IPGeolocation API key' to use this SDK. Sign up here and get your free API key if you don’t have one.
  • Internet connection is required to run this component.

1- Add the following script (CDN link) in your HTML page:

<script src="https://cdn.jsdelivr.net/npm/ip-geolocation-api-jquery-sdk@1.0.6/ipgeolocation.min.js"></script>

2- Use the following example to get the response, add your desired IP address and IP geolocation API key in the following example:

// Get geolocation for an IP address "1.1.1.1"
setIPAddressParameter("1.1.1.1");
getGeolocation(handleResponse, "YOUR_API_KEY");

To get your required parameters, use the examples described in IP geolocation API JQuery SDK.  

 

Regards,

Ramiz

https://ipgeolocation.io

1 Like
Highlighted
Explorer
191 2 11

Hi, GEORedirect is a tool can auto direct your customers to different webpages with location-specified content.For example, localised currency.  It's easy to set up. You don't have to code.

 

Besides, Geo Targetly also provides IP Geoservice API can easily access your visitors' location, and you could customise subdomains with location-based features.

  
Hope it helps!

0 Likes
Highlighted
Tourist
5 1 1

thanks!

0 Likes
Highlighted
New Member
3 0 0

If I follow these instructions exactly ad described, where will the IP information of store visitors be found?

Go to Online Store->Theme->Edit code
2. Asset->theme.js->paste bellow code in bottom of file

$.get("https://ipinfo.io/json", function (response) { //here you get details in response. }, "jsonp");

 

Thank you.

0 Likes