# Set IP of user when submitting form of site

**URL:** <https://forum.mautic.org/t/set-ip-of-user-when-submitting-form-of-site/6191>\
**Category:** Product Support\
**Created:** [October 11, 2016, 6:18pm UTC](https://forum.mautic.org/t/set-ip-of-user-when-submitting-form-of-site/6191 "2016-10-11T18:18:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![starterebi](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@starterebi](https://forum.mautic.org/u/starterebi)\
**Post date:** [October 11, 2016, 6:18pm UTC](https://forum.mautic.org/t/set-ip-of-user-when-submitting-form-of-site/6191/1 "2016-10-11T18:18:00Z")

</div>

I’m using this method via php to submit post data to a mautic form  
  
  
  
[https://medium.com/@jan\_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005#.rywamdcea](https://medium.com/@jan_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005#.rywamdcea)  
  
  
  
My question is, when you do that all contacts have the same IP, which most likely means the mtc tracking won’t work properly.  
  
  
  
Is it possible to pass IP of submitter via post data ef  
  
  
  
data = “current ip of user submitting form”

---

<div class="post-metadata">

**Author:** ![starterebi](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@starterebi](https://forum.mautic.org/u/starterebi)\
**Post date:** [October 11, 2016, 6:18pm UTC](https://forum.mautic.org/t/set-ip-of-user-when-submitting-form-of-site/6191/2 "2016-10-11T18:18:00Z")

</div>

I’m using this method via php to submit post data to a mautic form

[https://medium.com/@jan\_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005#.rywamdcea](https://medium.com/@jan_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005#.rywamdcea)

My question is, when you do that all contacts have the same IP, which most likely means the mtc tracking won’t work properly.

Is it possible to pass IP of submitter via post data ef

data[‘ip’] = “current ip of user submitting form”

---

<div class="post-metadata">

**Author:** ![ninjoan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ninjoan/32/1005_2.png) [@ninjoan](https://forum.mautic.org/u/ninjoan)\
**Post date:** [October 11, 2016, 7:24pm UTC](https://forum.mautic.org/t/set-ip-of-user-when-submitting-form-of-site/6191/3 "2016-10-11T19:24:58Z")

</div>

All the lead create [https://medium.com/@jan\_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005#.rywamdcea](https://medium.com/@jan_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005#.rywamdcea) have the same ip???

---

<div class="post-metadata">

**Author:** ![Elenchus](https://avatars.discourse-cdn.com/v4/letter/e/ccd318/32.png) [@Elenchus](https://forum.mautic.org/u/Elenchus)\
**Post date:** [October 12, 2016, 1:03am UTC](https://forum.mautic.org/t/set-ip-of-user-when-submitting-form-of-site/6191/4 "2016-10-12T01:03:00Z")

</div>

There is code in that example which passes the user’s IP address to Mautic. It has been working properly for me.

Couple of things to check, which you may well have already done - firstly that the code is implemented correctly on your server, and secondly that you are getting contacts created from different IP addresses (contacts being routed from the same location or coming through a VPN to your server will have the same IP).

Other than that I’m not sure what you can do.

---

<div class="post-metadata">

**Author:** ![starterebi](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@starterebi](https://forum.mautic.org/u/starterebi)\
**Post date:** [October 16, 2016, 5:11pm UTC](https://forum.mautic.org/t/set-ip-of-user-when-submitting-form-of-site/6191/5 "2016-10-16T17:11:32Z")

</div>

I wasn’t correctly setting the $ip in the request, but once I added that it worked. Thanks so much for the help!

I was custom hacking a new newsletter integration for amembers.
