Include IP address of Customer in Order Notification Email

Chris195
New Member
4 0 0

Hi there

Is it possible to include the IP address of the customer making the purchase in the order notification email ?

Many thanks

0 Likes
Lisa_P1
Shopify Staff
Shopify Staff
11 0 3

Hi Chris,

The liquid variable would be {{ browser_ip }} however I tried this on my order notification email on my test store and it didn't pull in the IP address from the test order I put through. It looks like the customer's IP address can't be pulled into the order notification email through the liquid variable.

If you're looking to reject orders coming from a certain IP address, you can use the free app Fraud Filter to create a rule to reject orders from that IP. Here is more information on how the Fraud Filter app works.

Hope this helps!

0 Likes
Chris195
New Member
4 0 0

Thanks for the reply.

Please could you file a bug report re: {{ browser_ip }}   ? This would be very useful to include in the email notifications.

I have tried the Fraud Filter module ... but that only works correctly if using Shopify payments it would seem. If using another gateway - payment is still allowed to go through ( the order gets cancelled in the admin - but payment is still taken from the customer during checkout ) which somewhat defeats the purpose.

Many thanks

0 Likes
Jason
Shopify Expert
10037 119 1873

Hey Chris,

Whilst not a solution, you could add the IP address as a cart attribute (perhaps set via a hidden field). This attribute could then be used within the emails.

https://docs.shopify.com/themes/customization/cart/get-more-information-with-cart-attributes

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
integras
New Member
2 0 0

Hi,

 

I'm trying to follow Jasons advise but unfortunately the IP-No does not show I order confirmation email.

 

(in cart)

<input type="hidden" name="attributes[ip]" value="{{ browser_ip }}">

 

(email template)

 <p> ip : {{ attributes.ip }} </p>

 

I'm using a manual payment alternative - could that be a problem?

 

Anyone who have an idea how to make this work?

 

0 Likes
TAGSAngel
Pathfinder
110 1 28
  • I would like this as well.  We do everything from our emails and it would be helpful to search by ip address etc.  If anyone figures this out please do tell!
0 Likes