How to get IP address of visitors on your Shopify store
Detecting the IP address of your website’s users is useful for a variety of reasons. In this article you’ll learn how to retrieve the user IP easily with a couple of tricks.
We are using service from jsonip.Com (JSonIP) to get IP address of visitor.
var ip_address = window.JSON.parse(JSON.stringify(data, null, 2));
ip_address = ip_address.ip;
//Execute Your Code
I hope it’s helpful for you.