Nathan Lippi
Nathan Lippi

Reputation: 5237

A way to pass URL parameters into survey?

I have created a Google Survey and I want to be able to pass URL parameters into the survey so that I can track where responses are coming from. Ideally these URL parameters will be populated into the spreadsheet.

I have tried something like this:

https://docs.google.com/forms/d/HASH/viewform?**src=MY_SOURCE&ref=MY_REF**

However, this doesn't seem to be working.

Any help or comments appreciated!

Upvotes: 48

Views: 67418

Answers (4)

Alexandre Tunnermann
Alexandre Tunnermann

Reputation: 11

There's yet another workaround that I just thought about.

Get your normal form with a prefilled link, with "wanted hidden" dat in the end. Copy the whole source code of the page and post the HTML to your webpage.

Then select the DIV in which you want to hide and ad style="visibility: hidden; max-heigh:1px;" It will hide the whole DIV and shrink the height to 1px.

Upvotes: 0

Mitzi
Mitzi

Reputation: 2811

I came across this and decided to do the following.

  1. Create a form
  2. At the bottom add your own parameters (lets say user_id)
  3. Click the triple dots on the top right to get a prefilled link
  4. Fill the user_id parameter with user_id
  5. Click Generate and copy the link (Bottom left)
  6. Your link will look like this: https://docs.google.com/forms/d/e/1FAIplshiflshdlshdflkhlkb0Exboi5usdfsdf-f/viewform?entry.1370129364=user_id

In my case I wrote something that replaces {user_id} with the actual user id. The link looked like this: https://docs.google.com/forms/d/e/1FAIplshiflshdlshdflkhlkb0Exboi5usdfsdf-f/viewform?entry.1370129364={user_id} I did a simple replace (e.g user_id = 123455) link looks like this https://docs.google.com/forms/d/e/1FAIplshiflshdlshdflkhlkb0Exboi5usdfsdf-f/viewform?entry.1370129364=123455 and clicking on it will fill the user_id in the form with 123455

Do this if you don't mind the users to be able to change the data (most of them don't).

Upvotes: 25

Eric Koleda
Eric Koleda

Reputation: 12673

There is no way to pass hidden information, but you can pre-fill form fields using URL parameters:

  1. Open a form in Google Forms
  2. In the top right, click More [...]
  3. Choose Get pre-filled link
  4. Fill in any answer fields you want to pre-populate
  5. Click Submit
  6. To send the pre-populated form to respondents, copy and send the link at the top

Upvotes: 50

ADJ1223
ADJ1223

Reputation: 145

I've wanted to pass through hidden information through a Google Form and came up with a little work around:

  1. Create a new page/section (old vs new forms) on the form with the questions that you want filled. If you have multiple pages, make the hidden page the last for simiplicity.

  2. Use the "continue to page" option on the last page/section you want visible to go to Submit.

  3. Use the prefill tool to get the entry IDs and set up the link as you need.

When a user accesses the form through the pre-filled URL, the hidden data will be filled in on the hidden page and submitted with their other answers... Although it will be hidden from an EU standpoint.

I use this frequently for transferring data from one form to another. With the CopyDown addon to copy the formula after each form submit so that it builds the pre-fill URL, that when clicked, has just the essential questions (i.e. record number, name, etc.) to verify the info. Hit Next, then Submit!

Upvotes: 12

Related Questions