A | B | C | D | |
---|---|---|---|---|
1 | ||||
2 | ||||
3 | S t a t i s t i с s | |||
4 | 30 | |||
5 | Export data from: | 29 August 2025 (Fri) | (30 days) | |
6 | ||||
7 | To: | 28 September 2025 (Sun) | ||
8 | ||||
9 | Statistic tables to export: | request_stats | ||
10 | ||||
11 | API token: | |||
12 | ||||
13 | ||||
14 | Ready | |||
15 | ☀️ Instructions | |||
16 | This spreadsheet is used to build reports and diagrams based on statistic data exported from Chat2Desk service. The statistics is calculated on Chat2Desk servers once a day in the morning. | |||
17 | The statistics is exported into 5 main statistic tables, ready to be used in reports and pivot tables. See statistics manual here (PDF), | |||
18 | For there to be data for export you need to have Aggregated (extended) statistics option enabled. This is paid option. Contact technical support. | |||
19 | This file spends API requests for statistics export. Once API requests exceed 100 000 per month they become payble. See spent API requests in Settings > API. | |||
20 | ||||
21 | 1. Create a copy of this file: File > Create a copy. Further work with the copy. | |||
22 | 2. Input your API token into line 11. The token is available under administrator account at chat2desk.com: Settings > API. | |||
23 | 3. Specify the begining date in line 5. To export the data up to yesterday enter formula =TODAY() into line 7. Data for today is not exported because it's not complete. | |||
24 | 4. Click the blue button to start the export from Chat2Desk servers. Wait till the green Running script caption disappears. | |||
25 | First run | |||
26 | Once you press the blue button for the first time, you have to grant Google the permission to access Chat2Desk stats app: | |||
27 | On the page with This app isn't verified label click Show advanced, then Go to "Chat2Desk stats" page and then click Allow. | |||
28 | ||||
29 | If the script couldn't finish in time | |||
30 | Google allows no more than 5 minutes to run a script. If during this time period the data export couldn't make it, your statistics will be incomplete. | |||
31 | Press the blue button again and the export will continue. Maybe you will have to do it several times. After the export is complete, next export will be faster because only new data is exported. | |||
32 | 5. Сreate reports, pivot tables and build diagrams using the exported data. See Reports examples on the next sheet. | |||
33 | 6. Use the red button Clear exported data to clear the statistics data on all 5 sheets. | |||
34 | Reports on Reports examples sheet are for illustration purposes only. Use Google Spreadsheets help to create your own reports. | |||
35 | ❗️Possible errors | |||
36 | Error The number of cells in the workbook will exceed the maximum allowable means there is too much data for this Google Spreadsheet (no more than 10 million cells): | |||
37 | ▪️ Close the red error message. | |||
38 | ▪️ Delete empty rows and coulmns on all sheets. | |||
39 | ▪️ Select not all tables for export but 1 or 2 specific ones. Probably you will be fine with only request_stats. | |||
40 | ▪️ Select a more recent date. For example not older than 2-3 months ago. | |||
41 | Error API unavailable: | |||
42 | ▪️ Incorrect API token entered. | |||
43 | ▪️ There was an internet connection issue while running the script. Press the blue button to continue. | |||
44 | ▪️ All API requests for current month are spent. Contact the technical support. | |||
45 | Error Maximum execution time exceeded: | |||
46 | ▪️ Press the blue button to continue. | |||
47 | In case the export finished without errors, but the tables are empty, it means the option Aggregated (extended) statistics is not enabled for your account or there's no data for selected time period. | |||
48 | 🤌 Hints | |||
49 | You can add formulas for your additional indicators on the right from the exported data. | |||
50 | 🦥 Help | |||
51 | If you break things up, you can always revert to the original file using this link. | |||
52 | For help on statistics and API, contact the technical support. Also use help manual for Google Spreadsheets — see Help menu item. |