Commit b744cd2
authored
feat(analytics): posthog audit — remove noise, add 10 new events (#3917)
* feat(analytics): posthog audit — remove noise, add 10 new events
Remove task_marked_read (fires automatically on every task view).
Add workspace_id to task_message_sent for group analytics.
New events:
- search_result_selected: block/tool/trigger/workflow/table/file/
knowledge_base/workspace/task/page/docs with query_length
- workflow_imported: count + format (json/zip)
- workflow_exported: count + format (json/zip)
- folder_created / folder_deleted
- logs_filter_applied: status/workflow/folder/trigger/time
- knowledge_base_document_deleted
- scheduled_task_created / scheduled_task_deleted
* fix(analytics): use usePostHog + captureEvent in hooks, track custom date range
* fix(analytics): always fire scheduled_task_deleted regardless of workspaceId
* fix(analytics): correct format field logic and add missing useCallback deps1 parent d290e06 commit b744cd2
File tree
12 files changed
+328
-71
lines changed- apps/sim
- app
- api
- folders
- [id]
- knowledge/[id]/documents/[documentId]
- mothership/chats/[chatId]
- schedules
- [id]
- workspace/[workspaceId]
- home
- logs/components/logs-toolbar
- w
- components/sidebar/components/search-modal
- hooks
- lib/posthog
12 files changed
+328
-71
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
159 | 167 | | |
160 | 168 | | |
161 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
148 | 156 | | |
149 | 157 | | |
150 | 158 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
288 | 297 | | |
289 | 298 | | |
290 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 162 | + | |
172 | 163 | | |
173 | 164 | | |
174 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
301 | 309 | | |
302 | 310 | | |
303 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
277 | 278 | | |
278 | 279 | | |
279 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
280 | 288 | | |
281 | 289 | | |
282 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
227 | | - | |
| 228 | + | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| |||
Lines changed: 60 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
182 | 187 | | |
183 | 188 | | |
184 | 189 | | |
| |||
258 | 263 | | |
259 | 264 | | |
260 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
261 | 270 | | |
262 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
263 | 305 | | |
264 | 306 | | |
265 | 307 | | |
| |||
348 | 390 | | |
349 | 391 | | |
350 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
351 | 397 | | |
352 | 398 | | |
353 | | - | |
| 399 | + | |
354 | 400 | | |
355 | 401 | | |
356 | 402 | | |
| |||
360 | 406 | | |
361 | 407 | | |
362 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
363 | 413 | | |
364 | | - | |
| 414 | + | |
365 | 415 | | |
366 | 416 | | |
367 | 417 | | |
| |||
545 | 595 | | |
546 | 596 | | |
547 | 597 | | |
548 | | - | |
| 598 | + | |
549 | 599 | | |
550 | 600 | | |
551 | 601 | | |
| |||
580 | 630 | | |
581 | 631 | | |
582 | 632 | | |
583 | | - | |
| 633 | + | |
584 | 634 | | |
585 | 635 | | |
586 | 636 | | |
| |||
605 | 655 | | |
606 | 656 | | |
607 | 657 | | |
608 | | - | |
| 658 | + | |
609 | 659 | | |
610 | 660 | | |
611 | 661 | | |
| |||
676 | 726 | | |
677 | 727 | | |
678 | 728 | | |
679 | | - | |
| 729 | + | |
680 | 730 | | |
681 | 731 | | |
682 | 732 | | |
| |||
707 | 757 | | |
708 | 758 | | |
709 | 759 | | |
710 | | - | |
| 760 | + | |
711 | 761 | | |
712 | 762 | | |
713 | 763 | | |
| |||
726 | 776 | | |
727 | 777 | | |
728 | 778 | | |
729 | | - | |
| 779 | + | |
730 | 780 | | |
731 | 781 | | |
732 | 782 | | |
| |||
0 commit comments