Log data from google site to spreadsheet

Judge me all you want but I used chatgpt for this one.

I wanted to have like an emotion logger where people can just click on a button (ex. Sad) from the google site and then all the “clicks”/“answers” will be logged on a google spreadhseet with timestamp.

Below is what chatgpt says, tried it but doesnt work.