IP Address on form post

  • 24 January 2013
  • 11 replies
  • 15 views

Hi,

I’ve been testing and it seems that on form send some values are added to the form:

[pageId] => c8da3d86-661c-11e2-84b7-12313e00f411
[pageVariant] => a

But I can’t add the IP Address, I’ve tried adding a hidden field called ip_address with a value of (ip_address) but with no look.

Is it possible to have the IP address in the form without using web hooks, only with the post form data to a url option?

I wish to use that instead of webhook.

Regards,

Jose


11 replies

No answers?

Any comments on this?

Hi Jose, so sorry for the slow response! When you configure your Unbounce form to use the “Post Form Data to URL” option, the IP address should be available via the regular mechanisms, as the data is posted to the URL you specify via the browser. In the case of PHP, you would use:

$\_SERVER['REMOTE\_ADDR']   

Does that make sense?

Any hints on this topic?

Hey thanks a lot for the answer! I will go and try this 🙂

this does not seem to work for me… i am not getting the IP…

Also, looking to do this. Anything?

Userlevel 7
Badge +3

Hi @melissa_vast,

The “Post form data to URL” is passing the IP address.

You’ll have to adjust your receiving URL to capture it.

Best,
Hristian

Thanks @Hristian!

We do use the Post from data to URL. Is there a way to add a hidden field in a form for the IP to push to SalesForce?

Userlevel 7
Badge +3

Hi @melissa_vast,

If you use a webhook instead of the post to URL feature, you’ll be able to send over the IP address as part of the payload to Salesforce.

Alternatively, if you want to use the post to URL feature, you’ll need to write a JS script that would write the IP address of the visitor into a hidden field. Capturing the IP address through the front-end with JS is not optimal but I think it’s your only option.

Best,
Hristian

Hi @Hristian,

I set up the WebHook and configured the field mapping. But I’m not seeing it feed to SalesForce or in the form submission.

Am I missing something?

image

Reply