One of the great features of Camlytics is webhooks support for any of the camera events types. For example, if you do webcam people counting in two of your retail stores and you want to aggregate all counting data into one spreadsheet in the cloud for the simple access and custom charting - you can do that easily with Camlytics webhooks and Google Sheets.

To automate the submission of data into your Google Sheet, fill in the columns headers with parameter names (channel_id, channel_name, event_name, etc.) and click Tools > Script editor. You will be redirected to a Google Script page. Copy and paste the sample script below into the script editor.

function doPost(request){
  return handleResponse(request);
// How to use
//  1. Enter sheet name where data is to be written below
        var SHEET_NAME = "Sheet1";
//  2. Run > setup
//  3. Publish > Deploy as web app 
//    - enter Project Version name and click 'Save New Version' 
//    - set security level and enable service (most likely execute as 'me' and access 'anyone, even anonymously) 
//  4. Copy the 'Current web app URL' and post this in your Camlytics webhook URL
//  5. Insert column names on your destination sheet matching the parameter names of the data you are passing in (exactly matching case)
var SCRIPT_PROP = PropertiesService.getScriptProperties();
function handleResponse(request) {
  var lock = LockService.getPublicLock();
  try {
    var doc = SpreadsheetApp.openById(SCRIPT_PROP.getProperty("key"));
    var sheet = doc.getSheetByName(SHEET_NAME);
    var headRow = 1;
    var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];
    var nextRow = sheet.getLastRow() + 1;
    var row = []; 
    var postData = JSON.parse(request.postData.getDataAsString());
    for (i in headers){
    sheet.getRange(nextRow, 1, 1, row.length).setValues([row]);
    return ContentService
          .createTextOutput(JSON.stringify({"result":"success", "row": nextRow}))
  } catch(e){
    return ContentService
    .createTextOutput(JSON.stringify({"result":"error", "error": e }))
  } finally {
function setup() {
    var doc = SpreadsheetApp.getActiveSpreadsheet();
    SCRIPT_PROP.setProperty("key", doc.getId());

In the end you will receive the production script URL that you will insert into your Camlytics events setings in this format (URL will be different in your case):

Example of output in the Google Sheet that you are going to receive when events are fired:

camlytics google sheets

You can get more information on how to set up the script here.
If you are having difficulties with setting up Google Script, you can check out the simpler method, utilizing Google Forms.