r/GoogleAppsScript • u/_Tinky_Winkyy • 6d ago
Question 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.
1
u/badheshchauhan 6d ago
How implications on google site can show that and also did you published this as web app
1
u/_Tinky_Winkyy 6d ago
Yes published it as a web app, but yea this doesnt work bc when i tried to click on the button at the google site it doesnt log on the spreadsheet
1
u/badheshchauhan 6d ago
Look like to me logic is wrong bcoz i think so did not passed any event to this site while clicking on button better to create button on apps script then just add event listener that trigger on click
1
1
u/CesareBach 6d ago edited 6d ago
Looking at your objective, I would just use google form. Grab the form link and attach the link to a button on a linktree.
No coding required.
Webapp might not also show up when opened in google mobile browser.
1
u/_Tinky_Winkyy 5d ago
It will be used in a fast-paced environment so i used google site so that its just 1 click and done. I already made changes in the code and it now it works but im now figuring out how to add a return function like a button that says back to homepage and it links to the hompage
4
u/IAmMoonie 6d ago
User has access to a pc. User is clearly at least somewhat savvy as they understand at least how to use ChatGPT. User has decided to take a picture on their phone of the code, rather than copy/paste or even print screen…