getting Started

parameter

Parameter name

must

describe

Customer ID

yes

Google Ads account number

Authorization ID

no

Authorized Service ID

Overview

Google Ads call details are relayed through Google Sheets and then periodically synchronized to the Google Ads Call Details source.

Configuration

I. Call Details Configuration

  1. Access the report editor in the Google Ads backend

  1. Find the Call Details report in the reports on the right and view the report.

  1. Pay close attention to the time range of the report . Setting a time period will only sync the content of the currently selected time period to Google Sheets . If a custom time period is used, the report will not automatically update with new content, and the pushed call details will remain unchanged. Therefore, you need to set the time period within the red box. (Except for today, other options will be delayed by about one day.)

  2. Set up your report time period and it will automatically sync to Google Sheets. You can freely set the daily time. After setting it, it won't sync immediately; you need to wait for the automatic sync at that time.

2. Google Sheets configuration

  1. Access the Apps Scripts of your synced spreadsheet.

  1. Add the archive command code, and remember to replace the API key in the source URL in the code .

 function syncAndCleanSheets() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheets = ss.getSheets(); var latestSheet = sheets[sheets.length - 1]; var data = latestSheet.getDataRange().getValues(); if (data.length <= 1) return; var headers = data[0]; var rows = data.slice(1); // 過濾掉電話為"--" 的行var cleanData = rows.filter(function(row) { var phoneNumber = row[4]; return phoneNumber !== "--"; }); // 轉化為物件格式方便後端解析var payload = cleanData.map(function(row) { var obj = {}; headers.forEach(function(header, index) { obj[header] = row[index]; }); return obj; }); var options = { "method": "post", "contentType": "application/json", "headers": { "ngrok-skip-browser-warning": "true" }, "payload": JSON.stringify(payload), "muteHttpExceptions": true }; Logger.log(options); var response = UrlFetchApp.fetch("https://sg.fn.topkee.com/source-610142599965538915?api_key=", options); if (response.getResponseCode() >= 200 && response.getResponseCode() < 300) { Logger.log("同步成功,正在刪除舊分頁..."); var currentSheets = ss.getSheets(); for (var i = 0; i < currentSheets.length - 1; i++) { ss.deleteSheet(currentSheets[i]); } } else { Logger.log("同步失敗,狀態碼: " + response.getResponseCode()); } }
  1. After adding the necessary files, click "Execute" and check the source logs to see if it was successful. Then, click "Add Deployment".

  1. After deployment, select "Add Trigger Condition" in the left column and configure it as shown in the image. After deployment, Google Sheets will periodically push the latest data to the source.

III. Source Configuration

  1. Obtain the Customer ID from the Google Ads backend and enter it into the source configuration.

  1. If the customer is using their own Google Ads account instead of a Topkee account, the customer-provided Google Ads authorization ID needs to be configured in the source.

  2. The Call Details written by the source do not require pushing Google conversion events; simply set the Leadbox destination, and the call details will be sent to Leadbox for processing.