IP Address on form post


#1

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


#2

No answers?


#3

Any comments on this?


#4

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?


#5

Any hints on this topic?


#6

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


#7

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


#8

Also, looking to do this. Anything?


#9

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


#10

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?


#11

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


#12

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