Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I need to capture the IP Address to google spreadsheet via google web form

I have designed a Google web form. This form is sent to number of clients. All the fields that are submitted are recorded to Google spreadsheet. I need to capture the IP Addresses of clients and time-stamp to spreadsheet when client updates his information.

How can I make the client to include its own IP address to store it in spreadsheet?

like image 449
Sanjay Goswami Avatar asked Apr 03 '14 07:04

Sanjay Goswami


People also ask

Can Google Forms Capture IP address?

You cannot capture the IP inside Forms. As an alternative, you may send your clients a pre-filled URL with a unique ID that will identify the client's entry in the response sheet.

How do I find the IP address of a Google Sheet?

Go to ipstack, create an account and retrieve your API Key. Then save your ipstack key within KPIBees. Click on Create Query and get the IP lookup information in your selected spreadsheet cell. That's it!


2 Answers

To make the clients to include their own IP address in a Google Form you should ask them to write the IP address themselves.

The alternative is to pre-populate the answers and send the custom URL to them. For identification purposes, if you don't know the IP address, instead use a unique ID.

References
Pre-populate form answers - Docs editor Help

like image 145
Rubén Avatar answered Oct 10 '22 21:10

Rubén


You can set up a reverse proxy that injects a javascript file in the form, that JS bit can detect and save the user IP in a field, along with any other info you’d need such as user agent, language, local time and so on. This isn’t exactly trivial but may be worth exploring.

I don't have any precise examples but what you can do is:

  1. set up apache with mod_proxy to act as reverse proxy in front of the website
  2. use mod_substitute to replace some JS on the page with a version you host
  3. add any fields you need to the form so that when it's sent you get the data in the parameters

https://httpd.apache.org/docs/2.4/mod/mod_substitute.html

like image 40
Nick M Avatar answered Oct 10 '22 19:10

Nick M