Adding Google surveys to your page
If you have not created your survey, please click here to learn how to create surveys using Google Docs.
- Go the your Google Sites page you would like to display your survey on and click Edit page.
- Click Insert > Spreadsheet form.
- Choose the form you want to embed and click Select.
- Another window will appear, and you can customize the appearance of your form here.
- Click Save once you are finished.
Display a chart of survey results
- Let's say you have yes or no questions on your survey as shown below and would like to show a chart that shows the results.
- Every form you make in Google Docs will have an automatically generated spreadsheet with the result. Go to Google Docs and open your survey's spreadsheet.
- In this sample, we would like to have a chart that shows the number of yeses and nos on column B and C. The spreadsheet cannot automatically count these numbers, so you must write formulas to compute them. Set this up on place that will not overlap with the survey results, in this case on columns G-I.
We want to count the number of yeses for Sample Question 1 on column B. The formula for this would be =countif(B2:B13,"yes"). If you are expecting a lot of responses, you may expand the range. Do the same for the number of nos for Sample Question 1, and yeses and nos for Sample Question 2. Make sure you change the formulas to their corresponding ranges (e.g. =countif(B2:B13,"no") for the number of nos for Sample Question 1).
- Go to Insert > Chart
- Choose your chart type and under What data? change the range to the cells where you typed in your formulas into. In this example, it is from G2 to I4, with row 2 and column G as labels.
- Click Save chart. You will see a chart like shown below.
- To get the above chart to show on your page, click on Chart > Publish chart.
- A little window will appear and you can copy and paste this code to your Google Sites page (be sure to paste this when you are editing the HTML). Your chart will be automatically updated with the latest results.