How to get IP address of visitors on your Shopify store

Sell Online With Shopify
Trusted by millions of businesses worldwide
Sign up for a free trial and enjoy 3 months of Shopify for $1/month on select plans.

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.

LIVE PREVIEW

We are using service from jsonip.Com (JSonIP) to get IP address of visitor.

The below Javascript to helps you get IP address of a visitor.

I hope it’s helpful for you.

Happy coding!

Looking for Shopify Experts?

Hura Apps can help you take your store to the next level

Our team of experienced designers and developers can help you create a beautiful, high-converting Shopify store that will drive sales and increase customer satisfaction. From custom design to app development and optimization, we have the skills and expertise to help you achieve your eCommerce goals.

Get in touch

You may also like...

3 Responses

  1. Jay says:

    Hi, where do we post this code and view the results? Thank you

  2. Esquik says:

    Salut, ou ajouter le code donner?

  3. Jung says:

    For a more simple solution, you could consider installing an IP block app on your store.
    Blockify ‑ Fraud IP Blocker https://apps.shopify.com/region-restrictions

    It has the Pro report feature that basically gathers all data of IP visitors of your site. You can even filter the data by timeframe, type of IP ( (VPN, Proxy, Residentia…), and device. It helps you detect malicious IPs and block all of them (manually or automatically, it’s up to your setting). Plus, you can lock all of your content n photos so that no one can copy them. They have other cool stuff but these are the ones I use the most.

Leave a Reply

Your email address will not be published. Required fields are marked *