'Log the timestamp in a cell when a another cell clicked on google sheet

I have a google sheet, one column (website) that has the link to the website(if you click it will go to the website). The second column (timestamp) needs to automatically log the time if the website cell is clicked. user may press it more than one time in that case it should save all the timestamps in a single cell. I'm trying to do with google script since I'm new to google script I'm not sure is this possible or not. Can anyone help me?

this is what I've done so far but this only works if the cell is edited and not able to add multiple timestamps in a single cell.

function onEdit() {
var s = SpreadsheetApp.getActiveSheet();
if( s.getName() == "Sheet1" ) {
var r = s.getActiveCell();
if( r.getColumn() == 1 ) { 
var nextCell = r.offset(0, 1);
if( nextCell.getValue() === '' ) 
nextCell.setValue(new Date());
}
}
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source