Now we can write this to the spreadsheet instead of simply logging the event in `Code.gs`. ```JavaScript title="Code.gs" function userClicked(input){    var ss = SpreadsheetApp.getSheetById(id);  // id is defined globally    var ws = ss.getSheetByName('data');    var rowContents = [input];  // rowContents should be 1d array        ws.appendRow(rowContents); } ``` Note that this user-provided input will not show up in the unordered list on the web app, although it will be included in the Sheet as a new entry. This is because the `doGet` function only runs on load. You can refresh the page to see the newly added list item. To add that item to the list, you would need to use JavaScript to interact with the DOM. We would update `logData` like so (if you had more than one unordered list, you would need to assign the list an id and use the `getElementById` method instead). ```JavaScript title="Code.gs" function logData(){    var input = document.getElementById('newItem').value;    google.script.run.userClicked(input);    document.getElementById('newItem').value = '';  // clear contents        var node = document.createElement('li');    node.appendChild(document.createTextNode(input));    document.querySelector('ul').appendChild(node) } ```