Saved on this phone only. Enter once — it will remember you.
--:--:--
—
No site configured
Recent clocks
- No clocks yet on this device.
Admin setup. Values are stored on this device.
timestamp, worker_name, worker_id, action, lat, lng, accuracy_m, distance_m, in_fence, site, device_id, client_time.const SHEET_ID = 'PASTE_YOUR_SHEET_ID_HERE';
function doPost(e) {
const data = JSON.parse(e.postData.contents);
const sheet = SpreadsheetApp.openById(SHEET_ID).getSheets()[0];
sheet.appendRow([
new Date(), // server timestamp
data.worker_name,
data.worker_id,
data.action,
data.lat, data.lng, data.accuracy_m,
data.distance_m, data.in_fence,
data.site, data.device_id, data.client_time
]);
return ContentService
.createTextOutput(JSON.stringify({ok:true}))
.setMimeType(ContentService.MimeType.JSON);
}